@@ -112,16 +112,6 @@ struct FemtoUniversePairTaskTrackPhi {
112112 (aod::femtouniverseparticle::pt > ConfTrack.confTrackPtLowLimit.value) &&
113113 (aod::femtouniverseparticle::pt < ConfTrack.confTrackPtHighLimit.value);
114114
115- Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsTrackMCReco = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kTrack )) &&
116- (aod::femtouniverseparticle::sign == ConfTrack.confTrackSign.value) &&
117- (aod::femtouniverseparticle::pt > ConfTrack.confTrackPtLowLimit.value) &&
118- (aod::femtouniverseparticle::pt < ConfTrack.confTrackPtHighLimit.value);
119-
120- Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsTrackMCTruth = aod::femtouniverseparticle::partType == static_cast <uint8_t >(aod::femtouniverseparticle::ParticleType::kMCTruthTrack ) &&
121- (aod::femtouniverseparticle::pidCut == static_cast <uint32_t >(ConfTrack.confTrackPDGCode)) &&
122- (aod::femtouniverseparticle::pt > ConfTrack.confTrackPtLowLimit.value) &&
123- (aod::femtouniverseparticle::pt < ConfTrack.confTrackPtHighLimit.value);
124-
125115 // / Particle 2 --- PHI MESON
126116 struct : o2::framework::ConfigurableGroup {
127117 Configurable<float > confPhiPtLowLimit{" confPhiPtLowLimit" , 0.8 , " Lower limit of the Phi pT." };
@@ -133,15 +123,6 @@ struct FemtoUniversePairTaskTrackPhi {
133123 (aod::femtouniverseparticle::pt > ConfPhi.confPhiPtLowLimit.value) &&
134124 (aod::femtouniverseparticle::pt < ConfPhi.confPhiPtHighLimit.value);
135125
136- Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsPhiMCReco = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kPhi )) &&
137- (aod::femtouniverseparticle::pt > ConfPhi.confPhiPtLowLimit.value) &&
138- (aod::femtouniverseparticle::pt < ConfPhi.confPhiPtHighLimit.value);
139-
140- Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsPhiMCTruth = (aod::femtouniverseparticle::partType == static_cast <uint8_t >(aod::femtouniverseparticle::ParticleType::kMCTruthTrack )) &&
141-
142- (aod::femtouniverseparticle::pidCut == static_cast <uint32_t >(333 )) &&
143- (aod::femtouniverseparticle::pt > ConfPhi.confPhiPtLowLimit.value) &&
144- (aod::femtouniverseparticle::pt < ConfPhi.confPhiPtHighLimit.value);
145126 // / Partitions for Phi daughters kPhiChild
146127 Partition<FilteredFemtoFullParticles> partsPhiDaugh = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kPhiChild ));
147128 Partition<soa::Join<FilteredFemtoFullParticles, aod::FDMCLabels>> partsPhiDaughMC = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kPhiChild ));
@@ -416,22 +397,36 @@ struct FemtoUniversePairTaskTrackPhi {
416397 qaRegistry.add (" Hadron/nSigmaTOFKa" , " ; #it{p} (GeV/#it{c}); n#sigma_{TOFKa}" , kTH2F , {{100 , 0 , 10 }, {200 , -4.975 , 5.025 }});
417398
418399 // MC truth
419- registryMCtruth.add (" MCtruthPhi" , " MC truth Phi;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
420400 registryMCtruth.add (" MCtruthAllPositivePt" , " MC truth all positive;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH1F , {{500 , 0 , 5 }}});
421401 registryMCtruth.add (" MCtruthAllNegativePt" , " MC truth all negative;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH1F , {{500 , 0 , 5 }}});
402+ // K+
422403 registryMCtruth.add (" MCtruthKp" , " MC truth K+;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
423- registryMCtruth.add (" MCtruthKm" , " MC truth protons;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
424404 registryMCtruth.add (" MCtruthKpPt" , " MC truth kaons positive;#it{p}_{T} (GeV/c)" , {HistType::kTH1F , {{500 , 0 , 5 }}});
405+ // K-
406+ registryMCtruth.add (" MCtruthKm" , " MC truth protons;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
425407 registryMCtruth.add (" MCtruthKmPt" , " MC truth kaons negative;#it{p}_{T} (GeV/c)" , {HistType::kTH1F , {{500 , 0 , 5 }}});
426- registryMCtruth.add (" MCtruthPpos" , " MC truth proton;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
427- registryMCtruth.add (" MCtruthPneg" , " MC truth antiproton;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
408+ // p
409+ registryMCtruth.add (" MCtruthPpos" , " MC truth protons;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
410+ registryMCtruth.add (" MCtruthPposPt" , " MC truth protons;#it{p}_{T} (GeV/c)" , {HistType::kTH1F , {{500 , 0 , 5 }}});
411+ // pbar
412+ registryMCtruth.add (" MCtruthPneg" , " MC truth antiprotons;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
413+ registryMCtruth.add (" MCtruthPnegPt" , " MC truth antiproton;#it{p}_{T} (GeV/c)" , {HistType::kTH1F , {{500 , 0 , 5 }}});
414+ // phi
415+ registryMCtruth.add (" MCtruthPhi" , " MC truth phi mesons;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
416+ registryMCtruth.add (" MCtruthPhiPt" , " MC truth phi mesons;#it{p}_{T} (GeV/c)" , {HistType::kTH1F , {{500 , 0 , 5 }}});
428417
429418 // MC reco
430- registryMCreco.add (" MCrecoPhi" , " MC reco Phi;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
431419 registryMCreco.add (" MCrecoAllPositivePt" , " MC reco all;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH1F , {{500 , 0 , 5 }}});
432420 registryMCreco.add (" MCrecoAllNegativePt" , " MC reco all;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH1F , {{500 , 0 , 5 }}});
421+ // p
433422 registryMCreco.add (" MCrecoPpos" , " MC reco proton;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
423+ registryMCreco.add (" MCrecoPposPt" , " MC reco proton; #it{p_T} (GeV/#it{c}); Counts" , kTH1F , {{500 , 0 , 5 }});
424+ // pbar
434425 registryMCreco.add (" MCrecoPneg" , " MC reco antiproton;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
426+ registryMCreco.add (" MCrecoPnegPt" , " MC reco antiproton; #it{p_T} (GeV/#it{c}); Counts" , kTH1F , {{500 , 0 , 5 }});
427+ // phi
428+ registryMCreco.add (" MCrecoPhi" , " MC reco Phi;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
429+ registryMCreco.add (" MCrecoPhiPt" , " MC reco Phi; #it{p_T} (GeV/#it{c}); Counts" , kTH1F , {{500 , 0 , 5 }});
435430
436431 trackHistoPartPhi.init (&qaRegistry, confBinsTempFitVarpT, confBinsTempFitVarInvMass, ConfBothTracks.confIsMC .value , 333 );
437432 trackHistoPartTrack.init (&qaRegistry, confBinsTempFitVarpT, confBinsTempFitVar, ConfBothTracks.confIsMC .value , ConfTrack.confTrackPDGCode .value );
@@ -619,31 +614,6 @@ struct FemtoUniversePairTaskTrackPhi {
619614 }
620615 PROCESS_SWITCH (FemtoUniversePairTaskTrackPhi, processSameEvent, " Enable processing same event" , true );
621616
622- // / process function for to call doSameEvent with Monte Carlo
623- // / \param col subscribe to the collision table (Monte Carlo Reconstructed reconstructed)
624- // / \param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth
625- // / \param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table
626- void processSameEventMC (o2::aod::FdCollision const & col,
627- soa::Join<FilteredFemtoFullParticles, o2::aod::FDMCLabels> const & parts,
628- o2::aod::FdMCParticles const &)
629- {
630- fillCollision (col);
631-
632- auto groupMCTruthTrack = partsTrackMCTruth->sliceByCached (aod::femtouniverseparticle::fdCollisionId, col.globalIndex (), cache);
633- efficiencyCalculator.doMCTruth <1 >(hMCTruth1, groupMCTruthTrack);
634-
635- auto groupMCTruthPhi = partsPhiMCTruth->sliceByCached (aod::femtouniverseparticle::fdCollisionId, col.globalIndex (), cache);
636- efficiencyCalculator.doMCTruth <2 >(hMCTruth2, groupMCTruthPhi);
637-
638- auto thegroupPartsTrack = partsTrackMCReco->sliceByCached (aod::femtouniverseparticle::fdCollisionId, col.globalIndex (), cache);
639- auto thegroupPartsPhi = partsPhiMCReco->sliceByCached (aod::femtouniverseparticle::fdCollisionId, col.globalIndex (), cache);
640- auto thegroupPartsPhiDaugh = partsPhiDaughMC->sliceByCached (aod::femtouniverseparticle::fdCollisionId, col.globalIndex (), cache);
641- auto thegroupPartsKaons = partsKaonsMC->sliceByCached (aod::femtouniverseparticle::fdCollisionId, col.globalIndex (), cache);
642-
643- doSameEvent<true >(thegroupPartsTrack, thegroupPartsPhi, thegroupPartsPhiDaugh, thegroupPartsKaons, parts, col.magField (), col.multNtr ());
644- }
645- PROCESS_SWITCH (FemtoUniversePairTaskTrackPhi, processSameEventMC, " Enable processing same event for Monte Carlo" , false );
646-
647617 // / This function processes the mixed event
648618 // / \todo the trivial loops over the collisions and tracks should be factored out since they will be common to all combinations of T-T, T-V0, V0-V0, ...
649619 // / \tparam PartitionType
@@ -722,36 +692,6 @@ struct FemtoUniversePairTaskTrackPhi {
722692 }
723693 PROCESS_SWITCH (FemtoUniversePairTaskTrackPhi, processMixedEvent, " Enable processing mixed events" , true );
724694
725- // / brief process function for to call doMixedEvent with Monte Carlo
726- // / @param cols subscribe to the collisions table (Monte Carlo Reconstructed reconstructed)
727- // / @param parts subscribe to joined table FemtoUniverseParticles and FemtoUniverseMCLables to access Monte Carlo truth
728- // / @param FemtoUniverseMCParticles subscribe to the Monte Carlo truth table
729- void processMixedEventMC (o2::aod::FdCollisions const & cols,
730- soa::Join<FilteredFemtoFullParticles, o2::aod::FDMCLabels> const & parts,
731- o2::aod::FdMCParticles const &)
732- {
733- for (auto const & [collision1, collision2] : soa::selfCombinations (colBinning, 5 , -1 , cols, cols)) {
734-
735- const int multiplicityCol = collision1.multNtr ();
736- mixQaRegistry.fill (HIST (" MixingQA/hMECollisionBins" ), colBinning.getBin ({collision1.posZ (), multiplicityCol}));
737-
738- auto groupPartsTrack = partsTrackMCReco->sliceByCached (aod::femtouniverseparticle::fdCollisionId, collision2.globalIndex (), cache);
739- auto groupPartsPhi = partsPhiMCReco->sliceByCached (aod::femtouniverseparticle::fdCollisionId, collision1.globalIndex (), cache);
740-
741- const auto & magFieldTesla1 = collision1.magField ();
742- const auto & magFieldTesla2 = collision2.magField ();
743-
744- if (magFieldTesla1 != magFieldTesla2) {
745- continue ;
746- }
747- // / \todo before mixing we should check whether both collisions contain a pair of particles!
748- // if (partsPhi.size() == 0 || NPart2Evt1 == 0 || NPart1Evt2 == 0 || partsTrack.size() == 0 ) continue;
749-
750- doMixedEvent<true >(groupPartsTrack, groupPartsPhi, parts, magFieldTesla1, multiplicityCol);
751- }
752- }
753- PROCESS_SWITCH (FemtoUniversePairTaskTrackPhi, processMixedEventMC, " Enable processing mixed events MC" , false );
754-
755695 // /--------------------------------------------MC-------------------------------------------------///
756696
757697 // / This function fills MC truth particles from derived MC table
@@ -767,30 +707,39 @@ struct FemtoUniversePairTaskTrackPhi {
767707 continue ;
768708 }
769709
710+ // charge +
770711 if (pdgParticle->Charge () > 0.0 ) {
771712 registryMCtruth.fill (HIST (" MCtruthAllPositivePt" ), part.pt ());
713+ if (pdgCode == 2212 ) {
714+ registryMCtruth.fill (HIST (" MCtruthPpos" ), part.pt (), part.eta ());
715+ registryMCtruth.fill (HIST (" MCtruthPposPt" ), part.pt ());
716+ continue ;
717+ } else if (pdgCode == 321 ) {
718+ registryMCtruth.fill (HIST (" MCtruthKp" ), part.pt (), part.eta ());
719+ registryMCtruth.fill (HIST (" MCtruthKpPt" ), part.pt ());
720+ continue ;
721+ }
772722 }
773- if (pdgCode == 321 ) {
774- registryMCtruth.fill (HIST (" MCtruthKp" ), part.pt (), part.eta ());
775- registryMCtruth.fill (HIST (" MCtruthKpPt" ), part.pt ());
776- }
723+ // charge 0
777724 if (pdgCode == 333 ) {
778725 registryMCtruth.fill (HIST (" MCtruthPhi" ), part.pt (), part.eta ());
726+ registryMCtruth.fill (HIST (" MCtruthPhiPt" ), part.pt ());
779727 continue ;
780728 }
781- if (pdgCode == 2212 ) {
782- registryMCtruth.fill (HIST (" MCtruthPpos" ), part.pt (), part.eta ());
783- }
784729
730+ // charge -
785731 if (pdgParticle->Charge () < 0.0 ) {
786732 registryMCtruth.fill (HIST (" MCtruthAllNegativePt" ), part.pt ());
787- }
788- if (pdgCode == -321 ) {
789- registryMCtruth.fill (HIST (" MCtruthKm" ), part.pt (), part.eta ());
790- registryMCtruth.fill (HIST (" MCtruthKmPt" ), part.pt ());
791- }
792- if (pdgCode == -2212 ) {
793- registryMCtruth.fill (HIST (" MCtruthPneg" ), part.pt (), part.eta ());
733+
734+ if (pdgCode == -321 ) {
735+ registryMCtruth.fill (HIST (" MCtruthKm" ), part.pt (), part.eta ());
736+ registryMCtruth.fill (HIST (" MCtruthKmPt" ), part.pt ());
737+ continue ;
738+ } else if (pdgCode == -2212 ) {
739+ registryMCtruth.fill (HIST (" MCtruthPneg" ), part.pt (), part.eta ());
740+ registryMCtruth.fill (HIST (" MCtruthPnegPt" ), part.pt ());
741+ continue ;
742+ }
794743 }
795744 }
796745 }
@@ -803,25 +752,26 @@ struct FemtoUniversePairTaskTrackPhi {
803752 if (mcPartId == -1 )
804753 continue ; // no MC particle
805754 const auto & mcpart = mcparts.iteratorAt (mcPartId);
806- if (part.partType () == aod::femtouniverseparticle::ParticleType::kPhi ) {
807- if ((mcpart.pdgMCTruth () == 333 ) && (mcpart.partOriginMCTruth () == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary )) {
808- registryMCreco.fill (HIST (" MCrecoPhi" ), mcpart.pt (), mcpart.eta ()); // phi
809- }
755+ if ((part.partType () == aod::femtouniverseparticle::ParticleType::kPhi ) && (mcpart.pdgMCTruth () == 333 ) && (mcpart.partOriginMCTruth () == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary )) {
756+ registryMCreco.fill (HIST (" MCrecoPhi" ), mcpart.pt (), mcpart.eta ()); // phi
757+ registryMCreco.fill (HIST (" MCrecoPhiPt" ), mcpart.pt ());
810758 } else if (part.partType () == aod::femtouniverseparticle::ParticleType::kTrack ) {
811759 if (part.sign () > 0 ) {
812760 registryMCreco.fill (HIST (" MCrecoAllPositivePt" ), mcpart.pt ());
813761 if (mcpart.pdgMCTruth () == 2212 && isParticleNSigmaAccepted (part.p (), trackCuts.getNsigmaTPC (part, o2::track::PID::Proton), trackCuts.getNsigmaTOF (part, o2::track::PID::Proton), trackCuts.getNsigmaTPC (part, o2::track::PID::Pion), trackCuts.getNsigmaTOF (part, o2::track::PID::Pion), trackCuts.getNsigmaTPC (part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (part, o2::track::PID::Kaon))) {
814762 registryMCreco.fill (HIST (" MCrecoPpos" ), mcpart.pt (), mcpart.eta ());
763+ registryMCreco.fill (HIST (" MCrecoPposPt" ), mcpart.pt ());
815764 }
816765 }
817766
818- if (part.sign () < 0 ) {
767+ else if (part.sign () < 0 ) {
819768 registryMCreco.fill (HIST (" MCrecoAllNegativePt" ), mcpart.pt ());
820769 if (mcpart.pdgMCTruth () == -2212 && isParticleNSigmaAccepted (part.p (), trackCuts.getNsigmaTPC (part, o2::track::PID::Proton), trackCuts.getNsigmaTOF (part, o2::track::PID::Proton), trackCuts.getNsigmaTPC (part, o2::track::PID::Pion), trackCuts.getNsigmaTOF (part, o2::track::PID::Pion), trackCuts.getNsigmaTPC (part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (part, o2::track::PID::Kaon))) {
821770 registryMCreco.fill (HIST (" MCrecoPneg" ), mcpart.pt (), mcpart.eta ());
771+ registryMCreco.fill (HIST (" MCrecoPnegPt" ), mcpart.pt ());
822772 }
823773 }
824- } // partType
774+ } // partType kTrack
825775 }
826776 }
827777
0 commit comments