Skip to content
Merged
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
13 changes: 10 additions & 3 deletions ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,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 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.
theta_min[i_central_mirror] = M_PI / 2.0 + std::atan(t);

Check failure on line 234 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 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.
theta_max[2 * i_central_mirror - i] = M_PI / 2.0 + std::atan(t);

Check failure on line 242 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 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.
theta_min[2 * i_central_mirror - i] = M_PI / 2.0 + std::atan(t);

Check failure on line 245 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 @@ -271,11 +271,11 @@
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 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.
theta_max[2 * i_central_mirror - i - 1] = M_PI / 2.0 + std::atan(t);

Check failure on line 275 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 277 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 - 1] = M_PI / 2.0 + std::atan(t);

Check failure on line 278 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 @@ -745,10 +745,15 @@
}

for (const auto& track : tracks) {

float nSigmaBarrelRich[5] = {error_value, error_value, error_value, error_value, error_value};

// first step: find precise arrival time (if any)
// --- convert track into perfect track
if (!track.has_mcParticle()) // should always be OK but check please
if (!track.has_mcParticle()) { // should always be OK but check please
upgradeRich(nSigmaBarrelRich[0], nSigmaBarrelRich[1], nSigmaBarrelRich[2], nSigmaBarrelRich[3], nSigmaBarrelRich[4]);
continue;
}

auto mcParticle = track.mcParticle();
o2::track::TrackParCov o2track = o2::upgrade::convertMCParticleToO2Track(mcParticle, pdg);
Expand All @@ -761,12 +766,14 @@
// get particle to calculate Cherenkov angle and resolution
auto pdgInfo = pdg->GetParticle(mcParticle.pdgCode());
if (pdgInfo == nullptr) {
upgradeRich(nSigmaBarrelRich[0], nSigmaBarrelRich[1], nSigmaBarrelRich[2], nSigmaBarrelRich[3], nSigmaBarrelRich[4]);
continue;
}

// find track bRICH sector
int i_sector = findSector(o2track.getEta());
if (i_sector < 0) {
upgradeRich(nSigmaBarrelRich[0], nSigmaBarrelRich[1], nSigmaBarrelRich[2], nSigmaBarrelRich[3], nSigmaBarrelRich[4]);
continue;
}

Expand Down Expand Up @@ -794,12 +801,12 @@
}

// Straight to Nsigma
float deltaThetaBarrelRich[5], nSigmaBarrelRich[5];
float deltaThetaBarrelRich[5]; //, nSigmaBarrelRich[5];
int lpdg_array[5] = {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};
float masses[5];

for (int ii = 0; ii < 5; ii++) {
nSigmaBarrelRich[ii] = error_value;
// nSigmaBarrelRich[ii] = error_value;

auto pdgInfoThis = pdg->GetParticle(lpdg_array[ii]);
masses[ii] = pdgInfoThis->Mass();
Expand Down
Loading