Skip to content

Commit 72e92a9

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

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ struct OnTheFlyRichPid {
232232
lAerogelZ[2 * iCentralMirror - i] = std::sqrt(1.0 + mVal * mVal) * rMin * squareSizeZ / (std::sqrt(1.0 + mVal * mVal) * rMax - mVal * squareSizeZ);
233233
tRPlusG[2 * iCentralMirror - i] = std::sqrt(1.0 + mVal * mVal) * (rMax - rMin) - mVal / 2.0 * (squareSizeZ + lAerogelZ[i]);
234234
aerogelRindex[2 * iCentralMirror - i] = bRichRefractiveIndexSector[i - iCentralMirror];
235-
bRichPhotodetectorCentralModuleHalfLength.value = rMin * t; // <-- At the end of the loop this will be the maximum Z
235+
bRichPhotodetectorCentralModuleHalfLength.value = rMin * t; // <-- At the end of the loop this will be the maximum z
236236
}
237237
} else { // Even number of sectors
238238
float twoHalfGap = 1.0;
@@ -265,7 +265,7 @@ struct OnTheFlyRichPid {
265265
lAerogelZ[2 * iCentralMirror - i - 1] = std::sqrt(1.0 + mVal * mVal) * rMin * squareSizeZ / (std::sqrt(1.0 + mVal * mVal) * rMax - mVal * squareSizeZ);
266266
tRPlusG[2 * iCentralMirror - i - 1] = std::sqrt(1.0 + mVal * mVal) * (rMax - rMin) - mVal / 2.0 * (squareSizeZ + lAerogelZ[i]);
267267
aerogelRindex[2 * iCentralMirror - i - 1] = bRichRefractiveIndexSector[i - iCentralMirror];
268-
bRichPhotodetectorCentralModuleHalfLength.value = rMin * t; // <-- At the end of the loop this will be the maximum Z
268+
bRichPhotodetectorCentralModuleHalfLength.value = rMin * t; // <-- At the end of the loop this will be the maximum z
269269
}
270270
}
271271
// Coordinate radiali layer considerati
@@ -525,11 +525,11 @@ struct OnTheFlyRichPid {
525525
static constexpr float kEtaSampling[] = {-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};
526526
static constexpr float kResRingSamplingWithAbsWalls[] = {0.0009165, 0.000977, 0.001098, 0.001198, 0.001301, 0.001370, 0.001465, 0.001492, 0.001498, 0.001480, 0.001406, 0.001315, 0.001241, 0.001325, 0.001424, 0.001474, 0.001480, 0.001487, 0.001484, 0.001404, 0.001273, 0.001197, 0.001062, 0.000965, 0.0009165};
527527
static constexpr float kResRingSamplingWithoutAbsWalls[] = {0.0009165, 0.000977, 0.001095, 0.001198, 0.001300, 0.001369, 0.001468, 0.001523, 0.001501, 0.001426, 0.001299, 0.001167, 0.001092, 0.001179, 0.001308, 0.001407, 0.001491, 0.001508, 0.001488, 0.001404, 0.001273, 0.001196, 0.001061, 0.000965, 0.0009165};
528-
static constexpr int sizeResVector = sizeof(kEtaSampling) / sizeof(kEtaSampling[0]);
528+
static constexpr int kSizeResVector = sizeof(kEtaSampling) / sizeof(kEtaSampling[0]);
529529
// Use binary search to find the lower and upper indices
530-
const int lowerIndex = std::lower_bound(kEtaSampling, kEtaSampling + sizeResVector, eta) - kEtaSampling - 1;
530+
const int lowerIndex = std::lower_bound(kEtaSampling, kEtaSampling + kSizeResVector, eta) - kEtaSampling - 1;
531531
const int upperIndex = lowerIndex + 1;
532-
if (lowerIndex >= 0 && upperIndex < sizeResVector) {
532+
if (lowerIndex >= 0 && upperIndex < kSizeResVector) {
533533
// Resolution interpolation
534534
if (bRichFlagAbsorbingWalls) {
535535
float interpolatedResRing = interpolate(eta, kEtaSampling[lowerIndex], kEtaSampling[upperIndex], kResRingSamplingWithAbsWalls[lowerIndex], kResRingSamplingWithAbsWalls[upperIndex]);
@@ -610,24 +610,24 @@ struct OnTheFlyRichPid {
610610
// const float ze = thicknessRad / (2. * zP);
611611
const float aZ = zP * cosThetaCherenkov - xP * sinThetaCherenkov * cosPhi;
612612
const float e3z = std::sqrt(aZ * aZ + (nGas / n) * (nGas / n) - 1.);
613-
const float Z = thicknessGas;
613+
const float z = thicknessGas;
614614
const float alpha = e3z / aZ;
615615
const float etac = e3z * n * n;
616-
const float k = thicknessRad / (2. * Z);
616+
const float k = thicknessRad / (2. * z);
617617
const float m = 1. / (n * n);
618618
const float lambda = (1. + k * alpha * alpha * alpha) / (1. + k * alpha);
619619
// Derivative d(thetaCherenkov)/dx
620-
const float temp1 = etac / Z;
620+
const float temp1 = etac / z;
621621
const float temp2 = alpha * e3z * cosPhi;
622622
const float temp3 = xP * sinThetaCherenkov * sinPhi * sinPhi;
623623
const float dThetaX = temp1 * (temp2 - temp3);
624624
// Derivative d(thetaCherenkov)/dy
625-
const float temp4 = etac * sinPhi / Z;
625+
const float temp4 = etac * sinPhi / z;
626626
const float temp5 = cosThetaCherenkov - zP * (1 - m) / aZ;
627627
const float dThetaY = temp4 * temp5;
628628
// Derivative d(thetaCherenkov)/dze
629629
const float temp8 = etac * sinThetaCherenkov;
630-
const float temp9 = Z * (1.0 + k * alpha * alpha * alpha * n * n);
630+
const float temp9 = z * (1.0 + k * alpha * alpha * alpha * n * n);
631631
const float temp10 = alpha * alpha * (1.0 - xP * xP * sinPhi * sinPhi) + lambda * xP * xP * sinPhi * sinPhi;
632632
const float dThetaZe = temp8 * temp10 / temp9;
633633
// Derivative d(thetaCherenkov)/dn

0 commit comments

Comments
 (0)