16#ifndef ALICEO2_ITS3_SEGMENTATIONSUPERALPIDE_H_
17#define ALICEO2_ITS3_SEGMENTATIONSUPERALPIDE_H_
83 void curvedToFlat(
const float xCurved,
const float yCurved,
float& xFlat,
float& yFlat)
const noexcept
86 float dist = std::hypot(xCurved, yCurved);
88 float phi = std::atan2(yCurved, xCurved);
90 yFlat = dist -
mRadii[mLayer];
103 void flatToCurved(
float xFlat,
float yFlat,
float& xCurved,
float& yCurved)
const noexcept
106 float dist = yFlat +
mRadii[mLayer];
123 bool localToDetector(
float const xRow,
float const zCol,
int& iRow,
int& iCol)
const noexcept
126 if (!isValid(iRow, iCol)) {
136 namespace cp = constants::pixelarray;
137 iRow = std::floor((cp::width / 2. - xRow) /
mPitchRow);
138 iCol = std::floor((zCol + cp::length / 2.) /
mPitchCol);
151 bool detectorToLocal(
int const iRow,
int const iCol,
float& xRow,
float& zCol)
const noexcept
153 if (!isValid(iRow, iCol)) {
157 return isValid(xRow, zCol);
164 namespace cp = constants::pixelarray;
165 xRow = -(iRow + 0.5) *
mPitchRow + cp::width / 2.;
166 zCol = (iCol + 0.5) *
mPitchCol - cp::length / 2.;
171 float xRow{0.}, zCol{0.};
175 loc.SetCoordinates(xRow, 0., zCol);
181 float xRow{0.}, zCol{0.};
183 loc.SetCoordinates(xRow, 0., zCol);
187 template <
typename T>
188 [[nodiscard]]
bool isValid(T
const row, T
const col)
const noexcept
190 if constexpr (std::is_floating_point_v<T>) {
191 namespace cp = constants::pixelarray;
192 return !
static_cast<bool>(
row <= -cp::width / 2. || cp::width / 2. <=
row ||
col <= -cp::length / 2. || cp::length / 2. <=
col);
194 return !
static_cast<bool>(row < 0 || row >=
static_cast<int>(
mNRows) || col < 0 || col >=
static_cast<int>(
mNCols));
200 ClassDef(SegmentationSuperAlpide, 1);
204extern const std::array<SegmentationSuperAlpide, constants::nLayers>
SuperSegmentations;
Segmentation and response for pixels in ITS3 upgrade.
static constexpr int nPixels
void curvedToFlat(const float xCurved, const float yCurved, float &xFlat, float &yFlat) const noexcept
SegmentationSuperAlpide & operator=(SegmentationSuperAlpide &&)=delete
bool detectorToLocal(int const row, int const col, math_utils::Point3D< float > &loc) const noexcept
constexpr SegmentationSuperAlpide(int layer)
SegmentationSuperAlpide(const SegmentationSuperAlpide &)=default
SegmentationSuperAlpide & operator=(const SegmentationSuperAlpide &)=delete
void detectorToLocalUnchecked(int const iRow, int const iCol, float &xRow, float &zCol) const noexcept
static constexpr int mNRows
static constexpr std::array< float, constants::nLayers > mRadii
SegmentationSuperAlpide(SegmentationSuperAlpide &&)=delete
virtual ~SegmentationSuperAlpide()=default
bool localToDetector(float const xRow, float const zCol, int &iRow, int &iCol) const noexcept
bool detectorToLocal(int const iRow, int const iCol, float &xRow, float &zCol) const noexcept
static constexpr float mPitchRow
void flatToCurved(float xFlat, float yFlat, float &xCurved, float &yCurved) const noexcept
static constexpr int mNCols
void detectorToLocalUnchecked(int const row, int const col, math_utils::Point3D< float > &loc) const noexcept
static constexpr float mWidth
void localToDetectorUnchecked(float const xRow, float const zCol, int &iRow, int &iCol) const noexcept
static constexpr float mSensorLayerThickness
static constexpr float mPitchCol
static constexpr float mLength
static constexpr float mSensorLayerThicknessEff
GLenum GLuint GLint GLint layer
constexpr float effThickness
constexpr float thickness
constexpr std::array< float, nLayers > radii
const std::array< SegmentationSuperAlpide, constants::nLayers > SuperSegmentations
Segmentation array.