Skip to content

Commit 19f890e

Browse files
authored
Add pair-pT histogram axis
1 parent 1d671dd commit 19f890e

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

PWGCF/Femto/Core/pairHistManager.h

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ enum PairHist {
9696
kKstarVsMtVsMinvVsPt1VsPt2,
9797
kKstarVsMtVsMinvVsPt1VsPt2VsMult,
9898
kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent,
99+
// higher dimensions with pt, invariant mass and pair pt
100+
kKstarVsMinvVsPtPairVsMult,
101+
kKstarVsMtVsMinvVsPtPairVsMult,
102+
kKstarVsMtVsMinvVsPtPairVsPt1VsPt2,
103+
kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult,
104+
kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent,
99105
// dalitz plots
100106
kDalitz, // between a track and pos/neg daughter of another particle
101107
// reco-vs-mc-truth correlation (requires BOTH a reco pair and matched mc info)
@@ -193,6 +199,11 @@ struct ConfPairBinning : o2::framework::ConfigurableGroup {
193199
o2::framework::Configurable<bool> plotKstarVsMtVsMinv1VsPt1VsPt2{"plotKstarVsMtVsMinv1VsPt1VsPt2", false, "(Reco) Enable 5D histogram (Kstar Vs Mt Vs Minv Vs Pt1 Vs Pt2)"};
194200
o2::framework::Configurable<bool> plotKstarVsMtVsMinv1VsPt1VsPt2VsMult{"plotKstarVsMtVsMinv1VsPt1VsPt2VsMult", false, "(Reco) Enable 6D histogram (Kstar Vs Mt Vs Minv Vs Pt1 Vs Pt2 Vs Mult)"};
195201
o2::framework::Configurable<bool> plotKstarVsMtVsMinv1VsPt1VsPt2VsMultVsCent{"plotKstarVsMtVsMinv1VsPt1VsPt2VsMultVsCent", false, "(Reco) Enable 7D histogram (Kstar Vs Mt Vs Minv Vs Pt1 Vs Pt2 Vs Mult Vs Cent)"};
202+
o2::framework::Configurable<bool> plotKstarVsMinvVsPtPairVsMult{"plotKstarVsMinvVsPtPairVsMult", false, "(Reco) Enable 4D histogram (Kstar Vs Minv Vs PtPair Vs Mult)"};
203+
o2::framework::Configurable<bool> plotKstarVsMtVsMinvVsPtPairVsMult{"plotKstarVsMtVsMinvVsPtPairVsMult", false, "(Reco) Enable 5D histogram (Kstar Vs Mt Vs Minv Vs PtPair Vs Mult)"};
204+
o2::framework::Configurable<bool> plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2{"plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2", false, "(Reco) Enable 6D histogram (Kstar Vs Mt Vs Minv Vs PtPair Vs Pt1 Vs Pt2)"};
205+
o2::framework::Configurable<bool> plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult{"plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult", false, "(Reco) Enable 7D histogram (Kstar Vs Mt Vs Minv Vs PtPair Vs Pt1 Vs Pt2 Vs Mult)"};
206+
o2::framework::Configurable<bool> plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent{"plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent", false, "(Reco) Enable 8D histogram (Kstar Vs Mt Vs Minv Vs PtPair Vs Pt1 Vs Pt2 Vs Mult Vs Cent)"};
196207
o2::framework::Configurable<bool> plotDalitz{"plotDalitz", false, "(Reco) Enable dalitz plot. Not supported for pure mc-truth pairs (no trackTable/daughter structure)"};
197208
o2::framework::Configurable<bool> plotDeltaEtaDeltaPhi{"plotDeltaEtaDeltaPhi", false, "(Reco/Mc) Plot #Delta#phi vs #Delta#eta"};
198209
o2::framework::ConfigurableAxis kstar{"kstar", {{600, 0, 6}}, "kstar"};
@@ -205,6 +216,7 @@ struct ConfPairBinning : o2::framework::ConfigurableGroup {
205216
o2::framework::ConfigurableAxis mass1{"mass1", {{100, 0, 2}}, "Mass binning for particle 1 (if particle has mass getter, otherwise PDG mass)"};
206217
o2::framework::ConfigurableAxis mass2{"mass2", {{100, 0, 2}}, "Mass binning for particle 2 (if particle has mass getter, otherwise PDG mass)"};
207218
o2::framework::ConfigurableAxis massInv{"massInv", {{100, 0, 2}}, "Invariant Mass binning"};
219+
o2::framework::ConfigurableAxis ptPair{"ptPair", {{120, 0, 12}}, "Pair transverse momentum binning (from summed px and py of both particles)"};
208220
o2::framework::ConfigurableAxis dalitzMtot{"dalitzMtot", {{100, 0, 10}}, "Total invariant mass squared binning in darlitz plot"};
209221
o2::framework::ConfigurableAxis dalitzM12{"dalitzM12", {{100, 0, 10}}, "Mass12 binning of darlitz plot"};
210222
o2::framework::ConfigurableAxis dalitzM13{"dalitzM13", {{100, 0, 10}}, "Mass13 binning of darlitz plot"};
@@ -285,6 +297,11 @@ constexpr std::array<histmanager::HistInfo<PairHist>, kPairHistogramLast>
285297
{kKstarVsMtVsMinvVsPt1VsPt2, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2}; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c})"},
286298
{kKstarVsMtVsMinvVsPt1VsPt2VsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2VsMult", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity"},
287299
{kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2} vs multiplicity vs centrality; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity; Centrality (%)"},
300+
{kKstarVsMinvVsPtPairVsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMinvVsPtPairVsMult", "k* vs m_{Inv} vs p_{T,pair} vs multiplicity; k* (GeV/#it{c}); m_{Inv} (GeV/#it{c}^{2}); p_{T,pair} (GeV/#it{c}); Multiplicity"},
301+
{kKstarVsMtVsMinvVsPtPairVsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPtPairVsMult", "k* vs m_{T} vs m_{Inv} vs p_{T,pair} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,pair} (GeV/#it{c}); Multiplicity"},
302+
{kKstarVsMtVsMinvVsPtPairVsPt1VsPt2, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPtPairVsPt1VsPt2", "k* vs m_{T} vs m_{Inv} vs p_{T,pair} vs p_{T,1} vs p_{T,2}; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,pair} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c})"},
303+
{kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult", "k* vs m_{T} vs m_{Inv} vs p_{T,pair} vs p_{T,1} vs p_{T,2} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,pair} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity"},
304+
{kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent", "k* vs m_{T} vs m_{Inv} vs p_{T,pair} vs p_{T,1} vs p_{T,2} vs multiplicity vs centrality; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,pair} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity; Centrality (%)"},
288305
{kDalitz, o2::framework::HistType::kTHnSparseF, "hDalitz", "Dalitz plot; k* (GeV/#it{c}); m^{2}_{123} (GeV/#it{c}^{2})^{2}; m^{2}_{12} (GeV/#it{c}^{2})^{2}; m^{2}_{13} (GeV/#it{c}^{2})^{2};"},
289306
// reco-vs-mc-truth correlation
290307
{kTrueKstarVsKstar, o2::framework::HistType::kTH2F, "hTrueKstarVsKstar", "k*_{True} vs k*; k*_{True} (GeV/#it{c}); k* (GeV/#it{c})"},
@@ -374,6 +391,11 @@ constexpr std::array<histmanager::HistInfo<PairHist>, kPairHistogramLast>
374391
{kKstarVsMtVsMinvVsPt1VsPt2, {(confAnalysis).kstar, (confAnalysis).mt, (confAnalysis).massInv, (confAnalysis).pt1, (confAnalysis).pt2}}, \
375392
{kKstarVsMtVsMinvVsPt1VsPt2VsMult, {(confAnalysis).kstar, (confAnalysis).mt, (confAnalysis).massInv, (confAnalysis).pt1, (confAnalysis).pt2, (confAnalysis).multiplicity}}, \
376393
{kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, {(confAnalysis).kstar, (confAnalysis).mt, (confAnalysis).massInv, (confAnalysis).pt1, (confAnalysis).pt2, (confAnalysis).multiplicity, (confAnalysis).centrality}}, \
394+
{kKstarVsMinvVsPtPairVsMult, {(confAnalysis).kstar, (confAnalysis).massInv, (confAnalysis).ptPair, (confAnalysis).multiplicity}}, \
395+
{kKstarVsMtVsMinvVsPtPairVsMult, {(confAnalysis).kstar, (confAnalysis).mt, (confAnalysis).massInv, (confAnalysis).ptPair, (confAnalysis).multiplicity}}, \
396+
{kKstarVsMtVsMinvVsPtPairVsPt1VsPt2, {(confAnalysis).kstar, (confAnalysis).mt, (confAnalysis).massInv, (confAnalysis).ptPair, (confAnalysis).pt1, (confAnalysis).pt2}}, \
397+
{kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult, {(confAnalysis).kstar, (confAnalysis).mt, (confAnalysis).massInv, (confAnalysis).ptPair, (confAnalysis).pt1, (confAnalysis).pt2, (confAnalysis).multiplicity}}, \
398+
{kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent, {(confAnalysis).kstar, (confAnalysis).mt, (confAnalysis).massInv, (confAnalysis).ptPair, (confAnalysis).pt1, (confAnalysis).pt2, (confAnalysis).multiplicity, (confAnalysis).centrality}}, \
377399
{kDalitz, {(confAnalysis).kstar, (confAnalysis).dalitzMtot, (confAnalysis).dalitzM12, (confAnalysis).dalitzM13}}, \
378400
{kDeltaEtaDeltaPhi, {(confAnalysis).binningDeltaPhi, (confAnalysis).binningDeltaEta}}, \
379401
{kQout, {(confAnalysis).qout}}, \
@@ -538,6 +560,12 @@ class PairHistManager
538560
mPlotKstarVsMtVsMinvVsPt1VsPt2VsMult = ConfPairBinning.plotKstarVsMtVsMinv1VsPt1VsPt2VsMult.value;
539561
mPlotKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent = ConfPairBinning.plotKstarVsMtVsMinv1VsPt1VsPt2VsMultVsCent.value;
540562

563+
mPlotKstarVsMinvVsPtPairVsMult = ConfPairBinning.plotKstarVsMinvVsPtPairVsMult.value;
564+
mPlotKstarVsMtVsMinvVsPtPairVsMult = ConfPairBinning.plotKstarVsMtVsMinvVsPtPairVsMult.value;
565+
mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2 = ConfPairBinning.plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2.value;
566+
mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult = ConfPairBinning.plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult.value;
567+
mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent = ConfPairBinning.plotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent.value;
568+
541569
mPlotDalitz = ConfPairBinning.plotDalitz.value;
542570
mPlotDeltaEtaDeltaPhi = ConfPairBinning.plotDeltaEtaDeltaPhi.value;
543571
mPlotBertschPratt = ConfPairBinning.plotBertschPratt.value;
@@ -651,6 +679,9 @@ class PairHistManager
651679
// set kT
652680
mKt = getKt(mParticle1, mParticle2);
653681

682+
// set pair pT (from summed px and py of both particles)
683+
mPtPair = getPtPair(mParticle1, mParticle2);
684+
654685
// set mT
655686
mMt = getMt(mParticle1, mParticle2);
656687

@@ -960,6 +991,22 @@ class PairHistManager
960991
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, HistTable), getHistDesc(kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, HistTable), getHistType(kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, HistTable), {Specs.at(kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent)});
961992
}
962993

