Skip to content

Commit 1d46947

Browse files
authored
Use Dynamic columns for the expected PID signals (#5086)
1 parent e9cfe1f commit 1d46947

3 files changed

Lines changed: 120 additions & 123 deletions

File tree

Analysis/DataModel/include/AnalysisDataModel/PID/PIDResponse.h

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ DECLARE_SOA_DYNAMIC_COLUMN(DiffBetaEl, diffbetael, [](float beta, float expbetae
4343
namespace pidtof
4444
{
4545
// Expected times
46-
DECLARE_SOA_COLUMN(TOFExpSignalEl, tofExpSignalEl, float);
47-
DECLARE_SOA_COLUMN(TOFExpSignalMu, tofExpSignalMu, float);
48-
DECLARE_SOA_COLUMN(TOFExpSignalPi, tofExpSignalPi, float);
49-
DECLARE_SOA_COLUMN(TOFExpSignalKa, tofExpSignalKa, float);
50-
DECLARE_SOA_COLUMN(TOFExpSignalPr, tofExpSignalPr, float);
51-
DECLARE_SOA_COLUMN(TOFExpSignalDe, tofExpSignalDe, float);
52-
DECLARE_SOA_COLUMN(TOFExpSignalTr, tofExpSignalTr, float);
53-
DECLARE_SOA_COLUMN(TOFExpSignalHe, tofExpSignalHe, float);
54-
DECLARE_SOA_COLUMN(TOFExpSignalAl, tofExpSignalAl, float);
46+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffEl, tofExpSignalDiffEl, [](float nsigma, float sigma) { return nsigma * sigma; });
47+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffMu, tofExpSignalDiffMu, [](float nsigma, float sigma) { return nsigma * sigma; });
48+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffPi, tofExpSignalDiffPi, [](float nsigma, float sigma) { return nsigma * sigma; });
49+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffKa, tofExpSignalDiffKa, [](float nsigma, float sigma) { return nsigma * sigma; });
50+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffPr, tofExpSignalDiffPr, [](float nsigma, float sigma) { return nsigma * sigma; });
51+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffDe, tofExpSignalDiffDe, [](float nsigma, float sigma) { return nsigma * sigma; });
52+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffTr, tofExpSignalDiffTr, [](float nsigma, float sigma) { return nsigma * sigma; });
53+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffHe, tofExpSignalDiffHe, [](float nsigma, float sigma) { return nsigma * sigma; });
54+
DECLARE_SOA_DYNAMIC_COLUMN(TOFExpSignalDiffAl, tofExpSignalDiffAl, [](float nsigma, float sigma) { return nsigma * sigma; });
5555
// Expected sigma
5656
DECLARE_SOA_COLUMN(TOFExpSigmaEl, tofExpSigmaEl, float);
5757
DECLARE_SOA_COLUMN(TOFExpSigmaMu, tofExpSigmaMu, float);
@@ -82,22 +82,37 @@ DECLARE_SOA_TABLE(pidRespTOFbeta, "AOD", "pidRespTOFbeta",
8282
DiffBetaEl<Beta, ExpBetaEl>);
8383
using namespace pidtof;
8484
DECLARE_SOA_TABLE(pidRespTOF, "AOD", "pidRespTOF",
85-
TOFExpSignalEl, TOFExpSignalMu, TOFExpSignalPi, TOFExpSignalKa, TOFExpSignalPr, TOFExpSignalDe, TOFExpSignalTr, TOFExpSignalHe, TOFExpSignalAl,
86-
TOFExpSigmaEl, TOFExpSigmaMu, TOFExpSigmaPi, TOFExpSigmaKa, TOFExpSigmaPr, TOFExpSigmaDe, TOFExpSigmaTr, TOFExpSigmaHe, TOFExpSigmaAl,
87-
TOFNSigmaEl, TOFNSigmaMu, TOFNSigmaPi, TOFNSigmaKa, TOFNSigmaPr, TOFNSigmaDe, TOFNSigmaTr, TOFNSigmaHe, TOFNSigmaAl);
85+
// Expected signals
86+
TOFExpSignalDiffEl<TOFNSigmaEl, TOFExpSigmaEl>,
87+
TOFExpSignalDiffMu<TOFNSigmaMu, TOFExpSigmaMu>,
88+
TOFExpSignalDiffPi<TOFNSigmaPi, TOFExpSigmaPi>,
89+
TOFExpSignalDiffKa<TOFNSigmaKa, TOFExpSigmaKa>,
90+
TOFExpSignalDiffPr<TOFNSigmaPr, TOFExpSigmaPr>,
91+
TOFExpSignalDiffDe<TOFNSigmaDe, TOFExpSigmaDe>,
92+
TOFExpSignalDiffTr<TOFNSigmaTr, TOFExpSigmaTr>,
93+
TOFExpSignalDiffHe<TOFNSigmaHe, TOFExpSigmaHe>,
94+
TOFExpSignalDiffAl<TOFNSigmaAl, TOFExpSigmaAl>,
95+
// Expected sigma
96+
TOFExpSigmaEl, TOFExpSigmaMu, TOFExpSigmaPi,
97+
TOFExpSigmaKa, TOFExpSigmaPr, TOFExpSigmaDe,
98+
TOFExpSigmaTr, TOFExpSigmaHe, TOFExpSigmaAl,
99+
// NSigma
100+
TOFNSigmaEl, TOFNSigmaMu, TOFNSigmaPi,
101+
TOFNSigmaKa, TOFNSigmaPr, TOFNSigmaDe,
102+
TOFNSigmaTr, TOFNSigmaHe, TOFNSigmaAl);
88103

