@@ -125,6 +125,7 @@ struct V0ptHadPiKaProt {
125125 ConfigurableAxis nchAxis1{" nchAxis1" , {500 , 0.5 , 500.5 }, " Axis for multiplicity of GlobalTracks/PVTracks" };
126126 ConfigurableAxis nchAxis2{" nchAxis2" , {1000 , 0.5 , 30000.5 }, " Axis for multiplicity of FT0A/FT0C/FV0A" };
127127 ConfigurableAxis nchAxis3{" nchAxis3" , {1000 , 0.5 , 100000.5 }, " Axis for multiplicity of FT0A/FT0C/FV0A" };
128+ ConfigurableAxis occuAxis{" occuAxis" , {1000 , 0.5 , 50000.5 }, " Axis for occupancy of events" };
128129 Configurable<float > cfgCutPtLower{" cfgCutPtLower" , 0 .2f , " Lower pT cut" };
129130 Configurable<float > cfgCutPtLowerProt{" cfgCutPtLowerProt" , 0 .2f , " Lower pT cut" };
130131 Configurable<float > cfgCutPtUpper{" cfgCutPtUpper" , 10 .0f , " Higher pT cut for inclusive hadron analysis" };
@@ -154,6 +155,8 @@ struct V0ptHadPiKaProt {
154155 Configurable<bool > cfgLoadPhiWeights{" cfgLoadPhiWeights" , false , " Load phi weights from CCDB to take care of non-uniform acceptance" };
155156 Configurable<bool > cfgLoadPtEffWeights{" cfgLoadPtEffWeights" , false , " Load pt-dependent efficiency weights from CCDB to take care of detector inefficiency" };
156157 Configurable<int > cfgMinNoOfParticles{" cfgMinNoOfParticles" , 4 , " Minimum no. of particles for calculating v02(pT)" };
158+ Configurable<int > cfgV02WeightedFill{" cfgV02WeightedFill" , false , " Fill profiles related to v2 with multiplicity-based weights?" };
159+ Configurable<bool > cfgUseDominanceCut{" cfgUseDominanceCut" , true , " Require particle selecting species' nSigma to be smallest among other two" };
157160
158161 // pT dep DCAxy and DCAz cuts
159162 Configurable<bool > cfgUsePtDepDCAxy{" cfgUsePtDepDCAxy" , true , " Use pt-dependent DCAxy cut" };
@@ -206,6 +209,7 @@ struct V0ptHadPiKaProt {
206209 HistogramRegistry histosAnalysis{" Histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
207210 std::vector<std::vector<std::shared_ptr<TProfile2D>>> subSample;
208211 std::vector<std::vector<std::shared_ptr<TProfile2D>>> subSampleV02;
212+ std::vector<std::vector<std::shared_ptr<TProfile2D>>> subSampleV02_weighted;
209213 TRandom3* funRndm = new TRandom3(0 );
210214
211215 // Phi weight histograms initialization
@@ -304,6 +308,8 @@ struct V0ptHadPiKaProt {
304308 histos.add (" hEventStatData" , " Data Event statistics" , kTH1F , {{10 , 0 .0f , 10 .0f }});
305309 histos.add (" hZvtx_after_sel" , " ;Z (cm)" , kTH1F , {{240 , -12 , 12 }});
306310 histos.add (" hCentrality" , " ;centrality (%)" , kTH1F , {{90 , 0 , 90 }});
311+ histos.add (" hOccupancyVsCentrality_before" , " " , kTH2F , {{90 , 0 , 90 }, occuAxis});
312+ histos.add (" hOccupancyVsCentrality_after" , " " , kTH2F , {{90 , 0 , 90 }, occuAxis});
307313 // before selection
308314 histos.add (" MultCorrelationPlots/BeforeSelection/His2D_globalTracks_PVTracks_beforeSel" , " " , {HistType::kTH2D , {nchAxis1, nchAxis1}});
309315 histos.add (" MultCorrelationPlots/BeforeSelection/His2D_globalTracks_centFT0C_beforeSel" , " " , {HistType::kTH2D , {centAxis, nchAxis1}});
@@ -393,12 +399,21 @@ struct V0ptHadPiKaProt {
393399 histos.add (" Prof_XYZ_prot" , " " , {HistType::kTProfile2D , {centAxis, ptAxis}});
394400 histos.add (" Prof_Z_prot" , " " , {HistType::kTProfile2D , {centAxis, ptAxis}});
395401
402+ // check with different normalization for event averaging
403+ if (cfgV02WeightedFill) {
404+ histos.add (" Prof_XY_weighted" , " " , {HistType::kTProfile2D , {centAxis, noAxis}});
405+ histos.add (" Prof_XYZ_weighted_had" , " " , {HistType::kTProfile2D , {centAxis, ptAxis}});
406+ histos.add (" Prof_Z_weighted_had" , " " , {HistType::kTProfile2D , {centAxis, ptAxis}});
407+ }
408+
396409 // initial array
397410 subSample.resize (cfgNSubsample);
398411 subSampleV02.resize (cfgNSubsample);
412+ subSampleV02_weighted.resize (cfgNSubsample);
399413 for (int i = 0 ; i < cfgNSubsample; i++) {
400414 subSample[i].resize (20 );
401415 subSampleV02[i].resize (9 );
416+ subSampleV02_weighted[i].resize (9 );
402417 }
403418 for (int i = 0 ; i < cfgNSubsample; i++) {
404419 subSample[i][0 ] = std::get<std::shared_ptr<TProfile2D>>(histos.add (Form (" subSample_%d/Prof_A_had" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
@@ -434,6 +449,18 @@ struct V0ptHadPiKaProt {
434449 subSampleV02[i][6 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_%d/Prof_Z_ka" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
435450 subSampleV02[i][7 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_%d/Prof_XYZ_prot" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
436451 subSampleV02[i][8 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_%d/Prof_Z_prot" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
452+
453+ if (cfgV02WeightedFill) {
454+ subSampleV02_weighted[i][0 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_XY_weighted" , i), " " , {HistType::kTProfile2D , {centAxis, noAxis}}));
455+ subSampleV02_weighted[i][1 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_XYZ_weighted_had" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
456+ subSampleV02_weighted[i][2 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_Z_weighted_had" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
457+ subSampleV02_weighted[i][3 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_XYZ_weighted_pi" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
458+ subSampleV02_weighted[i][4 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_Z_weighted_pi" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
459+ subSampleV02_weighted[i][5 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_XYZ_weighted_ka" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
460+ subSampleV02_weighted[i][6 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_Z_weighted_ka" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
461+ subSampleV02_weighted[i][7 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_XYZ_weighted_prot" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
462+ subSampleV02_weighted[i][8 ] = std::get<std::shared_ptr<TProfile2D>>(histosAnalysis.add (Form (" subSampleV02_weighted_%d/Prof_Z_weighted_prot" , i), " " , {HistType::kTProfile2D , {centAxis, ptAxis}}));
463+ }
437464 }
438465
439466 if (cfgEvSelMultCorrelation) {
@@ -531,7 +558,14 @@ struct V0ptHadPiKaProt {
531558 flag = 1 ;
532559 }
533560 } else {
534- if (!(flag2 > 1 ) && !(combNSigmaPr > combNSigmaPi) && !(combNSigmaPr > combNSigmaKa)) {
561+
562+ bool passDominance = true ;
563+ // Apply condition only if enabled
564+ if (cfgUseDominanceCut) {
565+ passDominance = !(combNSigmaPr > combNSigmaPi) && !(combNSigmaPr > combNSigmaKa);
566+ }
567+
568+ if (!(flag2 > 1 ) && passDominance) {
535569 if (combNSigmaPr < cfgnSigmaCutCombTPCTOF) {
536570 flag = 1 ;
537571 }
@@ -578,7 +612,14 @@ struct V0ptHadPiKaProt {
578612 flag = 1 ;
579613 }
580614 } else {
581- if (!(flag2 > 1 ) && !(combNSigmaPi > combNSigmaPr) && !(combNSigmaPi > combNSigmaKa)) {
615+
616+ bool passDominance = true ;
617+ // Apply condition only if enabled
618+ if (cfgUseDominanceCut) {
619+ passDominance = !(combNSigmaPi > combNSigmaPr) && !(combNSigmaPi > combNSigmaKa);
620+ }
621+
622+ if (!(flag2 > 1 ) && passDominance) {
582623 if (combNSigmaPi < cfgnSigmaCutCombTPCTOF) {
583624 flag = 1 ;
584625 }
@@ -625,7 +666,14 @@ struct V0ptHadPiKaProt {
625666 flag = 1 ;
626667 }
627668 } else {
628- if (!(flag2 > 1 ) && !(combNSigmaKa > combNSigmaPi) && !(combNSigmaKa > combNSigmaPr)) {
669+
670+ bool passDominance = true ;
671+ // Apply condition only if enabled
672+ if (cfgUseDominanceCut) {
673+ passDominance = !(combNSigmaKa > combNSigmaPi) && !(combNSigmaKa > combNSigmaPr);
674+ }
675+
676+ if (!(flag2 > 1 ) && passDominance) {
629677 if (combNSigmaKa < cfgnSigmaCutCombTPCTOF) {
630678 flag = 1 ;
631679 }
@@ -764,14 +812,18 @@ struct V0ptHadPiKaProt {
764812 return 0 ;
765813 }
766814
815+ int occupancy = coll.trackOccupancyInTimeRange ();
816+ histos.fill (HIST (" hOccupancyVsCentrality_before" ), occupancy);
817+
767818 histos.fill (HIST (" hEventStatData" ), 6.5 );
768819 // events with selection bits based on occupancy time pattern
769820 if (cfgEvSelUseOcuppancyTimeCut && !(coll.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ))) {
770821 return 0 ;
771822 }
772823
824+ histos.fill (HIST (" hOccupancyVsCentrality_after" ), occupancy);
825+
773826 histos.fill (HIST (" hEventStatData" ), 7.5 );
774- int occupancy = coll.trackOccupancyInTimeRange ();
775827 if (cfgEvSelSetOcuppancyRange && (occupancy < cfgMinOccupancy || occupancy > cfgMaxOccupancy)) {
776828 return 0 ;
777829 }
@@ -1188,27 +1240,25 @@ struct V0ptHadPiKaProt {
11881240 }
11891241 double weight = phiweight * effweight;
11901242
1191- // fill subevent C for v2^2 in v02(pT)
11921243 if (track.sign () != 0 && trkPt < cfgCutPtMaxForV02) {
11931244 histos.fill (HIST (" h3DVtxZetaPhi" ), coll.posZ (), trkEta, trkPhi);
1245+
1246+ // fill subevent C for v2^2 in v02(pT)
11941247 if (cfgCutEtaWindowB < trkEta && trkEta < cfgCutEta) {
11951248 vecQInWinC += weight * TComplex (TMath::Cos (2 . * trkPhi), TMath::Sin (2 . * trkPhi));
11961249 nSumInWinC += weight;
11971250 }
1198- }
1199- // fill subevent A for v2^2 in v02(pT)
1200- if (track.sign () != 0 && trkPt < cfgCutPtMaxForV02) {
1251+
1252+ // fill subevent A for v2^2 in v02(pT)
12011253 if (-1.0 * cfgCutEta < trkEta && trkEta < -1.0 * cfgCutEtaWindowB) {
12021254 vecQInWinA += weight * TComplex (TMath::Cos (2 . * trkPhi), TMath::Sin (2 . * trkPhi));
12031255 nSumInWinA += weight;
12041256 }
1205- }
12061257
1207- // fill subevent B for f(pT) in v02(pT)
1208- if (track.sign () != 0 && trkPt < cfgCutPtMaxForV02) {
1258+ // fill subevent B for f(pT) in v02(pT)
12091259 if (std::abs (trkEta) < cfgCutEtaWindowB) {
12101260 fPtProfileHadInWinB ->Fill (trkPt, effweight);
1211- nSumInWinB += 1.0 ;
1261+ nSumInWinB += effweight ;
12121262 }
12131263 }
12141264
@@ -1292,6 +1342,7 @@ struct V0ptHadPiKaProt {
12921342 effweightKaon = 1.0 / getEffKaon (track); // NUE weight for kaon
12931343 effweightProton = 1.0 / getEffProton (track); // NUE weight for proton
12941344 }
1345+
12951346 // fill subevent B for ***identified particles'*** f(pT) in v02(pT)
12961347 if (track.sign () != 0 && trkPt < cfgCutPtMaxForV02) {
12971348 if (std::abs (trkEta) < cfgCutEtaWindowB) {
@@ -1379,30 +1430,48 @@ struct V0ptHadPiKaProt {
13791430 if (nSumInWinA > cfgMinNoOfParticles && nSumInWinB > cfgMinNoOfParticles && nSumInWinC > cfgMinNoOfParticles) {
13801431 double twoParCorr = (vecQInWinA * TComplex::Conjugate (vecQInWinC)).Re ();
13811432 twoParCorr *= 1.0 / (nSumInWinA * nSumInWinC);
1382- histos.get <TProfile2D>(HIST (" Prof_XY" ))->Fill (cent, 0.5 , twoParCorr);
13831433
1434+ histos.get <TProfile2D>(HIST (" Prof_XY" ))->Fill (cent, 0.5 , twoParCorr);
13841435 subSampleV02[sampleIndex][0 ]->Fill (cent, 0.5 , twoParCorr);
13851436
1437+ if (cfgV02WeightedFill) {
1438+ histos.get <TProfile2D>(HIST (" Prof_XY_weighted" ))->Fill (cent, 0.5 , twoParCorr, (nSumInWinA * nSumInWinC));
1439+ subSampleV02_weighted[sampleIndex][0 ]->Fill (cent, 0.5 , twoParCorr, (nSumInWinA * nSumInWinC));
1440+ }
13861441 // hadrons
13871442 for (int i = 0 ; i < cfgNbinsV02pt; i++) {
13881443 double threeParCorrHad = (vecQInWinA * TComplex::Conjugate (vecQInWinC) * fPtProfileHadInWinB ->GetBinContent (i + 1 )).Re ();
13891444 threeParCorrHad *= 1.0 / (nSumInWinA * nSumInWinC * nSumInWinB);
1445+
13901446 histos.get <TProfile2D>(HIST (" Prof_XYZ_had" ))->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), threeParCorrHad);
13911447 histos.get <TProfile2D>(HIST (" Prof_Z_had" ))->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), (fPtProfileHadInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1392-
13931448 subSampleV02[sampleIndex][1 ]->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), threeParCorrHad);
13941449 subSampleV02[sampleIndex][2 ]->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), (fPtProfileHadInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1450+
1451+ if (cfgV02WeightedFill) {
1452+ histos.get <TProfile2D>(HIST (" Prof_XYZ_weighted_had" ))->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), threeParCorrHad, (nSumInWinA * nSumInWinC));
1453+ histos.get <TProfile2D>(HIST (" Prof_Z_weighted_had" ))->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), (fPtProfileHadInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1454+ subSampleV02_weighted[sampleIndex][1 ]->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), threeParCorrHad, (nSumInWinA * nSumInWinC));
1455+ subSampleV02_weighted[sampleIndex][2 ]->Fill (cent, fPtProfileHadInWinB ->GetBinCenter (i + 1 ), (fPtProfileHadInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1456+ }
13951457 }
13961458
13971459 // pions
13981460 for (int i = 0 ; i < cfgNbinsV02pt; i++) {
13991461 double threeParCorrPi = (vecQInWinA * TComplex::Conjugate (vecQInWinC) * fPtProfilePiInWinB ->GetBinContent (i + 1 )).Re ();
14001462 threeParCorrPi *= 1.0 / (nSumInWinA * nSumInWinC * nSumInWinB);
1463+
14011464 histos.get <TProfile2D>(HIST (" Prof_XYZ_pi" ))->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), threeParCorrPi);
14021465 histos.get <TProfile2D>(HIST (" Prof_Z_pi" ))->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), (fPtProfilePiInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1403-
14041466 subSampleV02[sampleIndex][3 ]->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), threeParCorrPi);
14051467 subSampleV02[sampleIndex][4 ]->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), (fPtProfilePiInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1468+
1469+ if (cfgV02WeightedFill) {
1470+ histos.get <TProfile2D>(HIST (" Prof_XYZ_weighted_pi" ))->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), threeParCorrPi, (nSumInWinA * nSumInWinC));
1471+ histos.get <TProfile2D>(HIST (" Prof_Z_weighted_pi" ))->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), (fPtProfilePiInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1472+ subSampleV02_weighted[sampleIndex][3 ]->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), threeParCorrPi, (nSumInWinA * nSumInWinC));
1473+ subSampleV02_weighted[sampleIndex][4 ]->Fill (cent, fPtProfilePiInWinB ->GetBinCenter (i + 1 ), (fPtProfilePiInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1474+ }
14061475 }
14071476
14081477 // kaons
@@ -1414,6 +1483,13 @@ struct V0ptHadPiKaProt {
14141483
14151484 subSampleV02[sampleIndex][5 ]->Fill (cent, fPtProfileKaInWinB ->GetBinCenter (i + 1 ), threeParCorrKa);
14161485 subSampleV02[sampleIndex][6 ]->Fill (cent, fPtProfileKaInWinB ->GetBinCenter (i + 1 ), (fPtProfileKaInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1486+
1487+ if (cfgV02WeightedFill) {
1488+ histos.get <TProfile2D>(HIST (" Prof_XYZ_weighted_ka" ))->Fill (cent, fPtProfileKaInWinB ->GetBinCenter (i + 1 ), threeParCorrKa, (nSumInWinA * nSumInWinC));
1489+ histos.get <TProfile2D>(HIST (" Prof_Z_weighted_ka" ))->Fill (cent, fPtProfileKaInWinB ->GetBinCenter (i + 1 ), (fPtProfileKaInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1490+ subSampleV02_weighted[sampleIndex][5 ]->Fill (cent, fPtProfileKaInWinB ->GetBinCenter (i + 1 ), threeParCorrKa, (nSumInWinA * nSumInWinC));
1491+ subSampleV02_weighted[sampleIndex][6 ]->Fill (cent, fPtProfileKaInWinB ->GetBinCenter (i + 1 ), (fPtProfileKaInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1492+ }
14171493 }
14181494
14191495 // protons
@@ -1425,6 +1501,13 @@ struct V0ptHadPiKaProt {
14251501
14261502 subSampleV02[sampleIndex][7 ]->Fill (cent, fPtProfileProtInWinB ->GetBinCenter (i + 1 ), threeParCorrProt);
14271503 subSampleV02[sampleIndex][8 ]->Fill (cent, fPtProfileProtInWinB ->GetBinCenter (i + 1 ), (fPtProfileProtInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1504+
1505+ if (cfgV02WeightedFill) {
1506+ histos.get <TProfile2D>(HIST (" Prof_XYZ_weighted_prot" ))->Fill (cent, fPtProfileProtInWinB ->GetBinCenter (i + 1 ), threeParCorrProt, (nSumInWinA * nSumInWinC));
1507+ histos.get <TProfile2D>(HIST (" Prof_Z_weighted_prot" ))->Fill (cent, fPtProfileProtInWinB ->GetBinCenter (i + 1 ), (fPtProfileProtInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1508+ subSampleV02_weighted[sampleIndex][7 ]->Fill (cent, fPtProfileProtInWinB ->GetBinCenter (i + 1 ), threeParCorrProt, (nSumInWinA * nSumInWinC));
1509+ subSampleV02_weighted[sampleIndex][8 ]->Fill (cent, fPtProfileProtInWinB ->GetBinCenter (i + 1 ), (fPtProfileProtInWinB ->GetBinContent (i + 1 ) / nSumInWinB));
1510+ }
14281511 }
14291512 }
14301513
0 commit comments