Skip to content

Commit 094e04d

Browse files
[DPG] Redefine the Histogram for the mother (AliceO2Group#8992)
1 parent 72e8f89 commit 094e04d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

DPG/Tasks/AOTTrack/qaEfficiency.cxx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ static constexpr const char* particleTitle[nParticles] = {"e", "#mu", "#pi", "K"
7676
static constexpr int PDGs[nParticles] = {11, 13, 211, 321, 2212, 1000010020, 1000010030, 1000020030, 1000020040,
7777
-11, -13, -211, -321, -2212, -1000010020, -1000010030, -1000020030, -1000020040};
7878

79-
// Histograms
80-
std::shared_ptr<TH1> hPtmotherGenerated; // histogram to store pT of Xi and Lambda
81-
8279
// Pt
8380
std::array<std::shared_ptr<TH1>, nParticles> hPtIts;
8481
std::array<std::shared_ptr<TH1>, nParticles> hPtTpc;
@@ -106,6 +103,7 @@ std::array<std::shared_ptr<TH1>, nParticles> hPtItsTpcStr;
106103
std::array<std::shared_ptr<TH1>, nParticles> hPtTrkItsTpcStr;
107104
std::array<std::shared_ptr<TH1>, nParticles> hPtItsTpcTofStr;
108105
std::array<std::shared_ptr<TH1>, nParticles> hPtGeneratedStr;
106+
std::array<std::shared_ptr<TH1>, nParticles> hPtmotherGenerated; // histogram to store pT of mother
109107
std::array<std::shared_ptr<TH1>, nParticles> hdecaylengthmother; // histogram to store decaylength of mother
110108

111109
// Pt for secondaries from material
@@ -366,6 +364,7 @@ struct QaEfficiency {
366364
hPtTrkItsTpcStr[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/trk/its_tpc", PDGs[histogramIndex]), "ITS-TPC tracks (reco from weak decays) " + tagPt, kTH1D, {axisPt});
367365
hPtItsTpcTofStr[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/its_tpc_tof", PDGs[histogramIndex]), "ITS-TPC-TOF tracks (from weak decays) " + tagPt, kTH1D, {axisPt});
368366
hPtGeneratedStr[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/generated", PDGs[histogramIndex]), "Generated (from weak decays) " + tagPt, kTH1D, {axisPt});
367+
hPtmotherGenerated[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/generated_mother", PDGs[histogramIndex]), "Generated Mother " + tagPt, kTH1D, {axisPt});
369368
hdecaylengthmother[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/decayLength", PDGs[histogramIndex]), "Decay Length of mother particle" + tagPt, kTH1D, {axisPt});
370369

371370
// Ter
@@ -663,9 +662,6 @@ struct QaEfficiency {
663662
histos.add("MC/occ_cent/reco/neg/its", "ITS Negative ", kTH3D, {axisOcc, axisCent, axisPt});
664663
}
665664

666-
AxisSpec axisPtMother{ptBins, "#it{p}_{T} (GeV/#it{c})"};
667-
hPtmotherGenerated = histos.add<TH1>("MC/mother/pt/generated", "Generated pT of mother Lambda or Xi", kTH1D, {axisPtMother});
668-
669665
static_for<0, 1>([&](auto pdgSign) {
670666
makeMCHistograms<pdgSign, o2::track::PID::Electron>(doEl);
671667
makeMCHistograms<pdgSign, o2::track::PID::Muon>(doMu);
@@ -1267,7 +1263,7 @@ struct QaEfficiency {
12671263
break;
12681264
}
12691265
if (motherIsAccepted) {
1270-
hPtmotherGenerated->Fill(mother.pt()); // Fill generated pT for Lambda
1266+
hPtmotherGenerated[histogramIndex]->Fill(mother.pt()); // Fill generated pT for mother
12711267
}
12721268
}
12731269
}

0 commit comments

Comments
 (0)