Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion ALICE3/DataModel/OTFRICH.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,42 @@ DECLARE_SOA_COLUMN(NSigmaMuonRich, nSigmaMuonRich, float); //! NSigma mu
DECLARE_SOA_COLUMN(NSigmaPionRich, nSigmaPionRich, float); //! NSigma pion BarrelRich
DECLARE_SOA_COLUMN(NSigmaKaonRich, nSigmaKaonRich, float); //! NSigma kaon BarrelRich
DECLARE_SOA_COLUMN(NSigmaProtonRich, nSigmaProtonRich, float); //! NSigma proton BarrelRich
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaRich, nSigmaRich, //! General function to get the nSigma for the RICH
[](const float el,
const float mu,
const float pi,
const float ka,
const float pr,
const int id) -> float {
switch (std::abs(id)) {
case 0:
return el;
case 1:
return mu;
case 2:
return pi;
case 3:
return ka;
case 4:
return pr;
default:
LOG(fatal) << "Unrecognized PDG code for RICH";
return 999.f;
}
});

} // namespace upgrade_rich
DECLARE_SOA_TABLE(UpgradeRichs, "AOD", "UPGRADERICH",
upgrade_rich::NSigmaElectronRich,
upgrade_rich::NSigmaMuonRich,
upgrade_rich::NSigmaPionRich,
upgrade_rich::NSigmaKaonRich,
upgrade_rich::NSigmaProtonRich);
upgrade_rich::NSigmaProtonRich,
upgrade_rich::NSigmaRich<upgrade_rich::NSigmaElectronRich,
upgrade_rich::NSigmaMuonRich,
upgrade_rich::NSigmaPionRich,
upgrade_rich::NSigmaKaonRich,
upgrade_rich::NSigmaProtonRich>);

using UpgradeRich = UpgradeRichs::iterator;

Expand Down
59 changes: 58 additions & 1 deletion ALICE3/DataModel/OTFTOF.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
DECLARE_SOA_COLUMN(OuterTOFTrackTime, outerTOFTrackTime, float); //! Track time generated at the OuterTOF
DECLARE_SOA_COLUMN(OuterTOFTrackLength, outerTOFTrackLength, float); //! track length for calculation of OuterTOF (generated)

DECLARE_SOA_COLUMN(TOFEventTime, tofEventTime, float); //! Event time reconstructed with the TOF

Check failure on line 35 in ALICE3/DataModel/OTFTOF.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TOFEventTimeErr, tofEventTimeErr, float); //! Uncertainty on the event time reconstructed with the TOF

Check failure on line 36 in ALICE3/DataModel/OTFTOF.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(NSigmaElectronInnerTOF, nSigmaElectronInnerTOF, float); //! NSigma electron InnerTOF
DECLARE_SOA_COLUMN(NSigmaMuonInnerTOF, nSigmaMuonInnerTOF, float); //! NSigma muon InnerTOF
DECLARE_SOA_COLUMN(NSigmaPionInnerTOF, nSigmaPionInnerTOF, float); //! NSigma pion InnerTOF
Expand Down Expand Up @@ -61,6 +61,53 @@
DECLARE_SOA_COLUMN(OuterTOFExpectedTimePi, outerTOFExpectedTimePi, float); //! Reconstructed expected time at the OuterTOF for the Pion mass hypotheses
DECLARE_SOA_COLUMN(OuterTOFExpectedTimeKa, outerTOFExpectedTimeKa, float); //! Reconstructed expected time at the OuterTOF for the Kaon mass hypotheses
DECLARE_SOA_COLUMN(OuterTOFExpectedTimePr, outerTOFExpectedTimePr, float); //! Reconstructed expected time at the OuterTOF for the Proton mass hypotheses
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaInnerTOF, nSigmaInnerTOF, //! General function to get the nSigma for the InnerTOF
[](const float el,
const float mu,
const float pi,
const float ka,
const float pr,
const int id) -> float {
switch (std::abs(id)) {
case 0:
return el;
case 1:
return mu;
case 2:
return pi;
case 3:
return ka;
case 4:
return pr;
default:
LOG(fatal) << "Unrecognized PDG code for InnerTOF";
return 999.f;
}
});
DECLARE_SOA_DYNAMIC_COLUMN(NSigmaOuterTOF, nSigmaOuterTOF, //! General function to get the nSigma for the OuterTOF
[](const float el,
const float mu,
const float pi,
const float ka,
const float pr,
const int id) -> float {
switch (std::abs(id)) {
case 0:
return el;
case 1:
return mu;
case 2:
return pi;
case 3:
return ka;
case 4:
return pr;
default:
LOG(fatal) << "Unrecognized PDG code for InnerTOF";
return 999.f;
}
});

} // namespace upgrade_tof

