@@ -62,6 +62,12 @@ using namespace o2::framework;
6262using namespace o2 ::framework::expressions;
6363using namespace o2 ::aod::track;
6464
65+ enum {
66+ kGlobalplusITSonly = 0 ,
67+ kGlobalonly ,
68+ kITSonly
69+ };
70+
6571struct Phik0shortanalysis {
6672 // Histograms are defined with HistogramRegistry
6773 HistogramRegistry dataEventHist{" dataEventHist" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
@@ -326,9 +332,10 @@ struct Phik0shortanalysis {
326332 dataEventHist.add (" hVertexZ" , " hVertexZ" , kTH1F , {vertexZAxis});
327333 dataEventHist.add (" hMultiplicityPercent" , " Multiplicity Percentile" , kTH1F , {multAxis});
328334 dataEventHist.add (" hMultiplicityPercentWithPhi" , " Multiplicity Percentile in Events with a Phi Candidate" , kTH1F , {multAxis});
335+ dataEventHist.add (" h2VertexZvsMult" , " Vertex Z vs Multiplicity Percentile" , kTH2F , {vertexZAxis, binnedmultAxis});
329336
330337 // Eta distribution for dN/deta values estimation in Data
331- dataEventHist.add (" h2EtaDistribution " , " Eta vs multiplicity in Data" , kTH2F , {binnedmultAxis, etaAxis});
338+ dataEventHist.add (" h4EtaDistribution " , " Eta vs multiplicity in Data" , kTHnSparseF , {vertexZAxis, binnedmultAxis, etaAxis, { 3 , - 0 . 5f , 2 . 5f } });
332339
333340 // Number of MC events per selection for Rec and Gen
334341 mcEventHist.add (" hRecMCEventSelection" , " hRecMCEventSelection" , kTH1F , {{9 , -0 .5f , 8 .5f }});
@@ -350,23 +357,26 @@ struct Phik0shortanalysis {
350357 mcEventHist.get <TH1>(HIST (" hGenMCEventSelection" ))->GetXaxis ()->SetBinLabel (5 , " With at least a reco coll" );
351358
352359 // MC Event information for Rec and Gen
353- mcEventHist.add (" hRecMCVertexZ" , " hRecMCVertexZ" , kTH1F , {vertexZAxis});
354- mcEventHist.add (" hRecMCMultiplicityPercent" , " RecMC Multiplicity Percentile" , kTH1F , {multAxis});
355- mcEventHist.add (" hRecMCGenMultiplicityPercent" , " RecMC Gen Multiplicity Percentile" , kTH1F , {binnedmultAxis});
356- mcEventHist.add (" hRecMCGenMultiplicityPercentWithPhi" , " RecMC Gen Multiplicity Percentile in Events with a Phi Candidate" , kTH1F , {binnedmultAxis});
360+ mcEventHist.add (" hRecoMCVertexZ" , " hRecoMCVertexZ" , kTH1F , {vertexZAxis});
361+ mcEventHist.add (" hUnbinnedRecoMCMultiplicityPercent" , " RecoMC Multiplicity Percentile" , kTH1F , {multAxis});
362+ mcEventHist.add (" hRecoMCMultiplicityPercent" , " RecoMC Multiplicity Percentile" , kTH1F , {binnedmultAxis});
363+ mcEventHist.add (" hRecoMCMultiplicityPercentWithPhi" , " RecoMC Multiplicity Percentile in Events with a Phi Candidate" , kTH1F , {binnedmultAxis});
364+ mcEventHist.add (" h2RecoMCVertexZvsMult" , " RecoMC Vertex Z vs Multiplicity Percentile" , kTH2F , {vertexZAxis, binnedmultAxis});
357365
358366 mcEventHist.add (" hGenMCVertexZ" , " hGenMCVertexZ" , kTH1F , {vertexZAxis});
359367 mcEventHist.add (" hGenMCMultiplicityPercent" , " GenMC Multiplicity Percentile" , kTH1F , {binnedmultAxis});
360368 mcEventHist.add (" hGenMCAssocRecoMultiplicityPercent" , " GenMC AssocReco Multiplicity Percentile" , kTH1F , {binnedmultAxis});
361369 mcEventHist.add (" hGenMCRecoMultiplicityPercent" , " GenMCReco Multiplicity Percentile" , kTH1F , {binnedmultAxis});
370+ mcEventHist.add (" h2GenMCRecoVertexZvsMult" , " GenMCReco Vertex Z vs Multiplicity Percentile" , kTH2F , {vertexZAxis, binnedmultAxis});
362371
363372 // Eta distribution for dN/deta values estimation in MC
364- mcEventHist.add (" h2RecoMCEtaDistribution" , " Eta vs multiplicity in MCReco" , kTH2F , {binnedmultAxis, etaAxis});
365- mcEventHist.add (" h2RecoCheckMCEtaDistribution" , " Eta vs multiplicity in MCReco Check" , kTH2F , {binnedmultAxis, etaAxis});
373+ mcEventHist.add (" h4RecoMCEtaDistribution" , " Eta vs multiplicity in MCReco" , kTHnSparseF , {vertexZAxis, binnedmultAxis, etaAxis, {3 , -0 .5f , 2 .5f }});
374+ mcEventHist.add (" h4RecoCheckMCEtaDistribution" , " Eta vs multiplicity in MCReco Check" , kTHnSparseF , {vertexZAxis, binnedmultAxis, etaAxis, {3 , -0 .5f , 2 .5f }});
375+
366376 mcEventHist.add (" h2GenMCEtaDistribution" , " Eta vs multiplicity in MCGen" , kTH2F , {binnedmultAxis, etaAxis});
367377 mcEventHist.add (" h2GenMCEtaDistributionAssocReco" , " Eta vs multiplicity in MCGen Assoc Reco" , kTH2F , {binnedmultAxis, etaAxis});
368- mcEventHist.add (" h2GenMCEtaDistributionReco " , " Eta vs multiplicity in MCGen Reco" , kTH2F , {binnedmultAxis, etaAxis});
369- mcEventHist.add (" h2GenMCEtaDistributionRecoCheck " , " Eta vs multiplicity in MCGen Reco Check" , kTH2F , {binnedmultAxis, etaAxis});
378+ mcEventHist.add (" h4GenMCEtaDistributionReco " , " Eta vs multiplicity in MCGen Reco" , kTHnSparseF , {vertexZAxis, binnedmultAxis, etaAxis, { 3 , - 0 . 5f , 2 . 5f } });
379+ mcEventHist.add (" h4GenMCEtaDistributionRecoCheck " , " Eta vs multiplicity in MCGen Reco Check" , kTHnSparseF , {vertexZAxis, binnedmultAxis, etaAxis, { 3 , - 0 . 5f , 2 . 5f } });
370380
371381 // Phi topological/PID cuts
372382 dataPhiHist.add (" h2DauTracksPhiDCAxyPreCutData" , " Dcaxy distribution vs pt before DCAxy cut" , kTH2F , {{100 , 0.0 , 5.0 , " #it{p}_{T} (GeV/#it{c})" }, {2000 , -0.05 , 0.05 , " DCA_{xy} (cm)" }});
@@ -666,9 +676,9 @@ struct Phik0shortanalysis {
666676 if (fillMethodSingleWeight)
667677 getPhiPurityFunctionsFromCCDB ();
668678
669- if (applyEfficiency)
679+ if (applyEfficiency) {
670680 getEfficiencyMapsFromCCDB ();
671- else {
681+ } else {
672682 effMapPhi = nullptr ;
673683 effMapK0S = nullptr ;
674684 effMapPionTPC = nullptr ;
@@ -718,7 +728,7 @@ struct Phik0shortanalysis {
718728 return false ;
719729 if (QA) {
720730 mcEventHist.fill (HIST (" hRecMCEventSelection" ), 4 ); // vertex-Z selected
721- mcEventHist.fill (HIST (" hRecMCVertexZ " ), collision.posZ ());
731+ mcEventHist.fill (HIST (" hRecoMCVertexZ " ), collision.posZ ());
722732 }
723733 if (!collision.isInelGt0 ())
724734 return false ;
@@ -1440,15 +1450,15 @@ struct Phik0shortanalysis {
14401450 return ;
14411451
14421452 float multiplicity = collision.centFT0M ();
1443- mcEventHist.fill (HIST (" hRecMCMultiplicityPercent " ), multiplicity);
1453+ mcEventHist.fill (HIST (" hUnbinnedRecoMCMultiplicityPercent " ), multiplicity);
14441454
14451455 if (!collision.has_mcCollision ())
14461456 return ;
14471457 mcEventHist.fill (HIST (" hRecMCEventSelection" ), 6 ); // with at least a gen collision
14481458
14491459 const auto & mcCollision = collision.mcCollision_as <MCCollisions>();
14501460 float genmultiplicity = mcCollision.centFT0M ();
1451- mcEventHist.fill (HIST (" hRecMCGenMultiplicityPercent " ), genmultiplicity);
1461+ mcEventHist.fill (HIST (" hRecoMCMultiplicityPercent " ), genmultiplicity);
14521462
14531463 // Defining positive and negative tracks for phi reconstruction
14541464 auto posThisColl = posMCTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
@@ -1781,7 +1791,7 @@ struct Phik0shortanalysis {
17811791
17821792 const auto & mcCollision = collision.mcCollision_as <MCCollisions>();
17831793 float genmultiplicity = mcCollision.centFT0M ();
1784- mcEventHist.fill (HIST (" hRecMCGenMultiplicityPercent " ), genmultiplicity);
1794+ mcEventHist.fill (HIST (" hRecoMCMultiplicityPercent " ), genmultiplicity);
17851795
17861796 // Defining positive and negative tracks for phi reconstruction
17871797 auto posThisColl = posMCTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
@@ -1815,7 +1825,7 @@ struct Phik0shortanalysis {
18151825
18161826 if (!isCountedPhi) {
18171827 mcEventHist.fill (HIST (" hRecMCEventSelection" ), 7 ); // at least a Phi candidate in the event
1818- mcEventHist.fill (HIST (" hRecMCGenMultiplicityPercentWithPhi " ), genmultiplicity);
1828+ mcEventHist.fill (HIST (" hRecoMCMultiplicityPercentWithPhi " ), genmultiplicity);
18191829 isCountedPhi = true ;
18201830 }
18211831
@@ -2440,11 +2450,17 @@ struct Phik0shortanalysis {
24402450 if (!eventHasPhi (posThisColl, negThisColl))
24412451 return ;
24422452
2443- float multiplicity = collision.centFT0M ();
2444- dataEventHist.fill (HIST (" hMultiplicityPercent " ), multiplicity );
2453+ dataEventHist. fill ( HIST ( " hMultiplicityPercent " ), collision.centFT0M () );
2454+ dataEventHist.fill (HIST (" h2VertexZvsMult " ), collision. posZ (), collision. centFT0M () );
24452455
2446- for (const auto & track : filteredTracks)
2447- dataEventHist.fill (HIST (" h2EtaDistribution" ), multiplicity, track.eta ());
2456+ for (const auto & track : filteredTracks) {
2457+ dataEventHist.fill (HIST (" h4EtaDistribution" ), collision.posZ (), collision.centFT0M (), track.eta (), kGlobalplusITSonly );
2458+ if (track.hasTPC ()) {
2459+ dataEventHist.fill (HIST (" h4EtaDistribution" ), collision.posZ (), collision.centFT0M (), track.eta (), kGlobalonly );
2460+ } else {
2461+ dataEventHist.fill (HIST (" h4EtaDistribution" ), collision.posZ (), collision.centFT0M (), track.eta (), kITSonly );
2462+ }
2463+ }
24482464 }
24492465
24502466 PROCESS_SWITCH (Phik0shortanalysis, processdNdetaWPhiData, " Process function for dN/deta values in Data" , false );
@@ -2464,8 +2480,8 @@ struct Phik0shortanalysis {
24642480 if (filterOnMcPhi && !eventHasMCPhi (mcParticlesThisColl))
24652481 return ;
24662482
2467- float genmultiplicity = mcCollision.centFT0M ();
2468- mcEventHist.fill (HIST (" hRecMCGenMultiplicityPercent " ), genmultiplicity );
2483+ mcEventHist. fill ( HIST ( " hRecoMCMultiplicityPercent " ), mcCollision.centFT0M () );
2484+ mcEventHist.fill (HIST (" h2RecoMCVertexZvsMult " ), collision. posZ (), mcCollision. centFT0M () );
24692485
24702486 for (const auto & track : filteredMCTracks) {
24712487 if (!track.has_mcParticle ())
@@ -2475,14 +2491,19 @@ struct Phik0shortanalysis {
24752491 if (!mcTrack.isPhysicalPrimary () || std::abs (mcTrack.eta ()) > trackConfigs.etaMax )
24762492 continue ;
24772493
2478- mcEventHist.fill (HIST (" h2RecoMCEtaDistribution" ), genmultiplicity, mcTrack.eta ());
2494+ mcEventHist.fill (HIST (" h4RecoMCEtaDistribution" ), collision.posZ (), mcCollision.centFT0M (), mcTrack.eta (), kGlobalplusITSonly );
2495+ if (track.hasTPC ()) {
2496+ mcEventHist.fill (HIST (" h4RecoMCEtaDistribution" ), collision.posZ (), mcCollision.centFT0M (), mcTrack.eta (), kGlobalonly );
2497+ } else {
2498+ mcEventHist.fill (HIST (" h4RecoMCEtaDistribution" ), collision.posZ (), mcCollision.centFT0M (), mcTrack.eta (), kITSonly );
2499+ }
24792500 }
24802501
24812502 for (const auto & mcParticle : mcParticlesThisColl) {
24822503 if (!isGenParticleCharged (mcParticle))
24832504 continue ;
24842505
2485- mcEventHist.fill (HIST (" h2GenMCEtaDistributionReco " ), genmultiplicity , mcParticle.eta ());
2506+ mcEventHist.fill (HIST (" h4GenMCEtaDistributionReco " ), collision. posZ (), mcCollision. centFT0M () , mcParticle.eta ());
24862507 }
24872508 }
24882509
@@ -2497,12 +2518,11 @@ struct Phik0shortanalysis {
24972518 if (filterOnMcPhi && !eventHasMCPhi (mcParticles))
24982519 return ;
24992520
2500- float genmultiplicity = mcCollision.centFT0M ();
2501-
25022521 uint64_t numberAssocColl = 0 ;
25032522 for (const auto & collision : collisions) {
25042523 if (acceptEventQA<true >(collision, false )) {
2505- mcEventHist.fill (HIST (" hGenMCRecoMultiplicityPercent" ), genmultiplicity);
2524+ mcEventHist.fill (HIST (" hGenMCRecoMultiplicityPercent" ), mcCollision.centFT0M ());
2525+ mcEventHist.fill (HIST (" h2GenMCRecoVertexZvsMult" ), collision.posZ (), mcCollision.centFT0M ());
25062526
25072527 auto filteredMCTracksThisColl = filteredMCTracks.sliceBy (preslices.perColl , collision.globalIndex ());
25082528 for (const auto & track : filteredMCTracksThisColl) {
@@ -2513,31 +2533,36 @@ struct Phik0shortanalysis {
25132533 if (!mcTrack.isPhysicalPrimary () || std::abs (mcTrack.eta ()) > trackConfigs.etaMax )
25142534 continue ;
25152535
2516- mcEventHist.fill (HIST (" h2RecoCheckMCEtaDistribution" ), genmultiplicity, mcTrack.eta ());
2536+ mcEventHist.fill (HIST (" h4RecoCheckMCEtaDistribution" ), collision.posZ (), mcCollision.centFT0M (), mcTrack.eta (), kGlobalplusITSonly );
2537+ if (track.hasTPC ()) {
2538+ mcEventHist.fill (HIST (" h4RecoCheckMCEtaDistribution" ), collision.posZ (), mcCollision.centFT0M (), mcTrack.eta (), kGlobalonly );
2539+ } else {
2540+ mcEventHist.fill (HIST (" h4RecoCheckMCEtaDistribution" ), collision.posZ (), mcCollision.centFT0M (), mcTrack.eta (), kITSonly );
2541+ }
25172542 }
25182543
25192544 for (const auto & mcParticle : mcParticles) {
25202545 if (!isGenParticleCharged (mcParticle))
25212546 continue ;
25222547
2523- mcEventHist.fill (HIST (" h2GenMCEtaDistributionRecoCheck " ), genmultiplicity , mcParticle.eta ());
2548+ mcEventHist.fill (HIST (" h4GenMCEtaDistributionRecoCheck " ), collision. posZ (), mcCollision. centFT0M () , mcParticle.eta ());
25242549 }
25252550
25262551 numberAssocColl++;
25272552 }
25282553 }
25292554
2530- mcEventHist.fill (HIST (" hGenMCMultiplicityPercent" ), genmultiplicity );
2555+ mcEventHist.fill (HIST (" hGenMCMultiplicityPercent" ), mcCollision. centFT0M () );
25312556 if (numberAssocColl > 0 )
2532- mcEventHist.fill (HIST (" hGenMCAssocRecoMultiplicityPercent" ), genmultiplicity );
2557+ mcEventHist.fill (HIST (" hGenMCAssocRecoMultiplicityPercent" ), mcCollision. centFT0M () );
25332558
25342559 for (const auto & mcParticle : mcParticles) {
25352560 if (!isGenParticleCharged (mcParticle))
25362561 continue ;
25372562
2538- mcEventHist.fill (HIST (" h2GenMCEtaDistribution" ), genmultiplicity , mcParticle.eta ());
2563+ mcEventHist.fill (HIST (" h2GenMCEtaDistribution" ), mcCollision. centFT0M () , mcParticle.eta ());
25392564 if (numberAssocColl > 0 )
2540- mcEventHist.fill (HIST (" h2GenMCEtaDistributionAssocReco" ), genmultiplicity , mcParticle.eta ());
2565+ mcEventHist.fill (HIST (" h2GenMCEtaDistributionAssocReco" ), mcCollision. centFT0M () , mcParticle.eta ());
25412566 }
25422567 }
25432568
@@ -2674,7 +2699,7 @@ struct Phik0shortanalysis {
26742699
26752700 const auto & mcCollision = collision.mcCollision_as <MCCollisions>();
26762701 float genmultiplicity = mcCollision.centFT0M ();
2677- mcEventHist.fill (HIST (" hRecMCGenMultiplicityPercent " ), genmultiplicity);
2702+ mcEventHist.fill (HIST (" hRecoMCMultiplicityPercent " ), genmultiplicity);
26782703
26792704 // Defining positive and negative tracks for phi reconstruction
26802705 auto posThisColl = posMCTracks->sliceByCached (aod::track::collisionId, collision.globalIndex (), cache);
@@ -2706,7 +2731,7 @@ struct Phik0shortanalysis {
27062731
27072732 if (!isCountedPhi) {
27082733 mcEventHist.fill (HIST (" hRecMCEventSelection" ), 7 ); // at least a Phi candidate in the event
2709- mcEventHist.fill (HIST (" hRecMCGenMultiplicityPercentWithPhi " ), genmultiplicity);
2734+ mcEventHist.fill (HIST (" hRecoMCMultiplicityPercentWithPhi " ), genmultiplicity);
27102735 isCountedPhi = true ;
27112736 }
27122737
0 commit comments