Skip to content

Commit c5978a0

Browse files
vbarbasoVeronika Barbasova
andauthored
[PWGLF] - Improvemnts of nsigma handling (#4012)
Co-authored-by: Veronika Barbasova <vernika.barbasova@cern.ch>
1 parent 2eb9ce3 commit c5978a0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

PWGLF/Tasks/phianalysisTHnSparse.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ struct phianalysisTHnSparse {
9898
AxisSpec ptAxis = {ptaxis, "p_{T} (GeV/c)", "pt"};
9999
AxisSpec mAxis = {multiplicityaxis, "N", "m"};
100100
AxisSpec yAxis = {rapidityaxis, "y", "y"};
101-
AxisSpec nsigmatrackaxis1 = {nsigmaaxis1, fmt::format("nSigma particle X({})", mass1), "sx"};
102-
AxisSpec nsigmatrackaxis2 = {nsigmaaxis1, fmt::format("nSigma particle Y({})", mass2), "sy"};
101+
AxisSpec nsigmatrackaxis1 = {nsigmaaxis1, fmt::format("nSigma particle 1({})", mass1), "ns1"};
102+
AxisSpec nsigmatrackaxis2 = {nsigmaaxis1, fmt::format("nSigma particle 2({})", mass2), "ns2"};
103103
HistogramConfigSpec pairHisto({HistType::kTHnSparseF, {invAxis, ptAxis, mAxis, nsigmatrackaxis1, nsigmatrackaxis2, yAxis}});
104104
registry.add("unlike", "Unlike", pairHisto);
105105
registry.add("likep", "Likep", pairHisto);
@@ -170,7 +170,7 @@ struct phianalysisTHnSparse {
170170
if (verboselevel > 1)
171171
LOGF(info, "Unlike-sign: d1=%ld , d2=%ld , mother=%f", track1.globalIndex(), track2.globalIndex(), mother.Mag());
172172

173-
registry.fill(HIST("unlike"), mother.Mag(), mother.Pt(), multiplicity, track1.tpcNSigmaKa(), track2.tpcNSigmaKa(), mother.Rapidity());
173+
registry.fill(HIST("unlike"), mother.Mag(), mother.Pt(), multiplicity, std::abs(track1.tpcNSigmaKa()), std::abs(track2.tpcNSigmaKa()), mother.Rapidity());
174174
}
175175

176176
for (auto& [track1, track2] : combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(posDauthers, posDauthers))) {
@@ -186,7 +186,7 @@ struct phianalysisTHnSparse {
186186
if (verboselevel > 1)
187187
LOGF(info, "Like-sign positive: d1=%ld , d2=%ld , mother=%f", track1.globalIndex(), track2.globalIndex(), mother.Mag());
188188

189-
registry.fill(HIST("likep"), mother.Mag(), mother.Pt(), multiplicity, track1.tpcNSigmaKa(), track2.tpcNSigmaKa(), mother.Rapidity());
189+
registry.fill(HIST("likep"), mother.Mag(), mother.Pt(), multiplicity, std::abs(track1.tpcNSigmaKa()), std::abs(track2.tpcNSigmaKa()), mother.Rapidity());
190190
}
191191

192192
for (auto& [track1, track2] : combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(negDauthers, negDauthers))) {
@@ -202,7 +202,7 @@ struct phianalysisTHnSparse {
202202
if (verboselevel > 1)
203203
LOGF(info, "Like-sign negative: d1=%ld , d2=%ld , mother=%f", track1.globalIndex(), track2.globalIndex(), mother.Mag());
204204

205-
registry.fill(HIST("liken"), mother.Mag(), mother.Pt(), multiplicity, track1.tpcNSigmaKa(), track2.tpcNSigmaKa(), mother.Rapidity());
205+
registry.fill(HIST("liken"), mother.Mag(), mother.Pt(), multiplicity, std::abs(track1.tpcNSigmaKa()), std::abs(track2.tpcNSigmaKa()), mother.Rapidity());
206206
}
207207
}
208208

@@ -268,12 +268,12 @@ struct phianalysisTHnSparse {
268268

269269
registry.fill(HIST("motherTrue"), mothertrack1.pt());
270270
n++;
271-
if (verboselevel > 0)
271+
if (verboselevel > 1)
272272
LOGF(info, "True: %d, d1=%d (%ld), d2=%d (%ld), mother=%d (%ld)", n, mctrack1.pdgCode(), mctrack1.globalIndex(), mctrack2.pdgCode(), mctrack2.globalIndex(), mothertrack1.pdgCode(), mothertrack1.globalIndex());
273273

274274
if (!selectedPair(mother, mctrack1, mctrack2))
275275
continue;
276-
registry.fill(HIST("unlikeTrue"), mother.Mag(), mother.Pt(), multiplicityMC, tpcnSigma1 / 2.0, tpcnSigma2 / 2.0, mother.Rapidity());
276+
registry.fill(HIST("unlikeTrue"), mother.Mag(), mother.Pt(), multiplicityMC, std::abs(track1.tpcNSigmaKa()), std::abs(track2.tpcNSigmaKa()), mother.Rapidity());
277277
}
278278
}
279279
}
@@ -326,7 +326,7 @@ struct phianalysisTHnSparse {
326326
nuberofPhi++;
327327
numberofEntries++;
328328

329-
if (verboselevel > 0)
329+
if (verboselevel > 1)
330330
LOGF(info, "Gen: %d, #Phi =%d, mother=%d (%ld), Inv.mass:%f, Pt= %f", numberofEntries, nuberofPhi, particle.pdgCode(), particle.globalIndex(), mother.Mag(), mother.Pt());
331331
} else {
332332
registry.fill(HIST("motherBgr"), particle.pt());

0 commit comments

Comments
 (0)