Skip to content

Commit 61cbcdb

Browse files
authored
[ALICE3] Update histograms in otf decayer QA task (#16319)
1 parent 43dfb1c commit 61cbcdb

1 file changed

Lines changed: 38 additions & 28 deletions

File tree

ALICE3/Tasks/alice3DecayerQa.cxx

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
///
12-
/// \file alice3DecayerQA.cxx
12+
/// \file alice3DecayerQa.cxx
1313
///
1414
/// \brief QA task for otf decayer
1515
///
@@ -36,7 +36,7 @@
3636
using namespace o2;
3737
using namespace o2::framework;
3838

39-
struct Alice3DecayerQA {
39+
struct Alice3DecayerQa {
4040
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
4141
SliceCache cache;
4242

@@ -68,6 +68,9 @@ struct Alice3DecayerQA {
6868
Partition<aod::McPartWithDaus> trueLambdas = aod::mcparticle::pdgCode == static_cast<int>(PDG_t::kLambda0);
6969
Partition<aod::McPartWithDaus> trueXiMinus = aod::mcparticle::pdgCode == static_cast<int>(PDG_t::kXiMinus);
7070

71+
static constexpr size_t NCascadeDaughters = 2;
72+
static constexpr size_t NV0Daughters = 2;
73+
7174
template <typename TParticle>
7275
float radius(const TParticle& particle) const
7376
{
@@ -106,20 +109,27 @@ struct Alice3DecayerQA {
106109
histos.add("MCWithDau/hE", "hE", kTH1D, {axes.axisPt});
107110

108111
// QA with daughters from Decayer
109-
histos.add("K0S/hGeneratedPt", "hGeneratedPt", kTH1D, {axes.axisPt});
110-
histos.add("K0S/hHasDecayed", "hHasDecayed", kTH1D, {{2, -0.5, 1.5}});
111-
histos.add("K0S/hPosDauDecayRadius", "hPosDauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
112-
histos.add("K0S/hNegDauDecayRadius", "hNegDauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
113-
histos.add("Lambda/hGeneratedPt", "hGeneratedPt", kTH1D, {axes.axisPt});
114-
histos.add("Lambda/hHasDecayed", "hHasDecayed", kTH1D, {{2, -0.5, 1.5}});
115-
histos.add("Lambda/hPosDauDecayRadius", "hPosDauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
116-
histos.add("Lambda/hNegDauDecayRadius", "hNegDauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
117-
histos.add("XiMinus/hGeneratedPt", "hGeneratedPt", kTH1D, {axes.axisPt});
118-
histos.add("XiMinus/hHasDecayed", "hHasDecayed", kTH1D, {{2, -0.5, 1.5}});
119-
histos.add("XiMinus/hBachDauDecayRadius", "hBachDauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
120-
histos.add("XiMinus/hV0DauDecayRadius", "hV0DauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
121-
histos.add("XiMinus/hPosDauDecayRadius", "hPosDauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
122-
histos.add("XiMinus/hNegDauDecayRadius", "hNegDauDecayRadius", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
112+
histos.add("K0S/hGeneratedPt", "hGeneratedPt;#it{p}_{T} (GeV/#it{c})", kTH1D, {axes.axisPt});
113+
histos.add("K0S/hPosDauDecayRadius", "hPosDauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
114+
histos.add("K0S/hNegDauDecayRadius", "hNegDauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
115+
histos.add("Lambda/hGeneratedPt", "hGeneratedPt;#it{p}_{T} (GeV/#it{c})", kTH1D, {axes.axisPt});
116+
histos.add("Lambda/hPosDauDecayRadius", "hPosDauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
117+
histos.add("Lambda/hNegDauDecayRadius", "hNegDauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
118+
histos.add("XiMinus/hGeneratedPt", "hGeneratedPt;#it{p}_{T} (GeV/#it{c})", kTH1D, {axes.axisPt});
119+
histos.add("XiMinus/hBachDauDecayRadius", "hBachDauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
120+
histos.add("XiMinus/hV0DauDecayRadius", "hV0DauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
121+
histos.add("XiMinus/hPosDauDecayRadius", "hPosDauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
122+
histos.add("XiMinus/hNegDauDecayRadius", "hNegDauDecayRadius;Decay radius 2D;#it{p}_{T} (GeV/#it{c})", kTH2D, {axes.axisRadiusLog, axes.axisPtLog});
123+
124+
auto hCheckHasK0SDecayed = histos.add<TH1>("K0S/hHasDecayed", "hHasDecayed", kTH1D, {{2, -0.5, 1.5}});
125+
hCheckHasK0SDecayed->GetXaxis()->SetBinLabel(1, "No");
126+
hCheckHasK0SDecayed->GetXaxis()->SetBinLabel(2, "Yes");
127+
auto hCheckHasLambdaDecayed = histos.add<TH1>("Lambda/hHasDecayed", "hHasDecayed", kTH1D, {{2, -0.5, 1.5}});
128+
hCheckHasLambdaDecayed->GetXaxis()->SetBinLabel(1, "No");
129+
hCheckHasLambdaDecayed->GetXaxis()->SetBinLabel(2, "Yes");
130+
auto hCheckHasXiMinusDecayed = histos.add<TH1>("XiMinus/hHasDecayed", "hHasDecayed", kTH1D, {{2, -0.5, 1.5}});
131+
hCheckHasXiMinusDecayed->GetXaxis()->SetBinLabel(1, "No");
132+
hCheckHasXiMinusDecayed->GetXaxis()->SetBinLabel(2, "Yes");
123133
}
124134

125135
void process(const aod::McCollision& collision, const aod::McPartWithDaus& particles)
@@ -152,9 +162,9 @@ struct Alice3DecayerQA {
152162
for (const auto& particle : trueK0ShortGrouped) {
153163
histos.fill(HIST("K0S/hGeneratedPt"), particle.pt());
154164
if (particle.has_daughters()) {
155-
histos.fill(HIST("K0S/hHasDecayed"), 0);
165+
histos.fill(HIST("K0S/hHasDecayed"), 1);
156166
auto daughters = particle.daughtersIds();
157-
if (daughters.size() == 2) {
167+
if (daughters.size() == NV0Daughters) {
158168
auto dau0 = particles.rawIteratorAt(daughters.front());
159169
auto dau1 = particles.rawIteratorAt(daughters.back());
160170

@@ -169,15 +179,15 @@ struct Alice3DecayerQA {
169179
}
170180
}
171181
} else {
172-
histos.fill(HIST("K0S/hHasDecayed"), 1);
182+
histos.fill(HIST("K0S/hHasDecayed"), 0);
173183
}
174184
}
175185
for (const auto& particle : trueLambdasGrouped) {
176186
histos.fill(HIST("Lambda/hGeneratedPt"), particle.pt());
177187
if (particle.has_daughters()) {
178-
histos.fill(HIST("Lambda/hHasDecayed"), 0);
188+
histos.fill(HIST("Lambda/hHasDecayed"), 1);
179189
auto daughters = particle.daughtersIds();
180-
if (daughters.size() == 2) {
190+
if (daughters.size() == NV0Daughters) {
181191
auto dau0 = particles.rawIteratorAt(daughters[0]);
182192
auto dau1 = particles.rawIteratorAt(daughters[1]);
183193

@@ -192,15 +202,15 @@ struct Alice3DecayerQA {
192202
}
193203
}
194204
} else {
195-
histos.fill(HIST("Lambda/hHasDecayed"), 1);
205+
histos.fill(HIST("Lambda/hHasDecayed"), 0);
196206
}
197207
}
198208
for (const auto& particle : trueXiMinusGrouped) {
199209
histos.fill(HIST("XiMinus/hGeneratedPt"), particle.pt());
200210
if (particle.has_daughters()) {
201-
histos.fill(HIST("XiMinus/hHasDecayed"), 0);
211+
histos.fill(HIST("XiMinus/hHasDecayed"), 1);
202212
auto daughters = particle.daughtersIds();
203-
if (daughters.size() == 2) {
213+
if (daughters.size() == NCascadeDaughters) {
204214
auto dau0 = particles.rawIteratorAt(daughters.front());
205215
auto dau1 = particles.rawIteratorAt(daughters.back());
206216

@@ -216,7 +226,7 @@ struct Alice3DecayerQA {
216226
// Lambda -> p pi-
217227
if (v0.has_daughters()) {
218228
auto v0daughters = v0.daughtersIds();
219-
if (v0daughters.size() == 2) {
229+
if (v0daughters.size() == NV0Daughters) {
220230
auto v0dau0 = particles.rawIteratorAt(v0daughters.front());
221231
auto v0dau1 = particles.rawIteratorAt(v0daughters.back());
222232
const bool lambdaDecay = (v0dau0.pdgCode() == PDG_t::kProton && v0dau1.pdgCode() == PDG_t::kPiMinus) ||
@@ -232,7 +242,7 @@ struct Alice3DecayerQA {
232242
}
233243
}
234244
} else {
235-
histos.fill(HIST("XiMinus/hHasDecayed"), 1);
245+
histos.fill(HIST("XiMinus/hHasDecayed"), 0);
236246
}
237247
}
238248

@@ -266,10 +276,10 @@ struct Alice3DecayerQA {
266276
}
267277
}
268278

269-
PROCESS_SWITCH(Alice3DecayerQA, process, "fill MC-with-dau histograms", true);
279+
PROCESS_SWITCH(Alice3DecayerQa, process, "fill MC-with-dau histograms", true);
270280
};
271281

272282
WorkflowSpec defineDataProcessing(ConfigContext const& ctx)
273283
{
274-
return WorkflowSpec{adaptAnalysisTask<Alice3DecayerQA>(ctx)};
284+
return WorkflowSpec{adaptAnalysisTask<Alice3DecayerQa>(ctx)};
275285
}

0 commit comments

Comments
 (0)