Skip to content

Commit 8f369aa

Browse files
author
Sushanta Tripathy
committed
Adding PID QA plots
1 parent 762c8ca commit 8f369aa

1 file changed

Lines changed: 126 additions & 0 deletions

File tree

PWGCF/TwoParticleCorrelations/Tasks/nucleibalance.cxx

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,6 +1959,8 @@ struct Lambdastarproxy {
19591959

19601960
AxisSpec dEdxAxis{400, 0., 200., "TPC dE/dx (arb. units)"};
19611961
AxisSpec betaAxis{160, 0., 1.6, "#beta_{TOF}"};
1962+
AxisSpec dcaXYAxis{200, -0.2, 0.2, "DCA_{xy} (cm)"};
1963+
AxisSpec dcaZAxis{200, -0.2, 0.2, "DCA_{z} (cm)"};
19621964

19631965
// Invariant-mass spectra
19641966
histos.add("hInvMassPKUnlike",
@@ -2112,6 +2114,78 @@ struct Lambdastarproxy {
21122114
histos.add("hNsigmaTOFKaonVsP",
21132115
"TOF n#sigma_{K} vs p; p (GeV/c); n#sigma^{TOF}_{K};Counts",
21142116
HistType::kTH2F, {pAxis, nsAxis});
2117+
2118+
// --- Additional pT-based PID QA for the final selected K/p/d candidates ---
2119+
// These histograms are needed for PID studies in the same pT intervals used by the analysis.
2120+
histos.add("hTOFBetaVsPt_K",
2121+
"TOF #beta vs p_{T} for selected K;p_{T} (GeV/c);#beta_{TOF};Counts",
2122+
HistType::kTH2F, {ptAxis, betaAxis});
2123+
histos.add("hTOFBetaVsPt_P",
2124+
"TOF #beta vs p_{T} for selected p;p_{T} (GeV/c);#beta_{TOF};Counts",
2125+
HistType::kTH2F, {ptAxis, betaAxis});
2126+
histos.add("hTOFBetaVsPt_D",
2127+
"TOF #beta vs p_{T} for selected d;p_{T} (GeV/c);#beta_{TOF};Counts",
2128+
HistType::kTH2F, {ptAxis, betaAxis});
2129+
2130+
histos.add("hNsigmaTPCKaonVsPt",
2131+
"TPC n#sigma_{K} vs p_{T};p_{T} (GeV/c);n#sigma^{TPC}_{K};Counts",
2132+
HistType::kTH2F, {ptAxis, nsAxis});
2133+
histos.add("hNsigmaTOFKaonVsPt",
2134+
"TOF n#sigma_{K} vs p_{T};p_{T} (GeV/c);n#sigma^{TOF}_{K};Counts",
2135+
HistType::kTH2F, {ptAxis, nsAxis});
2136+
2137+
histos.add("hNsigmaTPCProtonVsP",
2138+
"TPC n#sigma_{p} vs p;p (GeV/c);n#sigma^{TPC}_{p};Counts",
2139+
HistType::kTH2F, {pAxis, nsAxis});
2140+
histos.add("hNsigmaTOFProtonVsP",
2141+
"TOF n#sigma_{p} vs p;p (GeV/c);n#sigma^{TOF}_{p};Counts",
2142+
HistType::kTH2F, {pAxis, nsAxis});
2143+
histos.add("hNsigmaTPCProtonVsPt",
2144+
"TPC n#sigma_{p} vs p_{T};p_{T} (GeV/c);n#sigma^{TPC}_{p};Counts",
2145+
HistType::kTH2F, {ptAxis, nsAxis});
2146+
histos.add("hNsigmaTOFProtonVsPt",
2147+
"TOF n#sigma_{p} vs p_{T};p_{T} (GeV/c);n#sigma^{TOF}_{p};Counts",
2148+
HistType::kTH2F, {ptAxis, nsAxis});
2149+
2150+
histos.add("hNsigmaTPCDeuteronVsPt",
2151+
"TPC n#sigma_{d} vs p_{T};p_{T} (GeV/c);n#sigma^{TPC}_{d};Counts",
2152+
HistType::kTH2F, {ptAxis, nsAxis});
2153+
histos.add("hNsigmaTOFDeuteronVsPt",
2154+
"TOF n#sigma_{d} vs p_{T};p_{T} (GeV/c);n#sigma^{TOF}_{d};Counts",
2155+
HistType::kTH2F, {ptAxis, nsAxis});
2156+
2157+
histos.add("hTPCvsTOFNsigma_K",
2158+
"TPC vs TOF n#sigma for selected K;n#sigma^{TPC}_{K};n#sigma^{TOF}_{K};Counts",
2159+
HistType::kTH2F, {nsAxis, nsAxis});
2160+
histos.add("hTPCvsTOFNsigma_P",
2161+
"TPC vs TOF n#sigma for selected p;n#sigma^{TPC}_{p};n#sigma^{TOF}_{p};Counts",
2162+
HistType::kTH2F, {nsAxis, nsAxis});
2163+
histos.add("hTPCvsTOFNsigma_D",
2164+
"TPC vs TOF n#sigma for selected d;n#sigma^{TPC}_{d};n#sigma^{TOF}_{d};Counts",
2165+
HistType::kTH2F, {nsAxis, nsAxis});
2166+
2167+
// --- DCA QA for final selected K/p/d candidates ---
2168+
// Filled only when lstarEnablePidQA = 1.
2169+
histos.add("hDCAxyVsPt_K",
2170+
"DCA_{xy} vs p_{T} distribution for selected K;p_{T} (GeV/c);DCA_{xy} (cm);Counts",
2171+
HistType::kTH2F, {ptAxis, dcaXYAxis});
2172+
histos.add("hDCAzVsPt_K",
2173+
"DCA_{z} vs p_{T} distribution for selected K;p_{T} (GeV/c);DCA_{z} (cm);Counts",
2174+
HistType::kTH2F, {ptAxis, dcaZAxis});
2175+
2176+
histos.add("hDCAxyVsPt_P",
2177+
"DCA_{xy} vs p_{T} distribution for selected p;p_{T} (GeV/c);DCA_{xy} (cm);Counts",
2178+
HistType::kTH2F, {ptAxis, dcaXYAxis});
2179+
histos.add("hDCAzVsPt_P",
2180+
"DCA_{z} vs p_{T} distribution for selected p;p_{T} (GeV/c);DCA_{z} (cm);Counts",
2181+
HistType::kTH2F, {ptAxis, dcaZAxis});
2182+
2183+
histos.add("hDCAxyVsPt_D",
2184+
"DCA_{xy} vs p_{T} distribution for selected d;p_{T} (GeV/c);DCA_{xy} (cm);Counts",
2185+
HistType::kTH2F, {ptAxis, dcaXYAxis});
2186+
histos.add("hDCAzVsPt_D",
2187+
"DCA_{z} vs p_{T} distribution for selected d;p_{T} (GeV/c);DCA_{z} (cm);Counts",
2188+
HistType::kTH2F, {ptAxis, dcaZAxis});
21152189
}
21162190

21172191
// AO2D-MC QA: truth primaries + reco-to-MC matching sanity plots
@@ -2531,6 +2605,21 @@ struct Lambdastarproxy {
25312605
histos.fill(HIST("hNsigmaTOFDeuteron"), nsTOFDe);
25322606
histos.fill(HIST("hNsigmaTPCDeuteronVsP"), pD, nsTPCDe);
25332607
histos.fill(HIST("hNsigmaTOFDeuteronVsP"), pD, nsTOFDe);
2608+
histos.fill(HIST("hNsigmaTPCDeuteronVsPt"), ptD, nsTPCDe);
2609+
histos.fill(HIST("hNsigmaTOFDeuteronVsPt"), ptD, nsTOFDe);
2610+
if (hasTofDe) {
2611+
histos.fill(HIST("hTPCvsTOFNsigma_D"), nsTPCDe, nsTOFDe);
2612+
}
2613+
if constexpr (requires { trkD.beta(); }) {
2614+
const float beta = trkD.beta();
2615+
if (hasTofDe && beta > TofBetaMin && beta < TofBetaMax) {
2616+
histos.fill(HIST("hTOFBetaVsPt_D"), ptD, beta);
2617+
}
2618+
}
2619+
if constexpr (requires { trkD.dcaXY(); trkD.dcaZ(); }) {
2620+
histos.fill(HIST("hDCAxyVsPt_D"), ptD, trkD.dcaXY());
2621+
histos.fill(HIST("hDCAzVsPt_D"), ptD, trkD.dcaZ());
2622+
}
25342623
}
25352624

25362625
// build proton-proxy momentum from deuteron: p_p ≈ p_d / 2
@@ -2565,6 +2654,27 @@ struct Lambdastarproxy {
25652654
const float ptP = trkP.pt();
25662655
const float etaP = trkP.eta();
25672656
const float phiP = trkP.phi();
2657+
const double pP = static_cast<double>(ptP) * std::cosh(static_cast<double>(etaP));
2658+
2659+
if (lstarEnablePidQA.value != 0) {
2660+
histos.fill(HIST("hNsigmaTPCProtonVsP"), pP, nsTPCPr);
2661+
histos.fill(HIST("hNsigmaTOFProtonVsP"), pP, nsTOFPr);
2662+
histos.fill(HIST("hNsigmaTPCProtonVsPt"), ptP, nsTPCPr);
2663+
histos.fill(HIST("hNsigmaTOFProtonVsPt"), ptP, nsTOFPr);
2664+
if (hasTofPr) {
2665+
histos.fill(HIST("hTPCvsTOFNsigma_P"), nsTPCPr, nsTOFPr);
2666+
}
2667+
if constexpr (requires { trkP.beta(); }) {
2668+
const float beta = trkP.beta();
2669+
if (hasTofPr && beta > TofBetaMin && beta < TofBetaMax) {
2670+
histos.fill(HIST("hTOFBetaVsPt_P"), ptP, beta);
2671+
}
2672+
}
2673+
if constexpr (requires { trkP.dcaXY(); trkP.dcaZ(); }) {
2674+
histos.fill(HIST("hDCAxyVsPt_P"), ptP, trkP.dcaXY());
2675+
histos.fill(HIST("hDCAzVsPt_P"), ptP, trkP.dcaZ());
2676+
}
2677+
}
25682678

25692679
const float pxP = ptP * std::cos(phiP);
25702680
const float pyP = ptP * std::sin(phiP);
@@ -2610,6 +2720,21 @@ struct Lambdastarproxy {
26102720
histos.fill(HIST("hNsigmaTOFKaon"), nsTOFK);
26112721
histos.fill(HIST("hNsigmaTPCKaonVsP"), pK, nsTPCK);
26122722
histos.fill(HIST("hNsigmaTOFKaonVsP"), pK, nsTOFK);
2723+
histos.fill(HIST("hNsigmaTPCKaonVsPt"), ptK, nsTPCK);
2724+
histos.fill(HIST("hNsigmaTOFKaonVsPt"), ptK, nsTOFK);
2725+
if (hasTofK) {
2726+
histos.fill(HIST("hTPCvsTOFNsigma_K"), nsTPCK, nsTOFK);
2727+
}
2728+
if constexpr (requires { trkK.beta(); }) {
2729+
const float beta = trkK.beta();
2730+
if (hasTofK && beta > TofBetaMin && beta < TofBetaMax) {
2731+
histos.fill(HIST("hTOFBetaVsPt_K"), ptK, beta);
2732+
}
2733+
}
2734+
if constexpr (requires { trkK.dcaXY(); trkK.dcaZ(); }) {
2735+
histos.fill(HIST("hDCAxyVsPt_K"), ptK, trkK.dcaXY());
2736+
histos.fill(HIST("hDCAzVsPt_K"), ptK, trkK.dcaZ());
2737+
}
26132738
}
26142739

26152740
const float pxK = ptK * std::cos(phiK);
@@ -2686,6 +2811,7 @@ struct Lambdastarproxy {
26862811

26872812
const float pxTot = pr.px + k.px;
26882813
const float pyTot = pr.py + k.py;
2814+
const float pzTot = pr.pz + k.pz;
26892815
const float ptPair = ptFromPxPy(pxTot, pyTot);
26902816

26912817
// Inclusive invariant-mass spectrum for the #Lambda^{*} proxy (d/2 + K)

0 commit comments

Comments
 (0)