89104
namespace pidtpc
90105
{
91106
// Expected signals
92-
DECLARE_SOA_COLUMN(TPCExpSignalEl, tpcExpSignalEl, float);
93-
DECLARE_SOA_COLUMN(TPCExpSignalMu, tpcExpSignalMu, float);
94-
DECLARE_SOA_COLUMN(TPCExpSignalPi, tpcExpSignalPi, float);
95-
DECLARE_SOA_COLUMN(TPCExpSignalKa, tpcExpSignalKa, float);
96-
DECLARE_SOA_COLUMN(TPCExpSignalPr, tpcExpSignalPr, float);
97-
DECLARE_SOA_COLUMN(TPCExpSignalDe, tpcExpSignalDe, float);
98-
DECLARE_SOA_COLUMN(TPCExpSignalTr, tpcExpSignalTr, float);
99-
DECLARE_SOA_COLUMN(TPCExpSignalHe, tpcExpSignalHe, float);
100-
DECLARE_SOA_COLUMN(TPCExpSignalAl, tpcExpSignalAl, float);
107+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffEl, tpcExpSignalDiffEl, [](float nsigma, float sigma) { return nsigma * sigma; });
108+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffMu, tpcExpSignalDiffMu, [](float nsigma, float sigma) { return nsigma * sigma; });
109+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffPi, tpcExpSignalDiffPi, [](float nsigma, float sigma) { return nsigma * sigma; });
110+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffKa, tpcExpSignalDiffKa, [](float nsigma, float sigma) { return nsigma * sigma; });
111+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffPr, tpcExpSignalDiffPr, [](float nsigma, float sigma) { return nsigma * sigma; });
112+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffDe, tpcExpSignalDiffDe, [](float nsigma, float sigma) { return nsigma * sigma; });
113+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffTr, tpcExpSignalDiffTr, [](float nsigma, float sigma) { return nsigma * sigma; });
114+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffHe, tpcExpSignalDiffHe, [](float nsigma, float sigma) { return nsigma * sigma; });
115+
DECLARE_SOA_DYNAMIC_COLUMN(TPCExpSignalDiffAl, tpcExpSignalDiffAl, [](float nsigma, float sigma) { return nsigma * sigma; });
101116
// Expected sigma
102117
DECLARE_SOA_COLUMN(TPCExpSigmaEl, tpcExpSigmaEl, float);
103118
DECLARE_SOA_COLUMN(TPCExpSigmaMu, tpcExpSigmaMu, float);
@@ -122,9 +137,24 @@ DECLARE_SOA_COLUMN(TPCNSigmaAl, tpcNSigmaAl, float);
122137

