|
41 | 41 | #include "CCDB/BasicCCDBManager.h" |
42 | 42 | #include "CCDB/CcdbApi.h" |
43 | 43 | #include "CommonConstants/GeomConstants.h" |
| 44 | +#include "CommonConstants/MathConstants.h" |
44 | 45 | #include "CommonConstants/PhysicsConstants.h" |
45 | 46 | #include "CommonUtils/NameConf.h" |
46 | 47 | #include "DataFormatsCalibration/MeanVertexObject.h" |
@@ -506,7 +507,7 @@ struct OnTheFlyRichPid { |
506 | 507 | /// \param n the refractive index of the considered sector |
507 | 508 | /// \param angle the output angle (passed by reference) |
508 | 509 | /// \return true if particle is above the threshold and enough photons, false otherwise |
509 | | - bool CherenkovAngle(const float momentum, const float mass, const float n, float& angle) |
| 510 | + bool cherenkovAngle(const float momentum, const float mass, const float n, float& angle) |
510 | 511 | { |
511 | 512 | if (momentum > mass / std::sqrt(n * n - 1.0)) { // Check if particle is above the threshold |
512 | 513 | // Calculate angle |
@@ -539,7 +540,7 @@ struct OnTheFlyRichPid { |
539 | 540 |
|
540 | 541 | /// returns angular resolution for considered track eta |
541 | 542 | /// \param eta the pseudorapidity of the tarck (assuming primary vertex at origin) |
542 | | - float AngularResolution(float eta) |
| 543 | + float angularResolution(float eta) |
543 | 544 | { |
544 | 545 | // Vectors for sampling (USE ANALYTICAL EXTRAPOLATION FOR BETTER RESULTS) |
545 | 546 | static constexpr float etaSampling[] = {-2.000000, -1.909740, -1.731184, -1.552999, -1.375325, -1.198342, -1.022276, -0.847390, -0.673976, -0.502324, -0.332683, -0.165221, 0.000000, 0.165221, 0.332683, 0.502324, 0.673976, 0.847390, 1.022276, 1.198342, 1.375325, 1.552999, 1.731184, 1.909740, 2.000000}; |
@@ -628,30 +629,30 @@ struct OnTheFlyRichPid { |
628 | 629 | const float sinPhi = std::sin(phiC); |
629 | 630 | const float cosPhi = std::cos(phiC); |
630 | 631 | // const float ze = thicknessRad / (2. * zP); |
631 | | - const float az = zP * cosThetaCherenkov - xP * sinThetaCherenkov * cosPhi; |
632 | | - const float e3z = std::sqrt(az * az + (nGas / n) * (nGas / n) - 1.); |
| 632 | + const float aZ = zP * cosThetaCherenkov - xP * sinThetaCherenkov * cosPhi; |
| 633 | + const float e3Z = std::sqrt(aZ * aZ + (nGas / n) * (nGas / n) - 1.); |
633 | 634 | const float Z = thicknessGas; |
634 | | - const float alpha = e3z / az; |
635 | | - const float etac = e3z * n * n; |
| 635 | + const float alpha = e3Z / aZ; |
| 636 | + const float etac = e3Z * n * n; |
636 | 637 | const float k = thicknessRad / (2. * Z); |
637 | 638 | const float m = 1. / (n * n); |
638 | 639 | const float lambda = (1. + k * alpha * alpha * alpha) / (1. + k * alpha); |
639 | 640 | // Derivative d(thetaCherenkov)/dx |
640 | 641 | const float temp1 = etac / Z; |
641 | | - const float temp2 = alpha * e3z * cosPhi; |
| 642 | + const float temp2 = alpha * e3Z * cosPhi; |
642 | 643 | const float temp3 = xP * sinThetaCherenkov * sinPhi * sinPhi; |
643 | 644 | const float dThetaX = temp1 * (temp2 - temp3); |
644 | 645 | // Derivative d(thetaCherenkov)/dy |
645 | 646 | const float temp4 = etac * sinPhi / Z; |
646 | | - const float temp5 = cosThetaCherenkov - zP * (1 - m) / az; |
| 647 | + const float temp5 = cosThetaCherenkov - zP * (1 - m) / aZ; |
647 | 648 | const float dThetaY = temp4 * temp5; |
648 | 649 | // Derivative d(thetaCherenkov)/dze |
649 | 650 | const float temp8 = etac * sinThetaCherenkov; |
650 | 651 | const float temp9 = Z * (1.0 + k * alpha * alpha * alpha * n * n); |
651 | 652 | const float temp10 = alpha * alpha * (1.0 - xP * xP * sinPhi * sinPhi) + lambda * xP * xP * sinPhi * sinPhi; |
652 | 653 | const float dThetaZe = temp8 * temp10 / temp9; |
653 | 654 | // Derivative d(thetaCherenkov)/dn |
654 | | - const float dThetaN = zP / (n * az * sinThetaCherenkov); |
| 655 | + const float dThetaN = zP / (n * aZ * sinThetaCherenkov); |
655 | 656 | // RMS wavelength (using Sellmeier formula with measured aerogel parameters) |
656 | 657 | const float a0 = 0.0616; |
657 | 658 | const float w0 = 56.5; |
@@ -681,14 +682,14 @@ struct OnTheFlyRichPid { |
681 | 682 | // Fraction of photons in rings (to account loss close to sector boundary in projective geometry) |
682 | 683 | const float sinThetaCherenkovSquared = sinThetaCherenkov * sinThetaCherenkov; |
683 | 684 | const float radius = (thicknessRad / 2.0) * std::tan(thetaCherenkov) + thicknessGas * std::tan(std::asin((n / nGas) * sinThetaCherenkov)); |
684 | | - const float N0 = 24. * thicknessRad / 2.; // photons for N = 1.03 at saturation ( 24/2 factor per radiator cm ) |
| 685 | + const float n0 = 24. * thicknessRad / 2.; // photons for N = 1.03 at saturation ( 24/2 factor per radiator cm ) |
685 | 686 | const float sinAngle = std::sin(std::acos(1. / 1.03)); |
686 | 687 | const float sinAngleSquared = sinAngle * sinAngle; |
687 | 688 | const float multiplicitySpectrumFactor = sinThetaCherenkovSquared / sinAngleSquared; // scale multiplicity w.r.t. N = 1.03 at saturation |
688 | 689 | // Considering average resolution (integrated over the sector) |
689 | | - // 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)))); |
| 690 | + // 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)))); |
690 | 691 | // Considering "exact" resolution (eta by eta) |
691 | | - const float nPhotons = N0 * multiplicitySpectrumFactor * fractionPhotonsProjectiveRICH(eta, tileZlength, radius); |
| 692 | + const float nPhotons = n0 * multiplicitySpectrumFactor * fractionPhotonsProjectiveRICH(eta, tileZlength, radius); |
692 | 693 | if (nPhotons <= kErrorValue + 1) |
693 | 694 | return kErrorValue; |
694 | 695 | // Ring angular resolution |
@@ -797,12 +798,12 @@ struct OnTheFlyRichPid { |
797 | 798 | } |
798 | 799 |
|
799 | 800 | float expectedAngleBarrelRich = kErrorValue; |
800 | | - const bool expectedAngleBarrelRichOk = CherenkovAngle(o2track.getP(), pdgInfo->Mass(), aerogelRindex[iSecor], expectedAngleBarrelRich); |
| 801 | + const bool expectedAngleBarrelRichOk = cherenkovAngle(o2track.getP(), pdgInfo->Mass(), aerogelRindex[iSecor], expectedAngleBarrelRich); |
801 | 802 | if (!expectedAngleBarrelRichOk) { |
802 | 803 | fillDummyValues(); |
803 | 804 | continue; // Particle is below the threshold or not enough photons |
804 | 805 | } |
805 | | - // float barrelRICHAngularResolution = AngularResolution(o2track.getEta()); |
| 806 | + // float barrelRICHAngularResolution = angularResolution(o2track.getEta()); |
806 | 807 | const float barrelRICHAngularResolution = extractRingAngularResolution(o2track.getEta(), aerogelRindex[iSecor], bRichGapRefractiveIndex, bRichRadiatorThickness, gapThickness[iSecor], bRICHPixelSize, expectedAngleBarrelRich, photodetrctorLength[iSecor]); |
807 | 808 | const float projectiveRadiatorRadius = radiusRipple(o2track.getEta(), iSecor); |
808 | 809 | bool flagReachesRadiator = false; |
@@ -844,7 +845,7 @@ struct OnTheFlyRichPid { |
844 | 845 | for (int ii = 0; ii < kNspecies; ii++) { // Loop on the particle hypotheses |
845 | 846 |
|
846 | 847 | float hypothesisAngleBarrelRich = kErrorValue; |
847 | | - const bool hypothesisAngleBarrelRichOk = CherenkovAngle(recoTrack.getP(), masses[ii], aerogelRindex[iSecor], hypothesisAngleBarrelRich); |
| 848 | + const bool hypothesisAngleBarrelRichOk = cherenkovAngle(recoTrack.getP(), masses[ii], aerogelRindex[iSecor], hypothesisAngleBarrelRich); |
848 | 849 | signalBarrelRich[ii] = hypothesisAngleBarrelRichOk; // Particle is above the threshold and enough photons |
849 | 850 |
|
850 | 851 | // Evaluate total sigma (layer + tracking resolution) |
|
0 commit comments