DECLARE_SOA_TABLE(UpgradeTofMCs, "AOD", "UPGRADETOFMC",
Expand All @@ -85,7 +132,17 @@
upgrade_tof::NSigmaKaonOuterTOF,
upgrade_tof::NSigmaProtonOuterTOF,
upgrade_tof::OuterTOFTrackTimeReco,
upgrade_tof::OuterTOFTrackLengthReco);
upgrade_tof::OuterTOFTrackLengthReco,
upgrade_tof::NSigmaInnerTOF<upgrade_tof::NSigmaElectronInnerTOF,
upgrade_tof::NSigmaMuonInnerTOF,
upgrade_tof::NSigmaPionInnerTOF,
upgrade_tof::NSigmaKaonInnerTOF,
upgrade_tof::NSigmaProtonInnerTOF>,
upgrade_tof::NSigmaOuterTOF<upgrade_tof::NSigmaElectronOuterTOF,
upgrade_tof::NSigmaMuonOuterTOF,
upgrade_tof::NSigmaPionOuterTOF,
upgrade_tof::NSigmaKaonOuterTOF,
upgrade_tof::NSigmaProtonOuterTOF>);

DECLARE_SOA_TABLE(UpgradeTofExpectedTimes, "AOD", "UPGRADETOFEXPT",
upgrade_tof::InnerTOFExpectedTimeEl,
Expand Down
2 changes: 1 addition & 1 deletion ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -229,19 +229,19 @@
l_aerogel_z[i_central_mirror] = std::sqrt(1.0 + m_val * m_val) * R_min * square_size_barrel_cylinder / (std::sqrt(1.0 + m_val * m_val) * R_max - m_val * square_size_barrel_cylinder);
T_r_plus_g[i_central_mirror] = R_max - R_min;
float t = std::tan(std::atan(m_val) + std::atan(square_size_barrel_cylinder / (2.0 * R_max * std::sqrt(1.0 + m_val * m_val) - square_size_barrel_cylinder * m_val)));
theta_max[i_central_mirror] = M_PI / 2.0 - std::atan(t);

Check failure on line 232 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
theta_min[i_central_mirror] = M_PI / 2.0 + std::atan(t);

Check failure on line 233 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
mProjectiveLengthInner = R_min * t;
aerogel_rindex[i_central_mirror] = bRichRefractiveIndexSector[0];
for (int i = i_central_mirror + 1; i < number_of_sectors_in_z; i++) {
float par_a = t;
float par_b = 2.0 * R_max / square_size_z;
m_val = (std::sqrt(par_a * par_a * par_b * par_b + par_b * par_b - 1.0) + par_a * par_b * par_b) / (par_b * par_b - 1.0);
theta_min[i] = M_PI / 2.0 - std::atan(t);

Check failure on line 240 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
theta_max[2 * i_central_mirror - i] = M_PI / 2.0 + std::atan(t);

Check failure on line 241 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
t = std::tan(std::atan(m_val) + std::atan(square_size_z / (2.0 * R_max * std::sqrt(1.0 + m_val * m_val) - square_size_z * m_val)));
theta_max[i] = M_PI / 2.0 - std::atan(t);

Check failure on line 243 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
theta_min[2 * i_central_mirror - i] = M_PI / 2.0 + std::atan(t);

Check failure on line 244 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
// Forward sectors
theta_bi[i] = std::atan(m_val);
R0_tilt[i] = R_max - square_size_z / 2.0 * std::sin(std::atan(m_val));
Expand Down Expand Up @@ -270,8 +270,8 @@
float par_a = t;
float par_b = 2.0 * R_max / square_size_z;
m_val = (std::sqrt(par_a * par_a * par_b * par_b + par_b * par_b - 1.0) + par_a * par_b * par_b) / (par_b * par_b - 1.0);
theta_min[i] = M_PI / 2.0 - std::atan(t);

Check failure on line 273 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
theta_max[2 * i_central_mirror - i - 1] = M_PI / 2.0 + std::atan(t);

Check failure on line 274 in ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
t = std::tan(std::atan(m_val) + std::atan(square_size_z / (2.0 * R_max * std::sqrt(1.0 + m_val * m_val) - square_size_z * m_val)));
theta_max[i] = M_PI / 2.0 - std::atan(t);
theta_min[2 * i_central_mirror - i - 1] = M_PI / 2.0 + std::atan(t);
Expand Down Expand Up @@ -325,7 +325,7 @@
if (lut.value != "inherit") {
return;
}
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut.name, lut.value, true)) {
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) {
LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task";
}
};
Expand Down
2 changes: 1 addition & 1 deletion ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct OnTheFlyTofPid {
if (lut.value != "inherit") {
return;
}
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut.name, lut.value, true)) {
if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) {
LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task";
}
};
Expand Down
Loading