123138
using namespace pidtpc;
124139
DECLARE_SOA_TABLE(pidRespTPC, "AOD", "pidRespTPC",
125-
TPCExpSignalEl, TPCExpSignalMu, TPCExpSignalPi, TPCExpSignalKa, TPCExpSignalPr, TPCExpSignalDe, TPCExpSignalTr, TPCExpSignalHe, TPCExpSignalAl,
126-
TPCExpSigmaEl, TPCExpSigmaMu, TPCExpSigmaPi, TPCExpSigmaKa, TPCExpSigmaPr, TPCExpSigmaDe, TPCExpSigmaTr, TPCExpSigmaHe, TPCExpSigmaAl,
127-
TPCNSigmaEl, TPCNSigmaMu, TPCNSigmaPi, TPCNSigmaKa, TPCNSigmaPr, TPCNSigmaDe, TPCNSigmaTr, TPCNSigmaHe, TPCNSigmaAl);
140+
// Expected signals
141+
TPCExpSignalDiffEl<TPCNSigmaEl, TPCExpSigmaEl>,
142+
TPCExpSignalDiffMu<TPCNSigmaMu, TPCExpSigmaMu>,
143+
TPCExpSignalDiffPi<TPCNSigmaPi, TPCExpSigmaPi>,
144+
TPCExpSignalDiffKa<TPCNSigmaKa, TPCExpSigmaKa>,
145+
TPCExpSignalDiffPr<TPCNSigmaPr, TPCExpSigmaPr>,
146+
TPCExpSignalDiffDe<TPCNSigmaDe, TPCExpSigmaDe>,
147+
TPCExpSignalDiffTr<TPCNSigmaTr, TPCExpSigmaTr>,
148+
TPCExpSignalDiffHe<TPCNSigmaHe, TPCExpSigmaHe>,
149+
TPCExpSignalDiffAl<TPCNSigmaAl, TPCExpSigmaAl>,
150+
// Expected sigma
151+
TPCExpSigmaEl, TPCExpSigmaMu, TPCExpSigmaPi,
152+
TPCExpSigmaKa, TPCExpSigmaPr, TPCExpSigmaDe,
153+
TPCExpSigmaTr, TPCExpSigmaHe, TPCExpSigmaAl,
154+
// NSigma
155+
TPCNSigmaEl, TPCNSigmaMu, TPCNSigmaPi,
156+
TPCNSigmaKa, TPCNSigmaPr, TPCNSigmaDe,
157+
TPCNSigmaTr, TPCNSigmaHe, TPCNSigmaAl);
128158

129159
} // namespace o2::aod
130160

Analysis/Tasks/pidTOF.cxx

Lines changed: 34 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct pidTOFTask {
6565
}
6666
}
6767

