@@ -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