994+
if (mPlotKstarVsMinvVsPtPairVsMult) {
995+
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMinvVsPtPairVsMult, HistTable), getHistDesc(kKstarVsMinvVsPtPairVsMult, HistTable), getHistType(kKstarVsMinvVsPtPairVsMult, HistTable), {Specs.at(kKstarVsMinvVsPtPairVsMult)});
996+
}
997+
if (mPlotKstarVsMtVsMinvVsPtPairVsMult) {
998+
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMtVsMinvVsPtPairVsMult, HistTable), getHistDesc(kKstarVsMtVsMinvVsPtPairVsMult, HistTable), getHistType(kKstarVsMtVsMinvVsPtPairVsMult, HistTable), {Specs.at(kKstarVsMtVsMinvVsPtPairVsMult)});
999+
}
1000+
if (mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2) {
1001+
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2, HistTable), getHistDesc(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2, HistTable), getHistType(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2, HistTable), {Specs.at(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2)});
1002+
}
1003+
if (mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult) {
1004+
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult, HistTable), getHistDesc(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult, HistTable), getHistType(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult, HistTable), {Specs.at(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult)});
1005+
}
1006+
if (mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent) {
1007+
mHistogramRegistry->add(analysisDir + getHistNameV2(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent, HistTable), getHistDesc(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent, HistTable), getHistType(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent, HistTable), {Specs.at(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent)});
1008+
}
1009+
9631010
if (mPlotDalitz) {
9641011
mHistogramRegistry->add(analysisDir + getHistNameV2(kDalitz, HistTable), getHistDesc(kDalitz, HistTable), getHistType(kDalitz, HistTable), {Specs.at(kDalitz)});
9651012
}
@@ -1225,6 +1272,21 @@ class PairHistManager
12251272
if (mPlotKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent) {
12261273
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, HistTable)), mKstar, mMt, mMassInv, mParticle1.Pt(), mParticle2.Pt(), mMult, mCent);
12271274
}
1275+
if (mPlotKstarVsMinvVsPtPairVsMult) {
1276+
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMinvVsPtPairVsMult, HistTable)), mKstar, mMassInv, mPtPair, mMult);
1277+
}
1278+
if (mPlotKstarVsMtVsMinvVsPtPairVsMult) {
1279+
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMtVsMinvVsPtPairVsMult, HistTable)), mKstar, mMt, mMassInv, mPtPair, mMult);
1280+
}
1281+
if (mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2) {
1282+
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2, HistTable)), mKstar, mMt, mMassInv, mPtPair, mParticle1.Pt(), mParticle2.Pt());
1283+
}
1284+
if (mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult) {
1285+
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult, HistTable)), mKstar, mMt, mMassInv, mPtPair, mParticle1.Pt(), mParticle2.Pt(), mMult);
1286+
}
1287+
if (mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent) {
1288+
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent, HistTable)), mKstar, mMt, mMassInv, mPtPair, mParticle1.Pt(), mParticle2.Pt(), mMult, mCent);
1289+
}
12281290
if (mPlotDalitz) {
12291291
mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kDalitz, HistTable)), mKstar, mMassTot2, mMass12, mMass13);
12301292
}
@@ -1345,6 +1407,12 @@ class PairHistManager
13451407
return static_cast<float>(kt);
13461408
}
13471409

