17#ifndef ALICEO2_ITS3_SEGMENTATIONMOSAIX_H_
18#define ALICEO2_ITS3_SEGMENTATIONMOSAIX_H_
76 static constexpr float PitchCol{constants::pixelarray::pixels::mosaix::pitchZ};
77 static constexpr float PitchRow{constants::pixelarray::pixels::mosaix::pitchX};
95 constexpr void curvedToFlat(
const float xCurved,
const float yCurved,
float& xFlat,
float& yFlat)
const noexcept
99 float dist = std::hypot(xCurved, yCurved);
100 float phi = std::atan2(yCurved, xCurved);
103 xFlat =
WidthH - mRadius * phi;
104 yFlat = dist - mRadius;
117 constexpr void flatToCurved(
float xFlat,
float yFlat,
float& xCurved,
float& yCurved)
const noexcept
121 float dist = yFlat + mRadius;
122 float phi = (
WidthH - xFlat) / mRadius;
125 xCurved = dist * std::cos(phi);
126 yCurved = dist * std::sin(phi);
140 constexpr bool localToDetector(
float const xRow,
float const zCol,
int& iRow,
int& iCol)
const noexcept
142 if (!isValidLoc(xRow, zCol)) {
146 if (!isValidDet(iRow, iCol)) {
154 template <
typename T =
float>
171 template <
typename T =
float,
typename L =
float>
174 if (!isValidDet(
row,
col)) {
178 return isValidLoc(xRow, zCol);
183 template <
typename T =
float,
typename L =
float>
190 template <
typename T =
float,
typename L =
float>
193 L xRow{0.}, zCol{0.};
197 loc.SetCoordinates(xRow, 0.0f, zCol);
201 template <
typename T =
float,
typename L =
float>
204 L xRow{0.}, zCol{0.};
206 loc.SetCoordinates(xRow, 0.0f, zCol);
211 template <
typename T>
212 constexpr bool isValidLoc(T
const x, T
const z)
const noexcept
218 template <
typename T>
219 constexpr bool isValidDet(T
const row, T
const col)
const noexcept
Segmentation and response for pixels in ITS3 upgrade.
static constexpr float SensorLayerThickness
constexpr SegmentationMosaix(SegmentationMosaix &&)=delete
constexpr void flatToCurved(float xFlat, float yFlat, float &xCurved, float &yCurved) const noexcept
static constexpr float Length
constexpr void curvedToFlat(const float xCurved, const float yCurved, float &xFlat, float &yFlat) const noexcept
static constexpr float PitchCol
static constexpr int NPixels
static constexpr int NRows
constexpr SegmentationMosaix(const SegmentationMosaix &)=default
constexpr ~SegmentationMosaix()=default
static constexpr float LengthH
constexpr SegmentationMosaix & operator=(SegmentationMosaix &&)=delete
void detectorToLocalUnchecked(T const row, T const col, math_utils::Point3D< L > &loc) const noexcept
static constexpr int NCols
constexpr SegmentationMosaix & operator=(const SegmentationMosaix &)=default
constexpr SegmentationMosaix(int layer)
bool detectorToLocal(T const row, T const col, L &xRow, L &zCol) const noexcept
static constexpr float WidthH
static constexpr float Width
bool detectorToLocal(T const row, T const col, math_utils::Point3D< L > &loc) const noexcept
static constexpr float PitchRow
constexpr void localToDetectorUnchecked(T const xRow, T const zCol, int &iRow, int &iCol) const noexcept
constexpr bool localToDetector(float const xRow, float const zCol, int &iRow, int &iCol) const noexcept
void detectorToLocalUnchecked(T const row, T const col, L &xRow, L &zCol) const noexcept
GLenum GLuint GLint GLint layer
GLdouble GLdouble GLdouble z
constexpr double totalThickness