68-
void process(Coll const& collision, Trks const& tracks)
68+
void process(Trks const& tracks)
6969
{
7070
constexpr tof::ExpTimes<Coll, Trks::iterator, PID::Electron> resp_Electron = tof::ExpTimes<Coll, Trks::iterator, PID::Electron>();
7171
constexpr tof::ExpTimes<Coll, Trks::iterator, PID::Muon> resp_Muon = tof::ExpTimes<Coll, Trks::iterator, PID::Muon>();
@@ -79,33 +79,24 @@ struct pidTOFTask {
7979

8080
tofpid.reserve(tracks.size());
8181
for (auto const& trk : tracks) {
82-
tofpid(resp_Electron.GetExpectedSignal(collision, trk),
83-
resp_Muon.GetExpectedSignal(collision, trk),
84-
resp_Pion.GetExpectedSignal(collision, trk),
85-
resp_Kaon.GetExpectedSignal(collision, trk),
86-
resp_Proton.GetExpectedSignal(collision, trk),
87-
resp_Deuteron.GetExpectedSignal(collision, trk),
88-
resp_Triton.GetExpectedSignal(collision, trk),
89-
resp_Helium3.GetExpectedSignal(collision, trk),
90-
resp_Alpha.GetExpectedSignal(collision, trk),
91-
resp_Electron.GetExpectedSigma(resp, collision, trk),
92-
resp_Muon.GetExpectedSigma(resp, collision, trk),
93-
resp_Pion.GetExpectedSigma(resp, collision, trk),
94-
resp_Kaon.GetExpectedSigma(resp, collision, trk),
95-
resp_Proton.GetExpectedSigma(resp, collision, trk),
96-
resp_Deuteron.GetExpectedSigma(resp, collision, trk),
97-
resp_Triton.GetExpectedSigma(resp, collision, trk),
98-
resp_Helium3.GetExpectedSigma(resp, collision, trk),
99-
resp_Alpha.GetExpectedSigma(resp, collision, trk),
100-
resp_Electron.GetSeparation(resp, collision, trk),
101-
resp_Muon.GetSeparation(resp, collision, trk),
102-
resp_Pion.GetSeparation(resp, collision, trk),
103-
resp_Kaon.GetSeparation(resp, collision, trk),
104-
resp_Proton.GetSeparation(resp, collision, trk),
105-
resp_Deuteron.GetSeparation(resp, collision, trk),
106-
resp_Triton.GetSeparation(resp, collision, trk),
107-
resp_Helium3.GetSeparation(resp, collision, trk),
108-
resp_Alpha.GetSeparation(resp, collision, trk));
82+
tofpid(resp_Electron.GetExpectedSigma(resp, trk.collision(), trk),
83+
resp_Muon.GetExpectedSigma(resp, trk.collision(), trk),
84+
resp_Pion.GetExpectedSigma(resp, trk.collision(), trk),
85+
resp_Kaon.GetExpectedSigma(resp, trk.collision(), trk),
86+
resp_Proton.GetExpectedSigma(resp, trk.collision(), trk),
87+
resp_Deuteron.GetExpectedSigma(resp, trk.collision(), trk),
88+
resp_Triton.GetExpectedSigma(resp, trk.collision(), trk),
89+
resp_Helium3.GetExpectedSigma(resp, trk.collision(), trk),
90+
resp_Alpha.GetExpectedSigma(resp, trk.collision(), trk),
91+
resp_Electron.GetSeparation(resp, trk.collision(), trk),
92+
resp_Muon.GetSeparation(resp, trk.collision(), trk),
93+
resp_Pion.GetSeparation(resp, trk.collision(), trk),
94+
resp_Kaon.GetSeparation(resp, trk.collision(), trk),
95+
resp_Proton.GetSeparation(resp, trk.collision(), trk),
96+
resp_Deuteron.GetSeparation(resp, trk.collision(), trk),
97+
resp_Triton.GetSeparation(resp, trk.collision(), trk),
98+
resp_Helium3.GetSeparation(resp, trk.collision(), trk),
99+
resp_Alpha.GetSeparation(resp, trk.collision(), trk));
109100
}
110101
}
111102
};
@@ -211,11 +202,11 @@ struct pidTOFTaskQA {
211202
}
212203

213204
template <uint8_t i, typename T>
214-
void fillParticleHistos(const T& t, const float tof, const float exp[], const float nsigma[])
205+
void fillParticleHistos(const T& t, const float tof, const float exp_diff, const float nsigma)
215206
{
216-
histos.fill(HIST(hexpected[i]), t.p(), exp[i]);
217-
histos.fill(HIST(hexpected_diff[i]), t.p(), tof - exp[i]);
218-
histos.fill(HIST(hnsigma[i]), t.p(), nsigma[i]);
207+
histos.fill(HIST(hexpected[i]), t.p(), tof - exp_diff);
208+
histos.fill(HIST(hexpected_diff[i]), t.p(), exp_diff);
209+
histos.fill(HIST(hnsigma[i]), t.p(), nsigma);
219210
}
220211

