From f86c51785c735e0f2a216c74fb6b447a176b95e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:46:49 +0000 Subject: [PATCH 1/3] [PWGHF] Add prompt and non-prompt plots for efficiencies --- PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx index de5a367de2a..12cccaa1239 100644 --- a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx @@ -132,6 +132,8 @@ struct HfCorrelatorDMesonPairs { {"hNContribMcGen", "D meson candidates MC Gen;Number of contributors", hTH1NContrib}, // MC Rec plots {"hPtVsYVsNContribMcRec", "D meson candidates MC Rec;candidate #it{p}_{T} (GeV/#it{c});#it{y};Number of contributors", hTH3PtVsYVsNContrib}, + {"hPtVsYVsNContribMcRecPrompt", "D meson candidates MC Rec Prompt;candidate #it{p}_{T} (GeV/#it{c});#it{y};Number of contributors", hTH3PtVsYVsNContrib}, + {"hPtVsYVsNContribMcRecNonPrompt", "D meson candidates MC Rec Non-prompt;candidate #it{p}_{T} (GeV/#it{c});#it{y};Number of contributors", hTH3PtVsYVsNContrib}, {"hNContribMcRec", "D meson candidates MC Rec;Number of contributors", hTH1NContrib}, // PID plots ----- Not definitively here {"PID/hTofNSigmaPi", "(TOFsignal-time#pi)/tofSigPid;p[GeV/c];(TOFsignal-time#pi)/tofSigPid", hTH2Pid}, @@ -734,8 +736,10 @@ struct HfCorrelatorDMesonPairs { registry.fill(HIST("hNContribMcRec"), collision.numContrib()); if (originRec1 == 1) { registry.fill(HIST("hMassMcRecPrompt"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt()); + registry.fill(HIST("hPtVsYVsNContribMcRecPrompt"), candidate1.pt(), hfHelper.yD0(candidate1), collision.numContrib()); } else if (originRec1 == 2) { registry.fill(HIST("hMassMcRecNonPrompt"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt()); + registry.fill(HIST("hPtVsYVsNContribMcRecNonPrompt"), candidate1.pt(), hfHelper.yD0(candidate1), collision.numContrib()); } } else if (isTrueDbarCand1) { registry.fill(HIST("hMassMcRecReflections"), hfHelper.invMassD0ToPiK(candidate1), candidate1.pt()); From 7e7492cd434cf55a515fdc9ab3d948944f1b96af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:38:49 +0000 Subject: [PATCH 2/3] Add phi variable to tree --- PWGHF/HFC/DataModel/DMesonPairsTables.h | 4 ++++ .../TableProducer/correlatorDMesonPairs.cxx | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/PWGHF/HFC/DataModel/DMesonPairsTables.h b/PWGHF/HFC/DataModel/DMesonPairsTables.h index 1f5a2e41e52..84ed055ed59 100644 --- a/PWGHF/HFC/DataModel/DMesonPairsTables.h +++ b/PWGHF/HFC/DataModel/DMesonPairsTables.h @@ -31,6 +31,8 @@ DECLARE_SOA_COLUMN(PtCand1, ptCand1, float); //! Transverse momentum of first ca DECLARE_SOA_COLUMN(PtCand2, ptCand2, float); //! Transverse momentum of second candidate DECLARE_SOA_COLUMN(YCand1, yCand1, float); //! Rapidity of first candidate DECLARE_SOA_COLUMN(YCand2, yCand2, float); //! Rapidity of second candidate +DECLARE_SOA_COLUMN(PhiCand1, phiCand1, float); //! Rapidity of first candidate +DECLARE_SOA_COLUMN(PhiCand2, phiCand2, float); //! Rapidity of second candidate // Invariant mass DECLARE_SOA_COLUMN(MDCand1, mDCand1, float); //! Invariant mass of first candidate as D DECLARE_SOA_COLUMN(MDbarCand1, mDbarCand1, float); //! Invariant mass of first candidate as Dbar @@ -58,6 +60,8 @@ DECLARE_SOA_COLUMN(MlProbD0barCand2, mlProbD0barCand2, std::vector); //! hf_correlation_d_meson_pair::PtCand2, \ hf_correlation_d_meson_pair::YCand1, \ hf_correlation_d_meson_pair::YCand2, \ + hf_correlation_d_meson_pair::PhiCand1, \ + hf_correlation_d_meson_pair::PhiCand2, \ hf_correlation_d_meson_pair::MDCand1, \ hf_correlation_d_meson_pair::MDbarCand1, \ hf_correlation_d_meson_pair::MDCand2, \ diff --git a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx index 12cccaa1239..66be58e3b24 100644 --- a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx @@ -418,7 +418,7 @@ struct HfCorrelatorDMesonPairs { /// Fill selection status histogram void fillEntry(const bool& isDCand1, const bool& isDbarCand1, const bool& isDCand2, const bool& isDbarCand2, - const uint8_t& candidateType1, const uint8_t& candidateType2, float yCand1, float yCand2, + const uint8_t& candidateType1, const uint8_t& candidateType2, float yCand1, float yCand2, float phiCand1, float phiCand2, double ptCand1, double ptCand2, float massDCand1, float massDbarCand1, float massDCand2, float massDbarCand2) { @@ -473,11 +473,10 @@ struct HfCorrelatorDMesonPairs { } } - entryD0Pair(ptCand1, ptCand2, yCand1, yCand2, massDCand1, massDbarCand1, massDCand2, massDbarCand2, pairType, candidateType1, candidateType2); + entryD0Pair(ptCand1, ptCand2, yCand1, yCand2, phiCand1, phiCand2, massDCand1, massDbarCand1, massDCand2, massDbarCand2, pairType, candidateType1, candidateType2); } - void fillMcHistos(int8_t matchedRec1, int8_t matchedRec2, int8_t isTrueDCand1, int8_t isTrueDbarCand1, int8_t isTrueDCand2, int8_t isTrueDbarCand2) - { + void fillMcHistos(int8_t matchedRec1, int8_t matchedRec2, int8_t isTrueDCand1, int8_t isTrueDbarCand1, int8_t isTrueDCand2, int8_t isTrueDbarCand2) { // Fill hMatchingMcRec - Cand 1 registry.fill(HIST("hMatchingMcRec"), 1); if (matchedRec1 == 1) { @@ -634,13 +633,13 @@ struct HfCorrelatorDMesonPairs { } fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, hfHelper.yD0(candidate1), hfHelper.yD0(candidate2), - candidate1.pt(), candidate2.pt(), hfHelper.invMassD0ToPiK(candidate1), hfHelper.invMassD0barToKPi(candidate1), + candidate1.pt(), candidate2.pt(), candidate1.phi(), candidate2.phi(), hfHelper.invMassD0ToPiK(candidate1), hfHelper.invMassD0barToKPi(candidate1), hfHelper.invMassD0ToPiK(candidate2), hfHelper.invMassD0barToKPi(candidate2)); entryD0PairMl(outputMlD0Cand1, outputMlD0barCand1, outputMlD0Cand2, outputMlD0barCand2); } else { // Fill entries - fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, hfHelper.yD0(candidate1), hfHelper.yD0(candidate2), + fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, hfHelper.yD0(candidate1), hfHelper.yD0(candidate2), candidate1.phi(), candidate2.phi(), candidate1.pt(), candidate2.pt(), hfHelper.invMassD0ToPiK(candidate1), hfHelper.invMassD0barToKPi(candidate1), hfHelper.invMassD0ToPiK(candidate2), hfHelper.invMassD0barToKPi(candidate2)); } @@ -668,6 +667,7 @@ struct HfCorrelatorDMesonPairs { auto ptCandidate1 = candidate1.pt(); auto yCandidate1 = hfHelper.yD0(candidate1); + auto phiCandidate1 = candidate1.phi(); float massD0Cand1 = hfHelper.invMassD0ToPiK(candidate1); float massD0barCand1 = hfHelper.invMassD0barToKPi(candidate1); auto prong0Cand1 = candidate1.template prong0_as(); @@ -767,6 +767,7 @@ struct HfCorrelatorDMesonPairs { auto ptCandidate2 = candidate2.pt(); auto yCandidate2 = hfHelper.yD0(candidate2); + auto phiCandidate2 = candidate2.phi(); float massD0Cand2 = hfHelper.invMassD0ToPiK(candidate2); float massD0barCand2 = hfHelper.invMassD0barToKPi(candidate2); auto prong0Cand2 = candidate2.template prong0_as(); @@ -818,7 +819,7 @@ struct HfCorrelatorDMesonPairs { } // Fill tables - fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2, + fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2, phiCandidate1, phiCandidate2, ptCandidate1, ptCandidate2, massD0Cand1, massD0barCand1, massD0Cand2, massD0barCand2); fillMcHistos(matchedRec1, matchedRec2, isTrueDCand1, isTrueDbarCand1, isTrueDCand2, isTrueDbarCand2); entryD0PairMcInfo(originRec1, originRec2, matchedRec1, matchedRec2); @@ -826,7 +827,7 @@ struct HfCorrelatorDMesonPairs { } else { // Fill tables - fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2, + fillEntry(isDCand1, isDbarCand1, isDCand2, isDbarCand2, candidateType1, candidateType2, yCandidate1, yCandidate2, phiCandidate1, phiCandidate2, ptCandidate1, ptCandidate2, massD0Cand1, massD0barCand1, massD0Cand2, massD0barCand2); fillMcHistos(matchedRec1, matchedRec2, isTrueDCand1, isTrueDbarCand1, isTrueDCand2, isTrueDbarCand2); entryD0PairMcInfo(originRec1, originRec2, matchedRec1, matchedRec2); @@ -1011,7 +1012,7 @@ struct HfCorrelatorDMesonPairs { } // Fill pair Selection Status - entryD0PairMcGen(particle1.pt(), particle2.pt(), particle1.y(), particle2.y(), massD, massDbar, massD, massDbar, pairType, particleType1, particleType2); + entryD0PairMcGen(particle1.pt(), particle2.pt(), particle1.y(), particle2.y(), particle1.phi(), particle2.phi(), massD, massDbar, massD, massDbar, pairType, particleType1, particleType2); entryD0PairMcGenInfo(originGen1, originGen2, matchedGen1, matchedGen2); } // end inner loop From e4c50fa17c97886fa37fa0bb8ee832304f5c6a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:48:09 +0000 Subject: [PATCH 3/3] Address clang format and Antonio's comments --- PWGHF/HFC/DataModel/DMesonPairsTables.h | 12 ++++++------ PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/PWGHF/HFC/DataModel/DMesonPairsTables.h b/PWGHF/HFC/DataModel/DMesonPairsTables.h index 84ed055ed59..9ba4d72c78b 100644 --- a/PWGHF/HFC/DataModel/DMesonPairsTables.h +++ b/PWGHF/HFC/DataModel/DMesonPairsTables.h @@ -27,12 +27,12 @@ namespace o2::aod namespace hf_correlation_d_meson_pair { // Kinematic info -DECLARE_SOA_COLUMN(PtCand1, ptCand1, float); //! Transverse momentum of first candidate -DECLARE_SOA_COLUMN(PtCand2, ptCand2, float); //! Transverse momentum of second candidate -DECLARE_SOA_COLUMN(YCand1, yCand1, float); //! Rapidity of first candidate -DECLARE_SOA_COLUMN(YCand2, yCand2, float); //! Rapidity of second candidate -DECLARE_SOA_COLUMN(PhiCand1, phiCand1, float); //! Rapidity of first candidate -DECLARE_SOA_COLUMN(PhiCand2, phiCand2, float); //! Rapidity of second candidate +DECLARE_SOA_COLUMN(PtCand1, ptCand1, float); //! Transverse momentum of first candidate +DECLARE_SOA_COLUMN(PtCand2, ptCand2, float); //! Transverse momentum of second candidate +DECLARE_SOA_COLUMN(YCand1, yCand1, float); //! Rapidity of first candidate +DECLARE_SOA_COLUMN(YCand2, yCand2, float); //! Rapidity of second candidate +DECLARE_SOA_COLUMN(PhiCand1, phiCand1, float); //! Azimuthal angle of first candidate +DECLARE_SOA_COLUMN(PhiCand2, phiCand2, float); //! Azimuthal angle of second candidate // Invariant mass DECLARE_SOA_COLUMN(MDCand1, mDCand1, float); //! Invariant mass of first candidate as D DECLARE_SOA_COLUMN(MDbarCand1, mDbarCand1, float); //! Invariant mass of first candidate as Dbar diff --git a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx index 66be58e3b24..14f63d38e2d 100644 --- a/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDMesonPairs.cxx @@ -476,7 +476,8 @@ struct HfCorrelatorDMesonPairs { entryD0Pair(ptCand1, ptCand2, yCand1, yCand2, phiCand1, phiCand2, massDCand1, massDbarCand1, massDCand2, massDbarCand2, pairType, candidateType1, candidateType2); } - void fillMcHistos(int8_t matchedRec1, int8_t matchedRec2, int8_t isTrueDCand1, int8_t isTrueDbarCand1, int8_t isTrueDCand2, int8_t isTrueDbarCand2) { + void fillMcHistos(int8_t matchedRec1, int8_t matchedRec2, int8_t isTrueDCand1, int8_t isTrueDbarCand1, int8_t isTrueDCand2, int8_t isTrueDbarCand2) + { // Fill hMatchingMcRec - Cand 1 registry.fill(HIST("hMatchingMcRec"), 1); if (matchedRec1 == 1) {