@@ -109,7 +109,7 @@ struct FemtoUniversePairTaskTrackD0 {
109109 // Particle identification
110110 Configurable<float > minMomPidTpcTofProton{" minMomPidTpcTofProton" , 0.8 , " Momentum threshold for change of the PID method (from using TPC to TPC and TOF)." };
111111 Configurable<float > minMomPidTpcTofPion{" minMomPidTpcTofPion" , 0.7 , " Momentum threshold for change of the PID method (from using TPC to TPC and TOF)." };
112- Configurable<float > minMomPidTpcTofKaonLF{ " minMomPidTpcTofKaonLF " , 0.5 , " Momentum threshold for change of the PID method (from using TPC to TPC and TOF)." };
112+ Configurable<float > minMomPidTpcTofKaon{ " minMomPidTpcTofKaon " , 0.5 , " Momentum threshold for change of the PID method (from using TPC to TPC and TOF)." };
113113 // Configurables with nSigma values for particle selection
114114 Configurable<float > confNsigmaCombinedProton{" confNsigmaCombinedProton" , 3.0 , " TPC and TOF Proton Sigma (combined)" };
115115 Configurable<float > confNsigmaTPCProton{" confNsigmaTPCProton" , 3.0 , " TPC Proton Sigma" };
@@ -124,6 +124,8 @@ struct FemtoUniversePairTaskTrackD0 {
124124 Configurable<float > confNsigmaKaRejectPrNsigma{" confNsigmaKaRejectPrNsigma" , 2.0 , " Reject if kaon could be a proton within a givien nSigma value" };
125125 Configurable<float > confNsigmaPiRejectKaNsigma{" confNsigmaPiRejectKaNsigma" , 2.0 , " Reject if pion could be a kaon within a givien nSigma value" };
126126 Configurable<float > confNsigmaPiRejectPrNsigma{" confNsigmaPiRejectPrNsigma" , 2.0 , " Reject if pion could be a proton within a givien nSigma value" };
127+ // Configurable to enable particle rejection
128+ Configurable<bool > confDoPartNsigmaRejection{" confDoPartNsigmaRejection" , false , " Enable particle nSigma rejection" };
127129 } ConfTrack;
128130
129131 // / Particle 2 --- D0/D0bar meson
@@ -157,11 +159,11 @@ struct FemtoUniversePairTaskTrackD0 {
157159
158160 Configurable<std::vector<double >> binsPt{" binsPt" , std::vector<double >{hf_cuts_d0_to_pi_k::vecBinsPt}, " pT bin limits" };
159161 Configurable<uint8_t > confChooseD0trackCorr{" confChooseD0trackCorr" , 0 , " If 0 correlations with D0s, if 1 with D0bars" };
162+ // Correlated background for D0/D0bar candidates
163+ Configurable<bool > fillCorrBkgs{" fillCorrBkgs" , false , " Fill histograms with correlated background candidates" };
160164
161165 // Efficiency
162166 Configurable<bool > doEfficiencyCorr{" doEfficiencyCorr" , false , " Apply efficiency corrections" };
163- // Particle rejection
164- Configurable<bool > confDoPartNsigmaRejection{" confDoPartNsigmaRejection" , false , " Enable particle nSigma rejection" };
165167
166168 // / Partitions for particle 1
167169 Partition<FemtoFullParticles> partsTrack = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kTrack )) && (aod::femtouniverseparticle::sign == int8_t (ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut) && (nabs(aod::femtouniverseparticle::eta) < ConfTrack.confTrackEtaMax);
@@ -324,13 +326,13 @@ struct FemtoUniversePairTaskTrackD0 {
324326
325327 bool isKaonNSigmaLF (float mom, float nsigmaTPCKa, float nsigmaTOFKa)
326328 {
327- if (mom < ConfTrack.minMomPidTpcTofKaonLF ) {
329+ if (mom < ConfTrack.minMomPidTpcTofKaon ) {
328330 if (std::abs (nsigmaTPCKa) < ConfTrack.confNsigmaTPCKaon ) {
329331 return true ;
330332 } else {
331333 return false ;
332334 }
333- } else if (mom > ConfTrack.minMomPidTpcTofKaonLF ) {
335+ } else if (mom > ConfTrack.minMomPidTpcTofKaon ) {
334336 if (std::hypot (nsigmaTOFKa, nsigmaTPCKa) < ConfTrack.confNsigmaCombinedKaon ) {
335337 return true ;
336338 } else {
@@ -343,14 +345,14 @@ struct FemtoUniversePairTaskTrackD0 {
343345
344346 bool isKaonNSigmaLFRejected (float mom, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCPr, float nsigmaTOFPr)
345347 {
346- if (mom < ConfTrack.minMomPidTpcTofKaonLF ) {
348+ if (mom < ConfTrack.minMomPidTpcTofKaon ) {
347349 if (std::abs (nsigmaTPCPi) < ConfTrack.confNsigmaKaRejectPiNsigma ) {
348350 return true ;
349351 } else if (std::abs (nsigmaTPCPr) < ConfTrack.confNsigmaKaRejectPrNsigma ) {
350352 return true ;
351353 }
352354 }
353- if (mom > ConfTrack.minMomPidTpcTofKaonLF ) {
355+ if (mom > ConfTrack.minMomPidTpcTofKaon ) {
354356 if (std::hypot (nsigmaTOFPi, nsigmaTPCPi) < ConfTrack.confNsigmaKaRejectPiNsigma ) {
355357 return true ;
356358 } else if (std::hypot (nsigmaTOFPr, nsigmaTPCPr) < ConfTrack.confNsigmaKaRejectPrNsigma ) {
@@ -554,6 +556,17 @@ struct FemtoUniversePairTaskTrackD0 {
554556 mcRecoRegistry.add (" hMassVsPtD0barBkg" , " 2-prong candidates;inv. mass (#pi K) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
555557 mcRecoRegistry.add (" hMassVsPtD0barPrompt" , " 2-prong candidates;inv. mass (#pi K) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
556558 mcRecoRegistry.add (" hMassVsPtD0barNonPrompt" , " 2-prong candidates;inv. mass (#pi K) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
559+ // Histograms for D0/D0bar correlated backgrounds
560+ if (fillCorrBkgs) {
561+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0ToPiKaPi" , " 2-prong candidates;inv. mass (#pi^{+} K^{-} #pi^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
562+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0ToPiPi" , " 2-prong candidates;inv. mass (#pi^{+} #pi^{-}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
563+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0ToPiPiPi" , " 2-prong candidates;inv. mass (#pi^{+} #pi^{-} #pi^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
564+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0ToKaKa" , " 2-prong candidates;inv. mass (K^{+} K^{-}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
565+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0barToPiKaPi" , " 2-prong candidates;inv. mass (#pi^{+} K^{-} #pi^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
566+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0barToPiPi" , " 2-prong candidates;inv. mass (#pi^{+} #pi^{-}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
567+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0barToPiPiPi" , " 2-prong candidates;inv. mass (#pi^{+} #pi^{-} #pi^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
568+ mcRecoRegistry.add (" D0D0bar_corrBkgs/hMassVsPtD0barToKaKa" , " 2-prong candidates;inv. mass (K^{+} K^{-}) (GeV/#it{c}^{2});entries" , {HistType::kTH2F , {confInvMassBins, {vbins, " #it{p}_{T} (GeV/#it{c})" }}});
569+ }
557570 // Histograms for identified hadrons
558571 mcRecoRegistry.add (" hMcRecKpPt" , " MC Reco K+;#it{p}_{T} (GeV/c); counts" , {HistType::kTH1F , {{500 , 0 , 5 }}});
559572 mcRecoRegistry.add (" hMcRecKpPtGenEtaGen" , " MC Reco K+;#it{p}_{T} (GeV/c); #eta" , {HistType::kTH2F , {{500 , 0 , 5 }, {400 , -1.0 , 1.0 }}});
@@ -898,7 +911,7 @@ struct FemtoUniversePairTaskTrackD0 {
898911 if (!isParticleNSigma (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon))) {
899912 continue ;
900913 }
901- if (confDoPartNsigmaRejection && isParticleNSigmaRejected (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton))) {
914+ if (ConfTrack. confDoPartNsigmaRejection && isParticleNSigmaRejected (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton))) {
902915 continue ;
903916 }
904917 }
@@ -928,7 +941,7 @@ struct FemtoUniversePairTaskTrackD0 {
928941 if (!isParticleNSigma (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon))) {
929942 continue ;
930943 }
931- if (confDoPartNsigmaRejection && isParticleNSigmaRejected (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton))) {
944+ if (ConfTrack. confDoPartNsigmaRejection && isParticleNSigmaRejected (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton))) {
932945 continue ;
933946 }
934947 }
@@ -1128,7 +1141,7 @@ struct FemtoUniversePairTaskTrackD0 {
11281141 if (!isParticleNSigma (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon))) {
11291142 continue ;
11301143 }
1131- if (confDoPartNsigmaRejection && isParticleNSigmaRejected (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton))) {
1144+ if (ConfTrack. confDoPartNsigmaRejection && isParticleNSigmaRejected (track.p (), trackCuts.getNsigmaTPC (track, o2::track::PID::Pion), trackCuts.getNsigmaTOF (track, o2::track::PID::Pion), trackCuts.getNsigmaTPC (track, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (track, o2::track::PID::Kaon), trackCuts.getNsigmaTPC (track, o2::track::PID::Proton), trackCuts.getNsigmaTOF (track, o2::track::PID::Proton))) {
11321145 continue ;
11331146 }
11341147 }
@@ -1486,6 +1499,17 @@ struct FemtoUniversePairTaskTrackD0 {
14861499 } else {
14871500 mcRecoRegistry.fill (HIST (" hMassVsPtD0Bkg" ), part.mLambda (), part.pt (), weight);
14881501 }
1502+ if (fillCorrBkgs) {
1503+ if (part.sign () == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiKPi0) { // D0 -> pi+K-pi0
1504+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0ToPiKaPi" ), part.mLambda (), part.pt (), weight);
1505+ } else if (part.sign () == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiPi) { // D0 -> pi+pi-
1506+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0ToPiPi" ), part.mLambda (), part.pt (), weight);
1507+ } else if (part.sign () == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiPiPi0) { // D0 -> pi+pi-pi0
1508+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0ToPiPiPi" ), part.mLambda (), part.pt (), weight);
1509+ } else if (part.sign () == o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToKK) { // D0 -> K+K-
1510+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0ToKaKa" ), part.mLambda (), part.pt (), weight);
1511+ }
1512+ }
14891513 if (part.tpcNClsFound () == 0 ) { // prompt candidates
14901514 mcRecoRegistry.fill (HIST (" hMassVsPtD0Prompt" ), part.mLambda (), part.pt (), weight);
14911515 } else if (part.tpcNClsFound () == 1 ) { // non-prompt candidates
@@ -1499,6 +1523,17 @@ struct FemtoUniversePairTaskTrackD0 {
14991523 } else {
15001524 mcRecoRegistry.fill (HIST (" hMassVsPtD0barBkg" ), part.mAntiLambda (), part.pt (), weight);
15011525 }
1526+ if (fillCorrBkgs) {
1527+ if (part.sign () == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiKPi0) { // D0 -> pi+K-pi0
1528+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0barToPiKaPi" ), part.mLambda (), part.pt (), weight);
1529+ } else if (part.sign () == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiPi) { // D0 -> pi+pi-
1530+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0barToPiPi" ), part.mLambda (), part.pt (), weight);
1531+ } else if (part.sign () == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiPiPi0) { // D0 -> pi+pi-pi0
1532+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0barToPiPiPi" ), part.mLambda (), part.pt (), weight);
1533+ } else if (part.sign () == -o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToKK) { // D0 -> K+K-
1534+ mcRecoRegistry.fill (HIST (" D0D0bar_corrBkgs/hMassVsPtD0barToKaKa" ), part.mLambda (), part.pt (), weight);
1535+ }
1536+ }
15021537 if (part.tpcNClsFound () == 0 ) { // prompt candidates
15031538 mcRecoRegistry.fill (HIST (" hMassVsPtD0barPrompt" ), part.mAntiLambda (), part.pt (), weight);
15041539 } else if (part.tpcNClsFound () == 1 ) { // non-prompt candidates
0 commit comments