221212
void process(aod::Collision const& collision, soa::Join<aod::Tracks, aod::TracksExtra, aod::pidRespTOF, aod::pidRespTOFbeta> const& tracks)
@@ -229,28 +220,22 @@ struct pidTOFTaskQA {
229220
if (t.tofSignal() < 0) { // Skipping tracks without TOF
230221
continue;
231222
}
223+
232224
const float tof = t.tofSignal() - collisionTime_ps;
225+
233226
//
234227
histos.fill(HIST("event/tofsignal"), t.p(), t.tofSignal());
235228
histos.fill(HIST("event/tofbeta"), t.p(), t.beta());
236229
//
237-
const float exp[Np] = {t.tofExpSignalEl(), t.tofExpSignalMu(), t.tofExpSignalPi(),
238-
t.tofExpSignalKa(), t.tofExpSignalPr(), t.tofExpSignalDe(),
239-
t.tofExpSignalTr(), t.tofExpSignalHe(), t.tofExpSignalAl()};
240-
//
241-
const float nsigma[Np] = {t.tofNSigmaEl(), t.tofNSigmaMu(), t.tofNSigmaPi(),
242-
t.tofNSigmaKa(), t.tofNSigmaPr(), t.tofNSigmaDe(),
243-
t.tofNSigmaTr(), t.tofNSigmaHe(), t.tofNSigmaAl()};
244-
//
245-
fillParticleHistos<0>(t, tof, exp, nsigma);
246-
fillParticleHistos<1>(t, tof, exp, nsigma);
247-
fillParticleHistos<2>(t, tof, exp, nsigma);
248-
fillParticleHistos<3>(t, tof, exp, nsigma);
249-
fillParticleHistos<4>(t, tof, exp, nsigma);
250-
fillParticleHistos<5>(t, tof, exp, nsigma);
251-
fillParticleHistos<6>(t, tof, exp, nsigma);
252-
fillParticleHistos<7>(t, tof, exp, nsigma);
253-
fillParticleHistos<8>(t, tof, exp, nsigma);
230+
fillParticleHistos<0>(t, tof, t.tofExpSignalDiffEl(), t.tofNSigmaEl());
231+
fillParticleHistos<1>(t, tof, t.tofExpSignalDiffMu(), t.tofNSigmaMu());
232+
fillParticleHistos<2>(t, tof, t.tofExpSignalDiffPi(), t.tofNSigmaPi());
233+
fillParticleHistos<3>(t, tof, t.tofExpSignalDiffKa(), t.tofNSigmaKa());
234+
fillParticleHistos<4>(t, tof, t.tofExpSignalDiffPr(), t.tofNSigmaPr());
235+
fillParticleHistos<5>(t, tof, t.tofExpSignalDiffDe(), t.tofNSigmaDe());
236+
fillParticleHistos<6>(t, tof, t.tofExpSignalDiffTr(), t.tofNSigmaTr());
237+
fillParticleHistos<7>(t, tof, t.tofExpSignalDiffHe(), t.tofNSigmaHe());
238+
fillParticleHistos<8>(t, tof, t.tofExpSignalDiffAl(), t.tofNSigmaAl());
254239
}
255240
}
256241
};

Analysis/Tasks/pidTPC.cxx

Lines changed: 32 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct pidTPCTask {
6565
}
6666
}
6767

