Skip to content

Commit 28fdd55

Browse files
authored
Update onTheFlyRichPid.cxx
1 parent 72e92a9 commit 28fdd55

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -661,14 +661,14 @@ struct OnTheFlyRichPid {
661661
// Fraction of photons in rings (to account loss close to sector boundary in projective geometry)
662662
const float sinThetaCherenkovSquared = sinThetaCherenkov * sinThetaCherenkov;
663663
const float radius = (thicknessRad / 2.0) * std::tan(thetaCherenkov) + thicknessGas * std::tan(std::asin((n / nGas) * sinThetaCherenkov));
664-
const float n0 = 24. * thicknessRad / 2.; // photons for N = 1.03 at saturation ( 24/2 factor per radiator cm )
664+
const float n0Photons = 24. * thicknessRad / 2.; // photons for N = 1.03 at saturation ( 24/2 factor per radiator cm )
665665
const float sinAngle = std::sin(std::acos(1. / 1.03));
666666
const float sinAngleSquared = sinAngle * sinAngle;
667667
const float multiplicitySpectrumFactor = sinThetaCherenkovSquared / sinAngleSquared; // scale multiplicity w.r.t. N = 1.03 at saturation
668668
// Considering average resolution (integrated over the sector)
669-
// float nPhotons = (tileZlength / 2.0 > radius) ? n0 * multiplicitySpectrumFactor * (1.-(2.0*radius)/(o2::constants::math::PI*tileZlength)) : n0 * multiplicitySpectrumFactor * (1.-(2.0*radius)/(o2::constants::math::PI*tileZlength) - (2.0/(tileZlength*o2::constants::math::PI))*(-(tileZlength/(2.0))*std::acos(tileZlength/(2.0*radius)) + radius*std::sqrt(1.-std::pow(tileZlength/(2.0*radius),2.0))));
669+
// float nPhotons = (tileZlength / 2.0 > radius) ? n0Photons * multiplicitySpectrumFactor * (1.-(2.0*radius)/(o2::constants::math::PI*tileZlength)) : n0Photons * multiplicitySpectrumFactor * (1.-(2.0*radius)/(o2::constants::math::PI*tileZlength) - (2.0/(tileZlength*o2::constants::math::PI))*(-(tileZlength/(2.0))*std::acos(tileZlength/(2.0*radius)) + radius*std::sqrt(1.-std::pow(tileZlength/(2.0*radius),2.0))));
670670
// Considering "exact" resolution (eta by eta)
671-
const float nPhotons = n0 * multiplicitySpectrumFactor * fractionPhotonsProjectiveRICH(eta, tileZlength, radius);
671+
const float nPhotons = n0Photons * multiplicitySpectrumFactor * fractionPhotonsProjectiveRICH(eta, tileZlength, radius);
672672
if (nPhotons <= kErrorValue + 1)
673673
return kErrorValue;
674674
// Ring angular resolution
@@ -935,8 +935,8 @@ struct OnTheFlyRichPid {
935935
histos.fill(HIST("h2dBarrelNsigmaTruePionVsKaonHypothesis"), recoTrack.getP(), nSigmaBarrelRich[3]);
936936
histos.fill(HIST("h2dBarrelNsigmaTruePionVsProtHypothesis"), recoTrack.getP(), nSigmaBarrelRich[4]);
937937
break;
938-
case kPdgArray[kka]: // Kaon
939-
case -kPdgArray[kka]: // AntiKaon
938+
case kPdgArray[kKa]: // Kaon
939+
case -kPdgArray[kKa]: // AntiKaon
940940
histos.fill(HIST("h2dBarrelNsigmaTrueKaonVsElecHypothesis"), recoTrack.getP(), nSigmaBarrelRich[0]);
941941
histos.fill(HIST("h2dBarrelNsigmaTrueKaonVsMuonHypothesis"), recoTrack.getP(), nSigmaBarrelRich[1]);
942942
histos.fill(HIST("h2dBarrelNsigmaTrueKaonVsPionHypothesis"), recoTrack.getP(), nSigmaBarrelRich[2]);

0 commit comments

Comments
 (0)