Skip to content

Commit 68c9f8d

Browse files
authored
A3PID: add parametric getters
1 parent 0f6225e commit 68c9f8d

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
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

0 commit comments

Comments
 (0)