Skip to content

Commit 9498b2d

Browse files
authored
[PWGHF] Add prompt and non-prompt plots for efficiencies (#9478)
1 parent ababb9c commit 9498b2d

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

PWGHF/HFC/DataModel/DMesonPairsTables.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ namespace o2::aod
2727
namespace hf_correlation_d_meson_pair
2828
{
2929
// Kinematic info
30-
DECLARE_SOA_COLUMN(PtCand1, ptCand1, float); //! Transverse momentum of first candidate
31-
DECLARE_SOA_COLUMN(PtCand2, ptCand2, float); //! Transverse momentum of second candidate
32-
DECLARE_SOA_COLUMN(YCand1, yCand1, float); //! Rapidity of first candidate
33-
DECLARE_SOA_COLUMN(YCand2, yCand2, float); //! Rapidity of second candidate
30+
DECLARE_SOA_COLUMN(PtCand1, ptCand1, float); //! Transverse momentum of first candidate
31+
DECLARE_SOA_COLUMN(PtCand2, ptCand2, float); //! Transverse momentum of second candidate
32+
DECLARE_SOA_COLUMN(YCand1, yCand1, float); //! Rapidity of first candidate
33+
DECLARE_SOA_COLUMN(YCand2, yCand2, float); //! Rapidity of second candidate
34+
DECLARE_SOA_COLUMN(PhiCand1, phiCand1, float); //! Azimuthal angle of first candidate
35+
DECLARE_SOA_COLUMN(PhiCand2, phiCand2, float); //! Azimuthal angle of second candidate
3436
// Invariant mass
3537
DECLARE_SOA_COLUMN(MDCand1, mDCand1, float); //! Invariant mass of first candidate as D
3638
DECLARE_SOA_COLUMN(MDbarCand1, mDbarCand1, float); //! Invariant mass of first candidate as Dbar
@@ -58,6 +60,8 @@ DECLARE_SOA_COLUMN(MlProbD0barCand2, mlProbD0barCand2, std::vector<float>); //!
5860
hf_correlation_d_meson_pair::PtCand2, \
5961
hf_correlation_d_meson_pair::YCand1, \
6062
hf_correlation_d_meson_pair::YCand2, \
63+
hf_correlation_d_meson_pair::PhiCand1, \
64+
hf_correlation_d_meson_pair::PhiCand2, \
6165
hf_correlation_d_meson_pair::MDCand1, \
6266
hf_correlation_d_meson_pair::MDbarCand1, \
6367
hf_correlation_d_meson_pair::MDCand2, \

PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ struct HfCorrelatorDMesonPairs {
132132
{"hNContribMcGen", "D meson candidates MC Gen;Number of contributors", hTH1NContrib},
133133
// MC Rec plots
134134
{"hPtVsYVsNContribMcRec", "D meson candidates MC Rec;candidate #it{p}_{T} (GeV/#it{c});#it{y};Number of contributors", hTH3PtVsYVsNContrib},
135+
{"hPtVsYVsNContribMcRecPrompt", "D meson candidates MC Rec Prompt;candidate #it{p}_{T} (GeV/#it{c});#it{y};Number of contributors", hTH3PtVsYVsNContrib},
136+
{"hPtVsYVsNContribMcRecNonPrompt", "D meson candidates MC Rec Non-prompt;candidate #it{p}_{T} (GeV/#it{c});#it{y};Number of contributors", hTH3PtVsYVsNContrib},
135137
{"hNContribMcRec", "D meson candidates MC Rec;Number of contributors", hTH1NContrib},
136138
// PID plots ----- Not definitively here
137139
{"PID/hTofNSigmaPi", "(TOFsignal-time#pi)/tofSigPid;p[GeV/c];(TOFsignal-time#pi)/tofSigPid", hTH2Pid},
@@ -416,7 +418,7 @@ struct HfCorrelatorDMesonPairs {
416418

417419
/// Fill selection status histogram
418420
void fillEntry(const bool& isDCand1, const bool& isDbarCand1, const bool& isDCand2, const bool& isDbarCand2,
419-
const uint8_t& candidateType1, const uint8_t& candidateType2, float yCand1, float yCand2,
421+
const uint8_t& candidateType1, const uint8_t& candidateType2, float yCand1, float yCand2, float phiCand1, float phiCand2,
420422
double ptCand1, double ptCand2, float massDCand1, float massDbarCand1, float massDCand2, float massDbarCand2)
421423
{
422424

@@ -471,7 +473,7 @@ struct HfCorrelatorDMesonPairs {
471473
}
472474
}
473475

474-
entryD0Pair(ptCand1, ptCand2, yCand1, yCand2, massDCand1, massDbarCand1, massDCand2, massDbarCand2, pairType, candidateType1, candidateType2);
476+
entryD0Pair(ptCand1, ptCand2, yCand1, yCand2, phiCand1, phiCand2, massDCand1, massDbarCand1, massDCand2, massDbarCand2, pairType, candidateType1, candidateType2);
475477
}
476478

477479
void fillMcHistos(int8_t matchedRec1, int8_t matchedRec2, int8_t isTrueDCand1, int8_t isTrueDbarCand1, int8_t isTrueDCand2, int8_t isTrueDbarCand2)
@@ -632,13 +634,13 @@ struct HfCorrelatorDMesonPairs {
632634
}
633635

634636
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, hfHelper.yD0(candidate1), hfHelper.yD0(candidate2),
635-
candidate1.pt(), candidate2.pt(), hfHelper.invMassD0ToPiK(candidate1), hfHelper.invMassD0barToKPi(candidate1),
637+
candidate1.pt(), candidate2.pt(), candidate1.phi(), candidate2.phi(), hfHelper.invMassD0ToPiK(candidate1), hfHelper.invMassD0barToKPi(candidate1),
636638
hfHelper.invMassD0ToPiK(candidate2), hfHelper.invMassD0barToKPi(candidate2));
637639

638640
entryD0PairMl(outputMlD0Cand1, outputMlD0barCand1, outputMlD0Cand2, outputMlD0barCand2);
639641
} else {
640642
// Fill entries
641-
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, hfHelper.yD0(candidate1), hfHelper.yD0(candidate2),
643+
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, hfHelper.yD0(candidate1), hfHelper.yD0(candidate2), candidate1.phi(), candidate2.phi(),
642644
candidate1.pt(), candidate2.pt(), hfHelper.invMassD0ToPiK(candidate1), hfHelper.invMassD0barToKPi(candidate1),
643645
hfHelper.invMassD0ToPiK(candidate2), hfHelper.invMassD0barToKPi(candidate2));
644646
}
@@ -666,6 +668,7 @@ struct HfCorrelatorDMesonPairs {
666668

667669
auto ptCandidate1 = candidate1.pt();
668670
auto yCandidate1 = hfHelper.yD0(candidate1);
671+
auto phiCandidate1 = candidate1.phi();
669672
float massD0Cand1 = hfHelper.invMassD0ToPiK(candidate1);
670673
float massD0barCand1 = hfHelper.invMassD0barToKPi(candidate1);
671674
auto prong0Cand1 = candidate1.template prong0_as<aod::Tracks>();
@@ -734,8 +737,10 @@ struct HfCorrelatorDMesonPairs {
734737
registry.fill(HIST("hNContribMcRec"), collision.numContrib());
735738
if (originRec1 == 1) {
736739
registry.fill(HIST("hMassMcRecPrompt"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt());
740+
registry.fill(HIST("hPtVsYVsNContribMcRecPrompt"), candidate1.pt(), hfHelper.yD0(candidate1), collision.numContrib());
737741
} else if (originRec1 == 2) {
738742
registry.fill(HIST("hMassMcRecNonPrompt"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt());
743+
registry.fill(HIST("hPtVsYVsNContribMcRecNonPrompt"), candidate1.pt(), hfHelper.yD0(candidate1), collision.numContrib());
739744
}
740745
} else if (isTrueDbarCand1) {
741746
registry.fill(HIST("hMassMcRecReflections"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt());
@@ -763,6 +768,7 @@ struct HfCorrelatorDMesonPairs {
763768

764769
auto ptCandidate2 = candidate2.pt();
765770
auto yCandidate2 = hfHelper.yD0(candidate2);
771+
auto phiCandidate2 = candidate2.phi();
766772
float massD0Cand2 = hfHelper.invMassD0ToPiK(candidate2);
767773
float massD0barCand2 = hfHelper.invMassD0barToKPi(candidate2);
768774
auto prong0Cand2 = candidate2.template prong0_as<aod::Tracks>();
@@ -814,15 +820,15 @@ struct HfCorrelatorDMesonPairs {
814820
}
815821

816822
// Fill tables
817-
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2,
823+
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2, phiCandidate1, phiCandidate2,
818824
ptCandidate1, ptCandidate2, massD0Cand1, massD0barCand1, massD0Cand2, massD0barCand2);
819825
fillMcHistos(matchedRec1, matchedRec2, isTrueDCand1, isTrueDbarCand1, isTrueDCand2, isTrueDbarCand2);
820826
entryD0PairMcInfo(originRec1, originRec2, matchedRec1, matchedRec2);
821827
entryD0PairMl(outputMlD0Cand1, outputMlD0barCand1, outputMlD0Cand2, outputMlD0barCand2);
822828

823829
} else {
824830
// Fill tables
825-
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2,
831+
fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2, phiCandidate1, phiCandidate2,
826832
ptCandidate1, ptCandidate2, massD0Cand1, massD0barCand1, massD0Cand2, massD0barCand2);
827833
fillMcHistos(matchedRec1, matchedRec2, isTrueDCand1, isTrueDbarCand1, isTrueDCand2, isTrueDbarCand2);
828834
entryD0PairMcInfo(originRec1, originRec2, matchedRec1, matchedRec2);
@@ -1007,7 +1013,7 @@ struct HfCorrelatorDMesonPairs {
10071013
}
10081014

10091015
// Fill pair Selection Status
1010-
entryD0PairMcGen(particle1.pt(), particle2.pt(), particle1.y(), particle2.y(), massD, massDbar, massD, massDbar, pairType, particleType1, particleType2);
1016+
entryD0PairMcGen(particle1.pt(), particle2.pt(), particle1.y(), particle2.y(), particle1.phi(), particle2.phi(), massD, massDbar, massD, massDbar, pairType, particleType1, particleType2);
10111017
entryD0PairMcGenInfo(originGen1, originGen2, matchedGen1, matchedGen2);
10121018

10131019
} // end inner loop

0 commit comments

Comments
 (0)