68-
void process(Coll const& collision, Trks const& tracks)
68+
void process(Trks const& tracks)
6969
{
7070
constexpr tpc::ELoss<Coll, Trks::iterator, PID::Electron> resp_Electron = tpc::ELoss<Coll, Trks::iterator, PID::Electron>();
7171
constexpr tpc::ELoss<Coll, Trks::iterator, PID::Muon> resp_Muon = tpc::ELoss<Coll, Trks::iterator, PID::Muon>();
@@ -79,34 +79,24 @@ struct pidTPCTask {
7979

8080
tpcpid.reserve(tracks.size());
8181
for (auto const& trk : tracks) {
82-
tpcpid(
83-
resp_Electron.GetExpectedSignal(resp, collision, trk),
84-
resp_Muon.GetExpectedSignal(resp, collision, trk),
85-
resp_Pion.GetExpectedSignal(resp, collision, trk),
86-
resp_Kaon.GetExpectedSignal(resp, collision, trk),
87-
resp_Proton.GetExpectedSignal(resp, collision, trk),
88-
resp_Deuteron.GetExpectedSignal(resp, collision, trk),
89-
resp_Triton.GetExpectedSignal(resp, collision, trk),
90-
resp_Helium3.GetExpectedSignal(resp, collision, trk),
91-
resp_Alpha.GetExpectedSignal(resp, collision, trk),
92-
resp_Electron.GetExpectedSigma(resp, collision, trk),
93-
resp_Muon.GetExpectedSigma(resp, collision, trk),
94-
resp_Pion.GetExpectedSigma(resp, collision, trk),
95-
resp_Kaon.GetExpectedSigma(resp, collision, trk),
96-
resp_Proton.GetExpectedSigma(resp, collision, trk),
97-
resp_Deuteron.GetExpectedSigma(resp, collision, trk),
98-
resp_Triton.GetExpectedSigma(resp, collision, trk),
99-
resp_Helium3.GetExpectedSigma(resp, collision, trk),
100-
resp_Alpha.GetExpectedSigma(resp, collision, trk),
101-
resp_Electron.GetSeparation(resp, collision, trk),
102-
resp_Muon.GetSeparation(resp, collision, trk),
103-
resp_Pion.GetSeparation(resp, collision, trk),
104-
resp_Kaon.GetSeparation(resp, collision, trk),
105-
resp_Proton.GetSeparation(resp, collision, trk),
106-
resp_Deuteron.GetSeparation(resp, collision, trk),
107-
resp_Triton.GetSeparation(resp, collision, trk),
108-
resp_Helium3.GetSeparation(resp, collision, trk),
109-
resp_Alpha.GetSeparation(resp, collision, trk));
82+
tpcpid(resp_Electron.GetExpectedSigma(resp, trk.collision(), trk),
83+
resp_Muon.GetExpectedSigma(resp, trk.collision(), trk),
84+
resp_Pion.GetExpectedSigma(resp, trk.collision(), trk),
85+
resp_Kaon.GetExpectedSigma(resp, trk.collision(), trk),
86+
resp_Proton.GetExpectedSigma(resp, trk.collision(), trk),
87+
resp_Deuteron.GetExpectedSigma(resp, trk.collision(), trk),
88+
resp_Triton.GetExpectedSigma(resp, trk.collision(), trk),
89+
resp_Helium3.GetExpectedSigma(resp, trk.collision(), trk),
90+
resp_Alpha.GetExpectedSigma(resp, trk.collision(), trk),
91+
resp_Electron.GetSeparation(resp, trk.collision(), trk),
92+
resp_Muon.GetSeparation(resp, trk.collision(), trk),
93+
resp_Pion.GetSeparation(resp, trk.collision(), trk),
94+
resp_Kaon.GetSeparation(resp, trk.collision(), trk),
95+
resp_Proton.GetSeparation(resp, trk.collision(), trk),
96+
resp_Deuteron.GetSeparation(resp, trk.collision(), trk),
97+
resp_Triton.GetSeparation(resp, trk.collision(), trk),
98+
resp_Helium3.GetSeparation(resp, trk.collision(), trk),
99+
resp_Alpha.GetSeparation(resp, trk.collision(), trk));
110100
}
111101
}
112102
};
@@ -183,11 +173,11 @@ struct pidTPCTaskQA {
183173
}
184174

