Skip to content

Commit fa9b8b4

Browse files
[PWGJE] add new histograms to calculate tof matching efficiency (#13379)
1 parent 8350cee commit fa9b8b4

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

PWGJE/Tasks/jetShape.cxx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,16 @@ struct JetShapeTask {
100100
{"event/vertexz", ";Vtx_{z} (cm);Entries", {HistType::kTH1F, {{100, -20, 20}}}},
101101
{"eventCounter", "eventCounter", {HistType::kTH1F, {{1, 0, +1, ""}}}},
102102
{"ptVsCentrality", "ptvscentrality", {HistType::kTH2F, {{100, 0, 100}, {300, 0, 300}}}},
103-
{"ptResolution", "ptResolution", {HistType::kTH2F, {{50, 0, ptMax}, {100, -1.0, +1.0}}}},
104-
{"ptHistogramPion", "ptHistogramPion", {HistType::kTH1F, {{50, 0, ptMax}}}},
105-
{"ptHistogramKaon", "ptHistogramKaon", {HistType::kTH1F, {{50, 0, ptMax}}}},
106-
{"ptHistogramProton", "ptHistogramProton", {HistType::kTH1F, {{50, 0, ptMax}}}},
107-
{"ptGeneratedPion", "ptGeneratedPion", {HistType::kTH1F, {{50, 0, ptMax}}}},
108-
{"ptGeneratedKaon", "ptGeneratedKaon", {HistType::kTH1F, {{50, 0, ptMax}}}},
109-
{"ptGeneratedProton", "ptGeneratedProton", {HistType::kTH1F, {{50, 0, ptMax}}}}}};
103+
{"ptResolution", "ptResolution", {HistType::kTH2F, {{nBinsPt, 0, ptMax}, {100, -1.0, +1.0}}}},
104+
{"ptHistogramPion", "ptHistogramPion", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
105+
{"ptHistogramKaon", "ptHistogramKaon", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
106+
{"ptHistogramProton", "ptHistogramProton", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
107+
{"ptHistogramPionTof", "ptHistogramPionTof", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
108+
{"ptHistogramKaonTof", "ptHistogramKaonTof", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
109+
{"ptHistogramProtonTof", "ptHistogramProtonTof", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
110+
{"ptGeneratedPion", "ptGeneratedPion", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
111+
{"ptGeneratedKaon", "ptGeneratedKaon", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}},
112+
{"ptGeneratedProton", "ptGeneratedProton", {HistType::kTH1F, {{nBinsPt, 0, ptMax}}}}}};
110113

111114
Configurable<float> vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"};
112115

@@ -413,6 +416,17 @@ struct JetShapeTask {
413416
if (std::abs(mcParticle.pdgCode()) == PDG_t::kProton)
414417
registry.fill(HIST("ptHistogramProton"), mcParticle.pt());
415418
}
419+
420+
if (track.hasTOF()) {
421+
if (mcParticle.isPhysicalPrimary() && std::fabs(mcParticle.y()) < mcRapidityMax) {
422+
if (std::abs(mcParticle.pdgCode()) == PDG_t::kPiPlus)
423+
registry.fill(HIST("ptHistogramPionTof"), mcParticle.pt());
424+
if (std::abs(mcParticle.pdgCode()) == PDG_t::kKPlus)
425+
registry.fill(HIST("ptHistogramKaonTof"), mcParticle.pt());
426+
if (std::abs(mcParticle.pdgCode()) == PDG_t::kProton)
427+
registry.fill(HIST("ptHistogramProtonTof"), mcParticle.pt());
428+
}
429+
}
416430
}
417431
}
418432
}

0 commit comments

Comments
 (0)