Skip to content

Commit 3c839fa

Browse files
[PWGJE] Fix histgrams for PID (#10777)
1 parent bbeb057 commit 3c839fa

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

PWGJE/Tasks/jetShape.cxx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ using namespace o2::framework::expressions;
4141

4242
struct JetShapeTask {
4343
HistogramRegistry registry{"registry",
44-
{{"tpcTofPi", "tpcTofPi", {HistType::kTH3F, {{401, -10.025f, 10.025f}, {401, -10.025f, 10.025f}, {100, 0, 5}}}},
45-
{"tpcPi", "tpcPi", {HistType::kTH2F, {{500, 0, 5}, {401, -10.025f, 10.025f}}}},
46-
{"tofPi", "tofPi", {HistType::kTH2F, {{500, 0, 5}, {401, -10.025f, 10.025f}}}},
47-
{"tpcTofPr", "tpcTofPr", {HistType::kTH3F, {{401, -10.025f, 10.025f}, {401, -10.025f, 10.025f}, {100, 0, 5}}}},
48-
{"tpcPr", "tpcPr", {HistType::kTH2F, {{500, 0, 5}, {401, -10.025f, 10.025f}}}},
49-
{"tofPr", "tofPr", {HistType::kTH2F, {{500, 0, 5}, {401, -10.025f, 10.025f}}}},
44+
{{"tpcTofPi", "tpcTofPi", {HistType::kTHnSparseD, {{101, -10.1f, 10.1f}, {20, -10, 10}, {25, 0, 5}, {14, 0, 7}}}},
45+
{"tpcPi", "tpcPi", {HistType::kTH2F, {{100, 0, 5}, {401, -10.025f, 10.025f}}}},
46+
{"tofPi", "tofPi", {HistType::kTH2F, {{100, 0, 5}, {401, -10.025f, 10.025f}}}},
47+
{"tpcTofPr", "tpcTofPr", {HistType::kTHnSparseD, {{101, -10.1f, 10.1f}, {20, -10, 10}, {25, 0, 5}, {14, 0, 7}}}},
48+
{"tpcPr", "tpcPr", {HistType::kTH2F, {{100, 0, 5}, {401, -10.025f, 10.025f}}}},
49+
{"tofPr", "tofPr", {HistType::kTH2F, {{100, 0, 5}, {401, -10.025f, 10.025f}}}},
5050
{"tpcDedx", "tpcDedx", {HistType::kTH2F, {{500, 0, 5}, {1000, 0, 1000}}}},
5151
{"tofBeta", "tofBeta", {HistType::kTH2F, {{500, 0, 5}, {450, 0.2, 1.1}}}},
5252
{"tofMass", "tofMass", {HistType::kTH1F, {{3000, 0, 3}}}},
@@ -99,17 +99,20 @@ struct JetShapeTask {
9999
template <typename T, typename U>
100100
bool isAcceptedJet(U const& jet)
101101
{
102-
if (jetAreaFractionMin > -98.0) {
102+
static constexpr double kJetAreaFractionMinValue = -98.0;
103+
if (jetAreaFractionMin > kJetAreaFractionMinValue) {
103104
if (jet.area() < jetAreaFractionMin * o2::constants::math::PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
104105
return false;
105106
}
106107
if (jet.area() < o2::constants::math::PIHalf * (jet.r() / 100.0) * (jet.r() / 100.0)) {
107108
return false;
108109
}
109110
}
111+
static constexpr double kLeadingConstituentPtMinValue = 5.0;
112+
static constexpr double kLeadingConstituentPtMaxValue = 9998.0;
110113
bool checkConstituentPt = true;
111-
bool checkConstituentMinPt = (leadingConstituentPtMin > 5);
112-
bool checkConstituentMaxPt = (leadingConstituentPtMax < 9998.0);
114+
bool checkConstituentMinPt = (leadingConstituentPtMin > kLeadingConstituentPtMinValue);
115+
bool checkConstituentMaxPt = (leadingConstituentPtMax < kLeadingConstituentPtMaxValue);
113116
if (!checkConstituentMinPt && !checkConstituentMaxPt) {
114117
checkConstituentPt = false;
115118
}
@@ -256,10 +259,8 @@ struct JetShapeTask {
256259
registry.fill(HIST("tofMass"), track.mass());
257260

258261
// for calculate purity
259-
registry.fill(HIST("tpcTofPi"), track.tpcNSigmaPi(), track.tofNSigmaPi(), track.pt());
260262
registry.fill(HIST("tpcPi"), track.pt(), track.tpcNSigmaPi());
261263
registry.fill(HIST("tofPi"), track.pt(), track.tofNSigmaPi());
262-
registry.fill(HIST("tpcTofPr"), track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt());
263264
registry.fill(HIST("tpcPr"), track.pt(), track.tpcNSigmaPr());
264265
registry.fill(HIST("tofPr"), track.pt(), track.tofNSigmaPr());
265266

@@ -272,6 +273,8 @@ struct JetShapeTask {
272273
float distance = std::sqrt(deltaEta * deltaEta + deltaPhi1 * deltaPhi1);
273274

274275
registry.fill(HIST("distanceVsTrackpt"), distance, track.pt());
276+
registry.fill(HIST("tpcTofPi"), track.tpcNSigmaPi(), track.tofNSigmaPi(), track.pt(), distance);
277+
registry.fill(HIST("tpcTofPr"), track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt(), distance);
275278
}
276279
}
277280
}

0 commit comments

Comments
 (0)