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)) {
172 if (!isValidDet(
row,
col)) {
176 return isValidLoc(xRow, zCol);
189 float xRow{0.}, zCol{0.};
193 loc.SetCoordinates(xRow, 0.0f, zCol);
199 float xRow{0.}, zCol{0.};
201 loc.SetCoordinates(xRow, 0.0f, zCol);
206 template <
typename T>
207 constexpr bool isValidLoc(T
const x, T
const z)
const noexcept
213 template <
typename T>
214 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
void detectorToLocalUnchecked(float const row, float const col, float &xRow, float &zCol) const noexcept
void detectorToLocalUnchecked(float const row, float const col, math_utils::Point3D< float > &loc) const noexcept
constexpr void flatToCurved(float xFlat, float yFlat, float &xCurved, float &yCurved) const noexcept
static constexpr float Length
bool detectorToLocal(float const row, float const col, math_utils::Point3D< float > &loc) const noexcept
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
static constexpr int NCols
bool detectorToLocal(float const row, float const col, float &xRow, float &zCol) const noexcept
constexpr SegmentationMosaix & operator=(const SegmentationMosaix &)=default
constexpr SegmentationMosaix(int layer)
static constexpr float WidthH
static constexpr float Width
constexpr void localToDetectorUnchecked(float const xRow, float const zCol, int &iRow, int &iCol) const noexcept
static constexpr float PitchRow
constexpr bool localToDetector(float const xRow, float const zCol, int &iRow, int &iCol) const noexcept
GLenum GLuint GLint GLint layer
GLdouble GLdouble GLdouble z
constexpr double totalThickness