Skip to content

Commit 271a519

Browse files
committed
ALICE3-TRK: adjusted curvedToFlat coordinate orientation
1 parent 5e060aa commit 271a519

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/SegmentationChip.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ class SegmentationChip
236236

237237
// the y position is in the silicon volume however we need the chip volume (silicon+metalstack)
238238
// this is accounted by a y shift
239-
float xFlat = -constants::VD::petal::layer::radii[layer] * phi; /// this is equal to the circumference segment covered between y=0 and the phi angle
240-
float yFlat = dist - constants::VD::petal::layer::radii[layer];
239+
float xFlat = constants::VD::petal::layer::radii[layer] * phi; /// this is equal to the circumference segment covered between y=0 and the phi angle
240+
float yFlat = constants::VD::petal::layer::radii[layer] - dist;
241241
return math_utils::Vector2D<float>(xFlat, yFlat);
242242
}
243243

@@ -253,8 +253,8 @@ class SegmentationChip
253253
static constexpr math_utils::Vector2D<float> flatToCurved(int layer, float xFlat, float yFlat) noexcept
254254
{
255255
// Revert the curvedToFlat transformation
256-
float dist = yFlat + constants::VD::petal::layer::radii[layer];
257-
float phi = -xFlat / constants::VD::petal::layer::radii[layer];
256+
float dist = constants::VD::petal::layer::radii[layer] - yFlat;
257+
float phi = xFlat / constants::VD::petal::layer::radii[layer];
258258
// the y position is in the chip volume however we need the silicon volume
259259
// this is accounted by a -y shift
260260
float xCurved = dist * std::cos(phi);

0 commit comments

Comments
 (0)