Skip to content

Commit 7509845

Browse files
committed
ITS3: account in segmentation trans for nominal shift
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 87ddaba commit 7509845

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Detectors/Upgrades/ITS3/base/include/ITS3Base/SegmentationMosaix.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ class SegmentationMosaix
6666
static constexpr float LengthH{Length / 2.f};
6767
static constexpr float Width{constants::pixelarray::width};
6868
static constexpr float WidthH{Width / 2.f};
69-
static constexpr float PitchCol{constants::pixelarray::length / static_cast<float>(NCols)};
70-
static constexpr float PitchRow{constants::pixelarray::width / static_cast<float>(NRows)};
69+
static constexpr float PitchCol{constants::pixelarray::pixels::mosaix::pitchZ};
70+
static constexpr float PitchRow{constants::pixelarray::pixels::mosaix::pitchX};
7171
static constexpr float SensorLayerThickness{constants::totalThickness};
72+
static constexpr float NominalYShift{constants::nominalYShift};
7273

7374
/// Transformation from the curved surface to a flat surface
7475
/// \param xCurved Detector local curved coordinate x in cm with respect to
@@ -88,7 +89,7 @@ class SegmentationMosaix
8889
xFlat = (mRadius * phi) - WidthH;
8990
// the y position is in the silicon volume however we need the chip volume (silicon+metalstack)
9091
// this is accounted by a y shift
91-
yFlat = dist + (static_cast<float>(constants::nominalYShift) - mRadius);
92+
yFlat = dist - mRadius + NominalYShift;
9293
}
9394

9495
/// Transformation from the flat surface to a curved surface
@@ -107,7 +108,7 @@ class SegmentationMosaix
107108
// stack
108109
// the y position is in the chip volume however we need the silicon volume
109110
// this is accounted by a -y shift
110-
float dist = yFlat + (mRadius - static_cast<float>(constants::nominalYShift));
111+
float dist = yFlat - NominalYShift + mRadius;
111112
xCurved = dist * std::cos((xFlat + WidthH) / mRadius);
112113
yCurved = dist * std::sin((xFlat + WidthH) / mRadius);
113114
}
@@ -173,15 +174,15 @@ class SegmentationMosaix
173174
if (!detectorToLocal(row, col, xRow, zCol)) {
174175
return false;
175176
}
176-
loc.SetCoordinates(xRow, 0., zCol);
177+
loc.SetCoordinates(xRow, NominalYShift, zCol);
177178
return true;
178179
}
179180

180181
constexpr void detectorToLocalUnchecked(int const row, int const col, math_utils::Point3D<float>& loc) const noexcept
181182
{
182183
float xRow{0.}, zCol{0.};
183184
detectorToLocalUnchecked(row, col, xRow, zCol);
184-
loc.SetCoordinates(xRow, 0., zCol);
185+
loc.SetCoordinates(xRow, NominalYShift, zCol);
185186
}
186187

187188
private:

0 commit comments

Comments
 (0)