185175
template <uint8_t i, typename T>
186-
void fillParticleHistos(const T& t, const float mom, const float exp[], const float nsigma[])
176+
void fillParticleHistos(const T& t, const float mom, const float exp_diff, const float nsigma)
187177
{
188-
histos.fill(HIST(hexpected[i]), mom, exp[i]);
189-
histos.fill(HIST(hexpected_diff[i]), mom, t.tpcSignal() - exp[i]);
190-
histos.fill(HIST(hnsigma[i]), t.p(), nsigma[i]);
178+
histos.fill(HIST(hexpected[i]), mom, t.tpcSignal() - exp_diff);
179+
histos.fill(HIST(hexpected_diff[i]), mom, exp_diff);
180+
histos.fill(HIST(hnsigma[i]), t.p(), nsigma);
191181
}
192182

193183
void process(aod::Collision const& collision, soa::Join<aod::Tracks, aod::TracksExtra, aod::pidRespTPC> const& tracks)
@@ -199,23 +189,15 @@ struct pidTPCTaskQA {
199189
const float mom = t.tpcInnerParam();
200190
histos.fill(HIST("event/tpcsignal"), mom, t.tpcSignal());
201191
//
202-
const float exp[Np] = {t.tpcExpSignalEl(), t.tpcExpSignalMu(), t.tpcExpSignalPi(),
203-
t.tpcExpSignalKa(), t.tpcExpSignalPr(), t.tpcExpSignalDe(),
204-
t.tpcExpSignalTr(), t.tpcExpSignalHe(), t.tpcExpSignalAl()};
205-
//
206-
const float nsigma[Np] = {t.tpcNSigmaEl(), t.tpcNSigmaMu(), t.tpcNSigmaPi(),
207-
t.tpcNSigmaKa(), t.tpcNSigmaPr(), t.tpcNSigmaDe(),
208-
t.tpcNSigmaTr(), t.tpcNSigmaHe(), t.tpcNSigmaAl()};
209-
//
210-
fillParticleHistos<0>(t, mom, exp, nsigma);
211-
fillParticleHistos<1>(t, mom, exp, nsigma);
212-
fillParticleHistos<2>(t, mom, exp, nsigma);
213-
fillParticleHistos<3>(t, mom, exp, nsigma);
214-
fillParticleHistos<4>(t, mom, exp, nsigma);
215-
fillParticleHistos<5>(t, mom, exp, nsigma);
216-
fillParticleHistos<6>(t, mom, exp, nsigma);
217-
fillParticleHistos<7>(t, mom, exp, nsigma);
218-
fillParticleHistos<8>(t, mom, exp, nsigma);
192+
fillParticleHistos<0>(t, mom, t.tpcExpSignalDiffEl(), t.tpcNSigmaEl());
193+
fillParticleHistos<1>(t, mom, t.tpcExpSignalDiffMu(), t.tpcNSigmaMu());
194+
fillParticleHistos<2>(t, mom, t.tpcExpSignalDiffPi(), t.tpcNSigmaPi());
195+
fillParticleHistos<3>(t, mom, t.tpcExpSignalDiffKa(), t.tpcNSigmaKa());
196+
fillParticleHistos<4>(t, mom, t.tpcExpSignalDiffPr(), t.tpcNSigmaPr());
197+
fillParticleHistos<5>(t, mom, t.tpcExpSignalDiffDe(), t.tpcNSigmaDe());
198+
fillParticleHistos<6>(t, mom, t.tpcExpSignalDiffTr(), t.tpcNSigmaTr());
199+
fillParticleHistos<7>(t, mom, t.tpcExpSignalDiffHe(), t.tpcNSigmaHe());
200+
fillParticleHistos<8>(t, mom, t.tpcExpSignalDiffAl(), t.tpcNSigmaAl());
219201
}
220202
}
221203
};

0 commit comments

Comments
 (0)