@@ -339,7 +339,8 @@ struct Phik0shortanalysis {
339339 mcEventHist.add (" h2RecMCEtaDistribution" , " Eta vs multiplicity in MCReco" , kTH2F , {binnedmultAxis, etaAxis});
340340 mcEventHist.add (" h2GenMCEtaDistribution" , " Eta vs multiplicity in MCGen" , kTH2F , {binnedmultAxis, etaAxis});
341341 mcEventHist.add (" h2GenMCEtaDistributionAssocReco" , " Eta vs multiplicity in MCGen Assoc Reco" , kTH2F , {binnedmultAxis, etaAxis});
342- mcEventHist.add (" h2GenMCEtaDistributionAssocReco2" , " Eta vs multiplicity in MCGen Assoc Reco" , kTH2F , {binnedmultAxis, etaAxis});
342+ mcEventHist.add (" h2GenMCEtaDistributionReco" , " Eta vs multiplicity in MCGen Reco" , kTH2F , {binnedmultAxis, etaAxis});
343+ mcEventHist.add (" h2GenMCEtaDistributionRecoCheck" , " Eta vs multiplicity in MCGen Reco Check" , kTH2F , {binnedmultAxis, etaAxis});
343344
344345 // Phi topological/PID cuts
345346 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)" }});
@@ -592,9 +593,13 @@ struct Phik0shortanalysis {
592593 mcK0SHist.add (" h3K0SMCGenAssocRecoNewProc" , " K0S in MCGen Associated MCReco" , kTH3F , {binnedmultAxis, pTK0SAxis, yAxis});
593594 mcPionHist.add (" h3PiMCGenAssocRecoNewProc" , " Pion in MCGen Associated MCReco" , kTH3F , {binnedmultAxis, pTPiAxis, yAxis});
594595
595- mcPhiHist.add (" h3PhiMCGenAssocRecoCheckNewProc" , " Phi in MCGen Associated MCReco Check" , kTH3F , {binnedmultAxis, pTPhiAxis, yAxis});
596- mcK0SHist.add (" h3K0SMCGenAssocRecoCheckNewProc" , " K0S in MCGen Associated MCReco Check" , kTH3F , {binnedmultAxis, pTK0SAxis, yAxis});
597- mcPionHist.add (" h3PiMCGenAssocRecoCheckNewProc" , " Pion in MCGen Associated MCReco Check" , kTH3F , {binnedmultAxis, pTPiAxis, yAxis});
596+ mcPhiHist.add (" h3PhiMCGenRecoNewProc" , " Phi in MCGen MCReco" , kTH3F , {binnedmultAxis, pTPhiAxis, yAxis});
597+ mcK0SHist.add (" h3K0SMCGenRecoNewProc" , " K0S in MCGen MCReco" , kTH3F , {binnedmultAxis, pTK0SAxis, yAxis});
598+ mcPionHist.add (" h3PiMCGenRecoNewProc" , " Pion in MCGen MCReco" , kTH3F , {binnedmultAxis, pTPiAxis, yAxis});
599+
600+ mcPhiHist.add (" h3PhiMCGenRecoCheckNewProc" , " Phi in MCGen MCReco Check" , kTH3F , {binnedmultAxis, pTPhiAxis, yAxis});
601+ mcK0SHist.add (" h3K0SMCGenRecoCheckNewProc" , " K0S in MCGen MCReco Check" , kTH3F , {binnedmultAxis, pTK0SAxis, yAxis});
602+ mcPionHist.add (" h3PiMCGenRecoCheckNewProc" , " Pion in MCGen MCReco Check" , kTH3F , {binnedmultAxis, pTPiAxis, yAxis});
598603
599604 // Initialize CCDB only if purity or efficiencies are requested in the task
600605 if (useCCDB) {
@@ -2405,7 +2410,7 @@ struct Phik0shortanalysis {
24052410 if (pdgTrack->Charge () == trackConfigs.cfgCutCharge )
24062411 continue ;
24072412
2408- mcEventHist.fill (HIST (" h2GenMCEtaDistributionAssocReco " ), genmultiplicity, mcParticle.eta ());
2413+ mcEventHist.fill (HIST (" h2GenMCEtaDistributionRecoCheck " ), genmultiplicity, mcParticle.eta ());
24092414 }
24102415 }
24112416
@@ -2420,17 +2425,32 @@ struct Phik0shortanalysis {
24202425 if (!eventHasMCPhi (mcParticles))
24212426 return ;
24222427
2423- bool isAssocColl = false ;
2428+ float genmultiplicity = mcCollision.centFT0M ();
2429+
2430+ uint64_t numberAssocColl = 0 ;
24242431 for (const auto & collision : collisions) {
24252432 if (acceptEventQA<true >(collision, false )) {
2426- isAssocColl = true ;
2427- break ;
2433+ mcEventHist.fill (HIST (" hGenMCRecoMultiplicityPercent" ), genmultiplicity);
2434+
2435+ for (const auto & mcParticle : mcParticles) {
2436+ if (!mcParticle.isPhysicalPrimary () || std::abs (mcParticle.eta ()) > trackConfigs.etaMax )
2437+ continue ;
2438+
2439+ auto pdgTrack = pdgDB->GetParticle (mcParticle.pdgCode ());
2440+ if (pdgTrack == nullptr )
2441+ continue ;
2442+ if (pdgTrack->Charge () == trackConfigs.cfgCutCharge )
2443+ continue ;
2444+
2445+ mcEventHist.fill (HIST (" h2GenMCEtaDistributionReco" ), genmultiplicity, mcParticle.eta ());
2446+ }
2447+
2448+ numberAssocColl++;
24282449 }
24292450 }
24302451
2431- float genmultiplicity = mcCollision.centFT0M ();
24322452 mcEventHist.fill (HIST (" hGenMCMultiplicityPercent" ), genmultiplicity);
2433- if (isAssocColl )
2453+ if (numberAssocColl > 0 )
24342454 mcEventHist.fill (HIST (" hGenMCAssocRecoMultiplicityPercent" ), genmultiplicity);
24352455
24362456 for (const auto & mcParticle : mcParticles) {
@@ -2444,8 +2464,8 @@ struct Phik0shortanalysis {
24442464 continue ;
24452465
24462466 mcEventHist.fill (HIST (" h2GenMCEtaDistribution" ), genmultiplicity, mcParticle.eta ());
2447- if (isAssocColl )
2448- mcEventHist.fill (HIST (" h2GenMCEtaDistributionAssocReco2 " ), genmultiplicity, mcParticle.eta ());
2467+ if (numberAssocColl > 0 )
2468+ mcEventHist.fill (HIST (" h2GenMCEtaDistributionAssocReco " ), genmultiplicity, mcParticle.eta ());
24492469 }
24502470 }
24512471
@@ -2828,23 +2848,23 @@ struct Phik0shortanalysis {
28282848 if (mcParticle.pt () < minPhiPt)
28292849 continue ;
28302850
2831- mcPhiHist.fill (HIST (" h3PhiMCGenAssocRecoCheckNewProc " ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
2851+ mcPhiHist.fill (HIST (" h3PhiMCGenRecoCheckNewProc " ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
28322852
28332853 // K0S selection
28342854 if (mcParticle.pdgCode () != PDG_t::kK0Short )
28352855 continue ;
28362856 if (!mcParticle.isPhysicalPrimary () || mcParticle.pt () < v0Configs.v0SettingMinPt )
28372857 continue ;
28382858
2839- mcK0SHist.fill (HIST (" h3K0SMCGenAssocRecoCheckNewProc " ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
2859+ mcK0SHist.fill (HIST (" h3K0SMCGenRecoCheckNewProc " ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
28402860
28412861 // Pion selection
28422862 if (std::abs (mcParticle.pdgCode ()) != PDG_t::kPiPlus )
28432863 continue ;
28442864 if (!mcParticle.isPhysicalPrimary () || mcParticle.pt () < trackConfigs.cMinPionPtcut )
28452865 continue ;
28462866
2847- mcPionHist.fill (HIST (" h3PiMCGenAssocRecoCheckNewProc " ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
2867+ mcPionHist.fill (HIST (" h3PiMCGenRecoCheckNewProc " ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
28482868 }
28492869 }
28502870
@@ -2863,6 +2883,35 @@ struct Phik0shortanalysis {
28632883 for (const auto & collision : collisions) {
28642884 if (acceptEventQA<true >(collision, false )) {
28652885 mcEventHist.fill (HIST (" hGenMCRecoMultiplicityPercent" ), genmultiplicity); // Event split numerator
2886+
2887+ for (const auto & mcParticle : mcParticles) {
2888+ // The inclusive number of particles is the signal loss denominator,
2889+ // while the number of associated particles is the signal loss numerator
2890+ if (std::abs (mcParticle.y ()) > cfgYAcceptance)
2891+ continue ;
2892+
2893+ // Phi selection
2894+ if (mcParticle.pdgCode () != o2::constants::physics::Pdg::kPhi )
2895+ continue ;
2896+ if (mcParticle.pt () < minPhiPt)
2897+ continue ;
2898+ mcPhiHist.fill (HIST (" h3PhiMCGenRecoNewProc" ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
2899+
2900+ // K0S selection
2901+ if (mcParticle.pdgCode () != PDG_t::kK0Short )
2902+ continue ;
2903+ if (!mcParticle.isPhysicalPrimary () || mcParticle.pt () < v0Configs.v0SettingMinPt )
2904+ continue ;
2905+ mcK0SHist.fill (HIST (" h3K0SMCGenRecoNewProc" ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
2906+
2907+ // Pion selection
2908+ if (std::abs (mcParticle.pdgCode ()) != PDG_t::kPiPlus )
2909+ continue ;
2910+ if (!mcParticle.isPhysicalPrimary () || mcParticle.pt () < trackConfigs.cMinPionPtcut )
2911+ continue ;
2912+ mcPionHist.fill (HIST (" h3PiMCGenRecoNewProc" ), genmultiplicity, mcParticle.pt (), mcParticle.y ());
2913+ }
2914+
28662915 numberAssocColl++;
28672916 }
28682917 }
0 commit comments