Skip to content

Commit

Permalink
[DPG] Redefine the Histogram for the mother (AliceO2Group#8992)
Browse files Browse the repository at this point in the history
  • Loading branch information
upasanasharma31 authored Dec 16, 2024
1 parent 72e8f89 commit 094e04d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions DPG/Tasks/AOTTrack/qaEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ static constexpr const char* particleTitle[nParticles] = {"e", "#mu", "#pi", "K"
static constexpr int PDGs[nParticles] = {11, 13, 211, 321, 2212, 1000010020, 1000010030, 1000020030, 1000020040,
-11, -13, -211, -321, -2212, -1000010020, -1000010030, -1000020030, -1000020040};

// Histograms
std::shared_ptr<TH1> hPtmotherGenerated; // histogram to store pT of Xi and Lambda

// Pt
std::array<std::shared_ptr<TH1>, nParticles> hPtIts;
std::array<std::shared_ptr<TH1>, nParticles> hPtTpc;
Expand Down Expand Up @@ -106,6 +103,7 @@ std::array<std::shared_ptr<TH1>, nParticles> hPtItsTpcStr;
std::array<std::shared_ptr<TH1>, nParticles> hPtTrkItsTpcStr;
std::array<std::shared_ptr<TH1>, nParticles> hPtItsTpcTofStr;
std::array<std::shared_ptr<TH1>, nParticles> hPtGeneratedStr;
std::array<std::shared_ptr<TH1>, nParticles> hPtmotherGenerated; // histogram to store pT of mother
std::array<std::shared_ptr<TH1>, nParticles> hdecaylengthmother; // histogram to store decaylength of mother

// Pt for secondaries from material
Expand Down Expand Up @@ -366,6 +364,7 @@ struct QaEfficiency {
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});
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});
hPtGeneratedStr[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/generated", PDGs[histogramIndex]), "Generated (from weak decays) " + tagPt, kTH1D, {axisPt});
hPtmotherGenerated[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/generated_mother", PDGs[histogramIndex]), "Generated Mother " + tagPt, kTH1D, {axisPt});
hdecaylengthmother[histogramIndex] = histos.add<TH1>(Form("MC/pdg%i/pt/str/decayLength", PDGs[histogramIndex]), "Decay Length of mother particle" + tagPt, kTH1D, {axisPt});

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

AxisSpec axisPtMother{ptBins, "#it{p}_{T} (GeV/#it{c})"};
hPtmotherGenerated = histos.add<TH1>("MC/mother/pt/generated", "Generated pT of mother Lambda or Xi", kTH1D, {axisPtMother});

static_for<0, 1>([&](auto pdgSign) {
makeMCHistograms<pdgSign, o2::track::PID::Electron>(doEl);
makeMCHistograms<pdgSign, o2::track::PID::Muon>(doMu);
Expand Down Expand Up @@ -1267,7 +1263,7 @@ struct QaEfficiency {
break;
}
if (motherIsAccepted) {
hPtmotherGenerated->Fill(mother.pt()); // Fill generated pT for Lambda
hPtmotherGenerated[histogramIndex]->Fill(mother.pt()); // Fill generated pT for mother
}
}
}
Expand Down

0 comments on commit 094e04d

Please sign in to comment.