1410+
float getPtPair(ROOT::Math::PtEtaPhiMVector const& part1, ROOT::Math::PtEtaPhiMVector const& part2)
1411+
{
1412+
// transverse momentum of the combined pair, i.e. sqrt((px1+px2)^2 + (py1+py2)^2)
1413+
return static_cast<float>((part1 + part2).Pt());
1414+
}
1415+
13481416
float getMt(ROOT::Math::PtEtaPhiMVector const& part1, ROOT::Math::PtEtaPhiMVector const& part2)
13491417
{
13501418
auto sum = part1 + part2;
@@ -1541,6 +1609,7 @@ class PairHistManager
15411609
float mKt = 0.f;
15421610
float mMt = 0.f;
15431611
float mMassInv = 0.f;
1612+
float mPtPair = 0.f;
15441613
float mMult = 0.f;
15451614
float mCent = 0.f;
15461615
double mMass12 = 0.;
@@ -1599,6 +1668,12 @@ class PairHistManager
15991668
bool mPlotKstarVsMtVsMinvVsPt1VsPt2VsMult = false;
16001669
bool mPlotKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent = false;
16011670

1671+
bool mPlotKstarVsMinvVsPtPairVsMult = false;
1672+
bool mPlotKstarVsMtVsMinvVsPtPairVsMult = false;
1673+
bool mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2 = false;
1674+
bool mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMult = false;
1675+
bool mPlotKstarVsMtVsMinvVsPtPairVsPt1VsPt2VsMultVsCent = false;
1676+
16021677
bool mPlotDalitz = false;
16031678
bool mPlotDeltaEtaDeltaPhi = false;
16041679

0 commit comments

Comments
 (0)