@@ -46,7 +46,7 @@ using namespace o2::analysis::femtoDream;
4646
4747namespace o2 ::aod
4848{
49- // using 用于定义新的类型别名
49+ // using 用于定义新的类型别名
5050using FemtoFullCollision = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms>::iterator;
5151using FemtoFullCollision_noCent = soa::Join<aod::Collisions, aod::EvSels, aod::Mults>::iterator;
5252using FemtoFullCollisionMC = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms, aod::McCollisionLabels>::iterator;
@@ -67,7 +67,7 @@ static const std::vector<std::string> triggerNames{"fPPP", "fPPL", "fPLL", "fLLL
6767static const float triggerSwitches[1 ][nTriggers]{
6868 {0 , 0 , 0 , 0 , 0 , 0 }};
6969} // namespace softwareTriggers
70- // template <typename T> 允许函数接受任意类型的参数,只要这个类型 T 支持某些操作
70+ // template <typename T> 允许函数接受任意类型的参数,只要这个类型 T 支持某些操作
7171template <typename T>
7272int getRowDaughters (int daughID, T const & vecID)
7373{
@@ -79,14 +79,14 @@ int getRowDaughters(int daughID, T const& vecID)
7979 }
8080 }
8181 return rowInPrimaryTrackTableDaugh;
82- }// getRowDaughters 函数用于查找目标 ID(daughID)在某个容器(vecID)中的位置。它返回该 ID 的索引,或者如果未找到,返回 -1。
82+ } // getRowDaughters 函数用于查找目标 ID(daughID)在某个容器(vecID)中的位置。它返回该 ID 的索引,或者如果未找到,返回 -1。
8383
8484struct femtoDreamProducerTask {
8585
8686 Zorro zorro;
8787
88- Produces<aod::FDCollisions> outputCollision;// 当前模块将生成类型为 aod::XXX 的数据,并将其输出给后续的处理模块或框架中的其他部分
89- // outputCollision 是一个对象或变量名,被声明为 Produces<aod::FDCollisions> 类型的变量
88+ Produces<aod::FDCollisions> outputCollision; // 当前模块将生成类型为 aod::XXX 的数据,并将其输出给后续的处理模块或框架中的其他部分
89+ // outputCollision 是一个对象或变量名,被声明为 Produces<aod::FDCollisions> 类型的变量
9090 Produces<aod::FDMCCollisions> outputMCCollision;
9191 Produces<aod::FDMCCollLabels> outputCollsMCLabels;
9292 Produces<aod::FDParticles> outputParts;
@@ -97,7 +97,7 @@ struct femtoDreamProducerTask {
9797 Produces<aod::FDExtMCLabels> outputPartsExtMCLabels;
9898
9999 Configurable<bool > ConfIsDebug{" ConfIsDebug" , true , " Enable Debug tables" };
100- Configurable<bool > ConfIsRun3{" ConfIsRun3" , true , " Running on Run3 or pilot" };// 改了
100+ Configurable<bool > ConfIsRun3{" ConfIsRun3" , true , " Running on Run3 or pilot" }; // 改了
101101 Configurable<bool > ConfIsForceGRP{" ConfIsForceGRP" , false , " Set true if the magnetic field configuration is not available in the usual CCDB directory (e.g. for Run 2 converted data or unanchorad Monte Carlo)" };
102102
103103 // / Event cuts
@@ -138,7 +138,7 @@ struct femtoDreamProducerTask {
138138 Configurable<float > ConfTrkPIDnSigmaOffsetTPC{" ConfTrkPIDnSigmaOffsetTPC" , 0 ., " Offset for TPC nSigma because of bad calibration" };
139139 Configurable<float > ConfTrkPIDnSigmaOffsetTOF{" ConfTrkPIDnSigmaOffsetTOF" , 0 ., " Offset for TOF nSigma because of bad calibration" };
140140 Configurable<std::vector<int >> ConfTrkPIDspecies{" ConfTrkPIDspecies" , std::vector<int >{o2::track::PID::Pion, o2::track::PID::Kaon, o2::track::PID::Proton, o2::track::PID::Deuteron}, " Trk sel: Particles species for PID" };
141- // Pion,Kaon..是初始值
141+ // Pion,Kaon..是初始值
142142 FemtoDreamV0Selection v0Cuts;
143143 Configurable<std::vector<float >> ConfV0Sign{FemtoDreamV0Selection::getSelectionName (femtoDreamV0Selection::kV0Sign , " ConfV0" ), std::vector<float >{-1 , 1 }, FemtoDreamV0Selection::getSelectionHelper (femtoDreamV0Selection::kV0Sign , " V0 selection: " )};
144144 Configurable<std::vector<float >> ConfV0PtMin{FemtoDreamV0Selection::getSelectionName (femtoDreamV0Selection::kV0pTMin , " ConfV0" ), std::vector<float >{0 .3f , 0 .4f , 0 .5f }, FemtoDreamV0Selection::getSelectionHelper (femtoDreamV0Selection::kV0pTMin , " V0 selection: " )};
@@ -232,7 +232,7 @@ struct femtoDreamProducerTask {
232232
233233 colCuts.setCuts (ConfEvtZvtx.value , ConfEvtTriggerCheck.value , ConfEvtTriggerSel.value , ConfEvtOfflineCheck.value , ConfEvtAddOfflineCheck.value , ConfIsRun3.value );
234234 colCuts.init (&qaRegistry);
235- // trackCuts是FemtoDreamTrackSelection类型的类
235+ // trackCuts是FemtoDreamTrackSelection类型的类
236236 trackCuts.setSelection (ConfTrkCharge, femtoDreamTrackSelection::kSign , femtoDreamSelection::kEqual );
237237 trackCuts.setSelection (ConfTrkPtmin, femtoDreamTrackSelection::kpTMin, femtoDreamSelection::kLowerLimit );
238238 trackCuts.setSelection (ConfTrkPtmax, femtoDreamTrackSelection::kpTMax, femtoDreamSelection::kUpperLimit );
@@ -371,7 +371,7 @@ struct femtoDreamProducerTask {
371371 particle.tofNSigmaPr (),
372372 particle.tofNSigmaDe (),
373373 particle.tofNSigmaHe (),
374- /* -999., -999., */ -999 ., -999 ., -999 ., -999 .);
374+ /* -999., -999., */ -999 ., -999 ., -999 ., -999 .);
375375 } else {
376376 outputDebugParts (-999 ., -999 ., -999 ., -999 ., -999 ., -999 ., -999 ., -999 .,
377377 -999 ., -999 ., -999 ., -999 ., -999 ., -999 ., -999 ., -999 .,
@@ -454,23 +454,23 @@ struct femtoDreamProducerTask {
454454 outputCollsMCLabels (-1 );
455455 }
456456 }
457- template <bool isMC, bool useCentrality, typename V0Type, typename TrackType, typename CollisionType>// isMC:表示是否处理的是蒙特卡洛(MC)数据
458- // 主要的函数
457+ template <bool isMC, bool useCentrality, typename V0Type, typename TrackType, typename CollisionType> // isMC:表示是否处理的是蒙特卡洛(MC)数据
458+ // 主要的函数
459459 void fillCollisionsAndTracksAndV0 (CollisionType const & col, TrackType const & tracks, V0Type const & fullV0s)
460460 { //
461461 // If triggering is enabled, select only events which were triggered wit our triggers
462- if (ConfEnableTriggerSelection) {// 第一次cut
462+ if (ConfEnableTriggerSelection) { // 第一次cut
463463 bool zorroSelected = zorro.isSelected (col.template bc_as <aod::BCsWithTimestamps>().globalBC ()); // / check if event was selected by triggers of interest
464464 if (!zorroSelected) {
465465 return ;
466466 }
467467 }
468468
469469 const auto vtxZ = col.posZ ();
470- const auto spher = colCuts.computeSphericity (col, tracks);// 获取碰撞顶点位置 vtxZ 和碰撞的球形度 spher
470+ const auto spher = colCuts.computeSphericity (col, tracks); // 获取碰撞顶点位置 vtxZ 和碰撞的球形度 spher
471471 float mult = 0 ;
472472 int multNtr = 0 ;
473- if (ConfIsRun3) {// 一般都是run3
473+ if (ConfIsRun3) { // 一般都是run3
474474 if constexpr (useCentrality) {
475475 mult = col.centFT0M ();
476476 } else {
@@ -482,14 +482,14 @@ struct femtoDreamProducerTask {
482482 multNtr = col.multTracklets ();
483483 }
484484
485- colCuts.fillQA (col, mult);// fill QA一般是把table里面一些值拿出来填一遍,以检测粒子的数据质量
485+ colCuts.fillQA (col, mult); // fill QA一般是把table里面一些值拿出来填一遍,以检测粒子的数据质量
486486
487487 // check whether the basic event selection criteria are fulfilled
488488 // that included checking if there is at least on usable track or V0
489- if (!colCuts.isSelectedCollision (col)) {// 第二次cut
489+ if (!colCuts.isSelectedCollision (col)) { // 第二次cut
490490 return ;
491491 }
492- if (ConfIsActivateV0.value ) {// 检查碰撞是否包含有效的轨迹或 V0
492+ if (ConfIsActivateV0.value ) { // 检查碰撞是否包含有效的轨迹或 V0
493493 if (colCuts.isEmptyCollision (col, tracks, trackCuts) && colCuts.isEmptyCollision (col, fullV0s, v0Cuts, tracks)) {
494494 return ;
495495 }
@@ -499,7 +499,7 @@ struct femtoDreamProducerTask {
499499 }
500500 }
501501
502- outputCollision (vtxZ, mult, multNtr, spher, mMagField );// 当前模块将生成类型为 aod::XXX 的数据
502+ outputCollision (vtxZ, mult, multNtr, spher, mMagField ); // 当前模块将生成类型为 aod::XXX 的数据
503503 if constexpr (isMC) {
504504 fillMCCollision (col);
505505 }
@@ -508,15 +508,15 @@ struct femtoDreamProducerTask {
508508 std::vector<int > tmpIDtrack; // this vector keeps track of the matching of the primary track table row <-> aod::track table global index
509509 std::vector<typename TrackType::iterator> Daughter1, Daughter2;
510510
511- for (auto & track : tracks) {// 首先使用 trackCuts.isSelectedMinimal 检查轨迹是否符合基本选择标准
511+ for (auto & track : tracks) { // 首先使用 trackCuts.isSelectedMinimal 检查轨迹是否符合基本选择标准
512512 // / if the most open selection criteria are not fulfilled there is no
513513 // / point looking further at the track
514514 if (!trackCuts.isSelectedMinimal (track)) {
515515 continue ;
516516 }
517517 trackCuts.fillQA <aod::femtodreamparticle::ParticleType::kTrack , aod::femtodreamparticle::TrackType::kNoChild >(track);
518518 // the bit-wise container of the systematic variations is obtained
519- // 计算并返回与轨迹关联的一组选择标准
519+ // 计算并返回与轨迹关联的一组选择标准
520520 auto cutContainer = trackCuts.getCutContainer <aod::femtodreamparticle::cutContainerType>(track, track.pt (), track.eta (), sqrtf (powf (track.dcaXY (), 2 .f ) + powf (track.dcaZ (), 2 .f )));
521521
522522 // now the table is filled
@@ -527,8 +527,8 @@ struct femtoDreamProducerTask {
527527 aod::femtodreamparticle::ParticleType::kTrack ,
528528 cutContainer.at (femtoDreamTrackSelection::TrackContainerPosition::kCuts ),
529529 cutContainer.at (femtoDreamTrackSelection::TrackContainerPosition::kPID ),
530- track.dcaXY (), childIDs, 0 , 0 );// 这里的 kCuts kPID是一个常量,表示在容器中的特定位置,通常指向用于判断轨迹是否通过选择标准的结果
531- tmpIDtrack.push_back (track.globalIndex ());// tmpIDtrack 是一个存储轨迹全局索引的临时向量。push_back 方法将该索引添加到 tmpIDtrack 向量中,便于后续跟踪和引用该轨迹
530+ track.dcaXY (), childIDs, 0 , 0 ); // 这里的 kCuts kPID是一个常量,表示在容器中的特定位置,通常指向用于判断轨迹是否通过选择标准的结果
531+ tmpIDtrack.push_back (track.globalIndex ()); // tmpIDtrack 是一个存储轨迹全局索引的临时向量。push_back 方法将该索引添加到 tmpIDtrack 向量中,便于后续跟踪和引用该轨迹
532532 if (ConfIsDebug.value ) {
533533 fillDebugParticle<true >(track);
534534 }
@@ -537,7 +537,7 @@ struct femtoDreamProducerTask {
537537 fillMCParticle (col, track, o2::aod::femtodreamparticle::ParticleType::kTrack );
538538 }
539539
540- if (ConfIsActivateReso.value ) {// 啥是reso selection
540+ if (ConfIsActivateReso.value ) { // 啥是reso selection
541541 // Already strict cuts for Daughter of reso selection
542542 // TO DO: change TTV0 task to apply there the strict selection and have here only loose selection
543543
@@ -564,7 +564,7 @@ struct femtoDreamProducerTask {
564564 }
565565 }
566566
567- if (ConfIsActivateV0.value ) {// 处理V0
567+ if (ConfIsActivateV0.value ) { // 处理V0
568568 for (auto & v0 : fullV0s) {
569569 auto postrack = v0.template posTrack_as <TrackType>();
570570 auto negtrack = v0.template negTrack_as <TrackType>();
0 commit comments