Skip to content

Commit be710b7

Browse files
authored
[ALICE3] A3PID: add parametric getters (#11183)
1 parent 7ca2971 commit be710b7

File tree

4 files changed

+90
-4
lines changed

4 files changed

+90
-4
lines changed

ALICE3/DataModel/OTFRICH.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,42 @@ DECLARE_SOA_COLUMN(NSigmaMuonRich, nSigmaMuonRich, float); //! NSigma mu
3131
DECLARE_SOA_COLUMN(NSigmaPionRich, nSigmaPionRich, float); //! NSigma pion BarrelRich
3232
DECLARE_SOA_COLUMN(NSigmaKaonRich, nSigmaKaonRich, float); //! NSigma kaon BarrelRich
3333
DECLARE_SOA_COLUMN(NSigmaProtonRich, nSigmaProtonRich, float); //! NSigma proton BarrelRich
34+
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaRich, nSigmaRich, //! General function to get the nSigma for the RICH
35+
[](const float el,
36+
const float mu,
37+
const float pi,
38+
const float ka,
39+
const float pr,
40+
const int id) -> float {
41+
switch (std::abs(id)) {
42+
case 0:
43+
return el;
44+
case 1:
45+
return mu;
46+
case 2:
47+
return pi;
48+
case 3:
49+
return ka;
50+
case 4:
51+
return pr;
52+
default:
53+
LOG(fatal) << "Unrecognized PDG code for RICH";
54+
return 999.f;
55+
}
56+
});
57+
3458
} // namespace upgrade_rich
3559
DECLARE_SOA_TABLE(UpgradeRichs, "AOD", "UPGRADERICH",
3660
upgrade_rich::NSigmaElectronRich,
3761
upgrade_rich::NSigmaMuonRich,
3862
upgrade_rich::NSigmaPionRich,
3963
upgrade_rich::NSigmaKaonRich,
40-
upgrade_rich::NSigmaProtonRich);
64+
upgrade_rich::NSigmaProtonRich,
65+
upgrade_rich::NSigmaRich<upgrade_rich::NSigmaElectronRich,
66+
upgrade_rich::NSigmaMuonRich,
67+
upgrade_rich::NSigmaPionRich,
68+
upgrade_rich::NSigmaKaonRich,
69+
upgrade_rich::NSigmaProtonRich>);
4170

4271
using UpgradeRich = UpgradeRichs::iterator;
4372

ALICE3/DataModel/OTFTOF.h

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,53 @@ DECLARE_SOA_COLUMN(OuterTOFExpectedTimeMu, outerTOFExpectedTimeMu, float); //! R
6161
DECLARE_SOA_COLUMN(OuterTOFExpectedTimePi, outerTOFExpectedTimePi, float); //! Reconstructed expected time at the OuterTOF for the Pion mass hypotheses
6262
DECLARE_SOA_COLUMN(OuterTOFExpectedTimeKa, outerTOFExpectedTimeKa, float); //! Reconstructed expected time at the OuterTOF for the Kaon mass hypotheses
6363
DECLARE_SOA_COLUMN(OuterTOFExpectedTimePr, outerTOFExpectedTimePr, float); //! Reconstructed expected time at the OuterTOF for the Proton mass hypotheses
64+
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaInnerTOF, nSigmaInnerTOF, //! General function to get the nSigma for the InnerTOF
65+
[](const float el,
66+
const float mu,
67+
const float pi,
68+
const float ka,
69+
const float pr,
70+
const int id) -> float {
71+
switch (std::abs(id)) {
72+
case 0:
73+
return el;
74+
case 1:
75+
return mu;
76+
case 2:
77+
return pi;
78+
case 3:
79+
return ka;
80+
case 4:
81+
return pr;
82+
default:
83+
LOG(fatal) << "Unrecognized PDG code for InnerTOF";
84+
return 999.f;
85+
}
86+
});
87+
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaOuterTOF, nSigmaOuterTOF, //! General function to get the nSigma for the OuterTOF
88+
[](const float el,
89+
const float mu,
90+
const float pi,
91+
const float ka,
92+
const float pr,
93+
const int id) -> float {
94+
switch (std::abs(id)) {
95+
case 0:
96+
return el;
97+
case 1:
98+
return mu;
99+
case 2:
100+
return pi;
101+
case 3:
102+
return ka;
103+
case 4:
104+
return pr;
105+
default:
106+
LOG(fatal) << "Unrecognized PDG code for InnerTOF";
107+
return 999.f;
108+
}
109+
});
110+
64111
} // namespace upgrade_tof
65112

66113
DECLARE_SOA_TABLE(UpgradeTofMCs, "AOD", "UPGRADETOFMC",
@@ -85,7 +132,17 @@ DECLARE_SOA_TABLE(UpgradeTofs, "AOD", "UPGRADETOF",
85132
upgrade_tof::NSigmaKaonOuterTOF,
86133
upgrade_tof::NSigmaProtonOuterTOF,
87134
upgrade_tof::OuterTOFTrackTimeReco,
88-
upgrade_tof::OuterTOFTrackLengthReco);
135+
upgrade_tof::OuterTOFTrackLengthReco,
136+
upgrade_tof::NSigmaInnerTOF<upgrade_tof::NSigmaElectronInnerTOF,
137+
upgrade_tof::NSigmaMuonInnerTOF,
138+
upgrade_tof::NSigmaPionInnerTOF,
139+
upgrade_tof::NSigmaKaonInnerTOF,
140+
upgrade_tof::NSigmaProtonInnerTOF>,
141+
upgrade_tof::NSigmaOuterTOF<upgrade_tof::NSigmaElectronOuterTOF,
142+
upgrade_tof::NSigmaMuonOuterTOF,
143+
upgrade_tof::NSigmaPionOuterTOF,
144+
upgrade_tof::NSigmaKaonOuterTOF,
145+
upgrade_tof::NSigmaProtonOuterTOF>);
89146

90147
DECLARE_SOA_TABLE(UpgradeTofExpectedTimes, "AOD", "UPGRADETOFEXPT",
91148
upgrade_tof::InnerTOFExpectedTimeEl,

ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ struct OnTheFlyRichPid {
325325
if (lut.value != "inherit") {
326326
return;
327327
}
328-
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut.name, lut.value, true)) {
328+
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) {
329329
LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task";
330330
}
331331
};

ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ struct OnTheFlyTofPid {
145145
if (lut.value != "inherit") {
146146
return;
147147
}
148-
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut.name, lut.value, true)) {
148+
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) {
149149
LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task";
150150
}
151151
};

0 commit comments

Comments
 (0)