@@ -119,6 +119,9 @@ struct FlowCumulantsUpc {
119119 Configurable<std::vector<std::string>> cfgUserDefineGFWName{" cfgUserDefineGFWName" , std::vector<std::string>{" Ch02Gap22" , " Ch12Gap22" }, " User defined GFW Name" };
120120 Configurable<std::vector<int >> cfgRunRemoveList{" cfgRunRemoveList" , std::vector<int >{-1 }, " excluded run numbers" };
121121
122+ Configurable<int > cfgMaxEvents{" max-events" , -1 , " maximum number of events to process, -1 for all events" };
123+ int processedEvents{0 };
124+
122125 ConfigurableAxis axisPtHist{" axisPtHist" , {100 , 0 ., 10 .}, " pt axis for histograms" };
123126 ConfigurableAxis axisPt{" axisPt" , {VARIABLE_WIDTH, 0.2 , 0.25 , 0.3 , 0.35 , 0.4 , 0.45 , 0.5 , 0.55 , 0.6 , 0.65 , 0.7 , 0.75 , 0.8 , 0.85 , 0.9 , 0.95 , 1 , 1.1 , 1.2 , 1.3 , 1.4 , 1.5 , 1.6 , 1.7 , 1.8 , 1.9 , 2 , 2.2 , 2.4 , 2.6 , 2.8 , 3 , 3.5 , 4 , 5 , 6 , 8 , 10 }, " pt axis for histograms" };
124127 ConfigurableAxis axisIndependent{" axisIndependent" , {VARIABLE_WIDTH, 0 , 5 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 }, " X axis for histograms" };
@@ -127,12 +130,12 @@ struct FlowCumulantsUpc {
127130 ConfigurableAxis axisDCAxy{" axisDCAxy" , {200 , -1 , 1 }, " DCA_{xy} (cm)" };
128131
129132 // Added UPC Cuts
130- // SGSelector sgSelector;
131- // Configurable<float> cfgCutFV0{"cfgCutFV0", 50., "FV0A threshold"};
132- // Configurable<float> cfgCutFT0A{"cfgCutFT0A", 150., "FT0A threshold"};
133- // Configurable<float> cfgCutFT0C{"cfgCutFT0C", 50., "FT0C threshold"};
134- // Configurable<float> cfgCutZDC{"cfgCutZDC", 10., "ZDC threshold"};
135- // Configurable<float> cfgGapSideSelection{"cfgGapSideSelection", 2, "gap selection"};
133+ SGSelector sgSelector;
134+ Configurable<float > cfgCutFV0{" cfgCutFV0" , 50 ., " FV0A threshold" };
135+ Configurable<float > cfgCutFT0A{" cfgCutFT0A" , 150 ., " FT0A threshold" };
136+ Configurable<float > cfgCutFT0C{" cfgCutFT0C" , 50 ., " FT0C threshold" };
137+ Configurable<float > cfgCutZDC{" cfgCutZDC" , 10 ., " ZDC threshold" };
138+ Configurable<float > cfgGapSideSelection{" cfgGapSideSelection" , 2 , " gap selection" };
136139
137140 // Corrections
138141 TH1D* mEfficiency = nullptr ;
@@ -432,7 +435,6 @@ struct FlowCumulantsUpc {
432435 fGFWMC ->AddRegion (" olN" , -0.8 , -0.4 , 1 + fPtAxis ->GetNbins (), 4 );
433436 fGFWMC ->AddRegion (" olN10" , -0.8 , -0.5 , 1 + fPtAxis ->GetNbins (), 4 );
434437 fGFWMC ->AddRegion (" olfull" , -0.8 , 0.8 , 1 + fPtAxis ->GetNbins (), 4 );
435- fGFWMC ->CreateRegions ();
436438
437439 corrconfigs.push_back (fGFW ->GetCorrelatorConfig (" full {2 -2}" , " ChFull22" , kFALSE ));
438440 corrconfigs.push_back (fGFW ->GetCorrelatorConfig (" full {3 -3}" , " ChFull32" , kFALSE ));
@@ -526,9 +528,11 @@ struct FlowCumulantsUpc {
526528 }
527529 LOGF (info, " %d: %s %s" , i, userDefineGFWCorr.at (i).c_str (), userDefineGFWName.at (i).c_str ());
528530 corrconfigs.push_back (fGFW ->GetCorrelatorConfig (userDefineGFWCorr.at (i).c_str (), userDefineGFWName.at (i).c_str (), kFALSE ));
531+ corrconfigsmc.push_back (fGFWMC ->GetCorrelatorConfig (userDefineGFWCorr.at (i).c_str (), userDefineGFWName.at (i).c_str (), kFALSE ));
529532 }
530533 }
531534 fGFW ->CreateRegions ();
535+ fGFWMC ->CreateRegions ();
532536
533537 if (cfgUseAdditionalEventCut) {
534538 fMultPVCutLow = new TF1 (" fMultPVCutLow" , " [0]+[1]*x+[2]*x*x+[3]*x*x*x+[4]*x*x*x*x - 3.5*([5]+[6]*x+[7]*x*x+[8]*x*x*x+[9]*x*x*x*x)" , 0 , 100 );
@@ -644,6 +648,8 @@ struct FlowCumulantsUpc {
644648 return ;
645649 }
646650
651+ // ... 其余代码保持不变 ...
652+
647653 void loadCorrections (uint64_t timestamp, int runNumber)
648654 {
649655 if (correctionsLoaded) {
@@ -950,7 +956,7 @@ struct FlowCumulantsUpc {
950956 registry.fill (HIST (" eventCounterMC" ), 0.5 );
951957
952958 // registry.fill(HIST("hEventCount"), 1.5);
953- float cent = 100 ;
959+ float cent = 50 ;
954960 float vtxz = 0 ;
955961
956962 vtxz = mcCollision.posZ ();
@@ -990,6 +996,7 @@ struct FlowCumulantsUpc {
990996 std::cout << " mcParticle.isPhysicalPrimary() = " << mcParticle.isPhysicalPrimary () << std::endl;
991997 continue ;
992998 }
999+
9931000 std::array<double , 3 > momentum = {mcParticle.px (), mcParticle.py (), mcParticle.pz ()};
9941001 double energy = std::sqrt (momentum[0 ] * momentum[0 ] + momentum[1 ] * momentum[1 ] + momentum[2 ] * momentum[2 ] + massPion * massPion);
9951002 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double >> protoMC (momentum[0 ], momentum[1 ], momentum[2 ], energy);
@@ -1036,6 +1043,7 @@ struct FlowCumulantsUpc {
10361043 if (withinPtPOI && withinPtRef) {
10371044 fGFWMC ->Fill (eta, fPtAxis ->FindBin (pt) - 1 , phi, wacc * weff, 4 );
10381045 }
1046+ std::cout << " successfully filled" << std::endl;
10391047 }
10401048 registry.fill (HIST (" hTrackCorrection2dMC" ), mcParticles.size (), nTracksCorrected);
10411049 // Filling Flow Container
0 commit comments