16#ifndef ALICEO2_IOTOF_SEGMENTATION_H
17#define ALICEO2_IOTOF_SEGMENTATION_H
34 static std::unique_ptr<o2::iotof::Segmentation> sInstance;
52 bool localToDetector(
float x,
float z,
int& iRow,
int& iCol,
const int subDetectorID)
const;
68 template <
typename T =
float,
typename L =
float>
71 if (subDetectorID != 0 && subDetectorID != 1) {
79 template <
typename T =
float,
typename L =
float>
82 if (subDetectorID != 0 && subDetectorID != 1) {
89 template <
typename T =
float,
typename L =
float>
92 if (subDetectorID != 0 && subDetectorID != 1) {
104 template <
typename T =
float,
typename L =
float>
107 if (subDetectorID != 0 && subDetectorID != 1) {
112 if (row < 0 || row >= specsConfig.NRows || col < 0 || col >= specsConfig.NCols) {
119 template <
typename T =
float,
typename L =
float>
122 if (subDetectorID != 0 && subDetectorID != 1) {
127 if (row < 0 || row >= specsConfig.NRows || col < 0 || col >= specsConfig.NCols) {
133 template <
typename T =
float,
typename L =
float>
136 if (subDetectorID != 0 && subDetectorID != 1) {
141 if (row < 0 || row >= specsConfig.NRows || col < 0 || col >= specsConfig.NCols) {
151 return 0.5 * ((specsConfig.ActiveMatrixSizeRows() - specsConfig.PassiveEdgeTop + specsConfig.PassiveEdgeReadOut) - specsConfig.PitchRow);
156 return 0.5 * (specsConfig.PitchCol - specsConfig.ActiveMatrixSizeCols());
166 if (subDetectorID != 0 && subDetectorID != 1) {
171 xRow = 0.5 * (specsConfig.ActiveMatrixSizeRows() - specsConfig.PassiveEdgeTop + specsConfig.PassiveEdgeReadOut) - xRow;
172 zCol += 0.5 * specsConfig.ActiveMatrixSizeCols();
173 iRow = int(xRow / specsConfig.PitchRow);
174 iCol = int(zCol / specsConfig.PitchCol);
176 if (std::abs(xRow - (iRow + 0.5) * specsConfig.PitchRow) > (0.5 * specsConfig.PitchRow - specsConfig.PixelPassiveEdgeX) || std::abs(zCol - (iCol + 0.5) * specsConfig.PitchCol) > (0.5 * specsConfig.PitchCol - specsConfig.PixelPassiveEdgeZ)) {
192 if (subDetectorID != 0 && subDetectorID != 1) {
197 xRow = 0.5 * (specsConfig.ActiveMatrixSizeRows() - specsConfig.PassiveEdgeTop + specsConfig.PassiveEdgeReadOut) - xRow;
198 zCol += 0.5 * specsConfig.ActiveMatrixSizeCols();
199 if (xRow < 0 || xRow >= specsConfig.ActiveMatrixSizeRows() || zCol < 0 || zCol >= specsConfig.ActiveMatrixSizeCols()) {
203 iRow = int(xRow / specsConfig.PitchRow);
204 iCol = int(zCol / specsConfig.PitchCol);
207 if (std::abs(xRow - (iRow + 0.5) * specsConfig.PitchRow) > (0.5 * specsConfig.PitchRow - specsConfig.PixelPassiveEdgeX) || std::abs(zCol - (iCol + 0.5) * specsConfig.PitchCol) > (0.5 * specsConfig.PitchCol - specsConfig.PixelPassiveEdgeZ)) {
Segmentation and response for pixels in inner and outer TOF of the ALICE 3 apparatus.
void localToDetectorUnchecked(float xRow, float zCol, int &iRow, int &iCol, const int subDetectorID) const
same but w/o check for row/column range
void detectorToLocalUnchecked(L row, L col, std::array< T, 3 > &loc, const int subDetectorID) const
void detectorToLocalUnchecked(L row, L col, T &xRow, T &zCol, const int subDetectorID) const
bool detectorToLocal(L row, L col, T &xRow, T &zCol, const int subDetectorID) const
float getFirstColCoordinate(const int subDetectorID) const
void detectorToLocalUnchecked(L row, L col, math_utils::Point3D< T > &loc, const int subDetectorID) const
bool detectorToLocal(L row, L col, math_utils::Point3D< T > &loc, const int subDetectorID) const
float getFirstRowCoordinate(const int subDetectorID) const
static Segmentation * Instance()
bool detectorToLocal(L row, L col, std::array< T, 3 > &loc, const int subDetectorID) const
bool localToDetector(float x, float z, int &iRow, int &iCol, const int subDetectorID) const
ClassDefNV(Segmentation, 1)
static bool localToDetector(float x, float z, int &iRow, int &iCol)
static void localToDetectorUnchecked(float xRow, float zCol, int &iRow, int &iCol)
same but w/o check for row/column range
GLdouble GLdouble GLdouble z
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...