Skip to content

Commit f1ba563

Browse files
authored
Update OTFTOF.h
1 parent 68c9f8d commit f1ba563

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

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,

0 commit comments

Comments
 (0)