Skip to content

Commit a35cf1e

Browse files
committed
Fix precalculated sector cos/sin values in TOF Geo
1 parent fe67204 commit a35cf1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Detectors/TOF/base/src/Geo.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,8 @@ void Geo::rotateToSector(Float_t* xyz, Int_t isector)
10491049
void Geo::alignedToNominalSector(Float_t* xyz, Int_t isector)
10501050
{
10511051
// rotate from the aligned sector frame coordinates to nominal ones (i.e. alpha=20*sector+10 deg.)
1052-
constexpr float CS[18] = {.848077e-01, 8.660254e-01, 6.427876e-01, 3.420202e-01, -4.371139e-08, -3.420201e-01, -6.427876e-01, -8.660254e-01, -9.848077e-01, -9.848077e-01, -8.660254e-01, -6.427875e-01, -3.420201e-01, 1.192488e-08, 3.420201e-01, 6.427875e-01, 8.660253e-01, 9.848078e-01};
1053-
constexpr float SN[18] = {1.736482e-01, 5.000000e-01, 7.660444e-01, 9.396926e-01, 1.000000e+00, 9.396926e-01, 7.660444e-01, 5.000001e-01, 1.736483e-01, -1.736482e-01, -5.000000e-01, -7.660446e-01, -9.396927e-01, -1.000000e+00, -9.396926e-01, -7.660445e-01, -5.000002e-01, -1.736480e-01};
1052+
constexpr float CS[18] = {+9.848078e-01, +8.660254e-01, +6.427876e-01, +3.420201e-01, +6.123234e-17, -3.420201e-01, -6.427876e-01, -8.660254e-01, -9.848078e-01, -9.848078e-01, -8.660254e-01, -6.427876e-01, -3.420201e-01, -1.836970e-16, +3.420201e-01, +6.427876e-01, +8.660254e-01, +9.848078e-01};
1053+
constexpr float SN[18] = {+1.736482e-01, +5.000000e-01, +7.660444e-01, +9.396926e-01, +1.000000e+00, +9.396926e-01, +7.660444e-01, +5.000000e-01, +1.736482e-01, -1.736482e-01, -5.000000e-01, -7.660444e-01, -9.396926e-01, -1.000000e+00, -9.396926e-01, -7.660444e-01, -5.000000e-01, -1.736482e-01};
10541054
Float_t xyzDummy[3] = {xyz[1], xyz[2], xyz[0]}; // go to twisted coordinates...
10551055
o2::tof::Geo::antiRotateToSector(xyzDummy, isector); // lab coordinates
10561056
xyz[0] = xyzDummy[0] * CS[isector] + xyzDummy[1] * SN[isector];

0 commit comments

Comments
 (0)