44CoordinateTransformer::CoordinateTransformer()
47 mGeo->createPadPlaneArray();
52 std::array<float, 3> rct;
54 auto padPlane =
mGeo->getPadPlane((det) % 6, (det / 6) % 5);
57 int row = padPlane->getPadRow(
z);
58 if (
row == 0 ||
row == padPlane->getNrows() - 1) {
59 rct[0] = float(
row) + padPlane->getPadRowOffsetROC(
row,
z) / padPlane->getLengthOPad();
61 rct[0] = float(
row) + padPlane->getPadRowOffsetROC(
row,
z) / padPlane->getLengthIPad();
65 rct[1] = padPlane->getPad(
y,
z);
75 rct[2] =
mT0 - 1.0 + fabs(
x);
80 rct[1] += (
x + 0.35) *
mExB;
86 std::array<float, 3> rct;
88 auto padPlane =
mGeo->getPadPlane((det) % 6, (det / 6) % 5);
92 double iPadLen = padPlane->getLengthIPad();
93 double oPadLen = padPlane->getLengthOPad();
94 int nRows = padPlane->getNrows();
96 double lengthCorr = padPlane->getLengthOPad() / padPlane->getLengthIPad();
99 rct[0] = -
z / padPlane->getLengthIPad() + padPlane->getNrows() / 2;
103 rct[0] = 1.0 - (1.0 - rct[0]) * lengthCorr;
106 if (rct[0] >=
double(nRows - 1)) {
107 rct[0] = double(nRows - 1) + (rct[0] - double(nRows - 1)) * lengthCorr;
111 if (rct[0] < 0.0 || rct[0] >
double(nRows)) {
112 std::cout <<
"ERROR: hit with z=" <<
z <<
", padrow " << rct[0]
113 <<
" outside of chamber" << std::endl;
118 rct[1] =
y / padPlane->getWidthIPad() + 144. / 2.;
126 rct[2] =
mT0 - 1.0 + fabs(
x);
145 int sector = p.getDetector() / 30;
146 int stack = (p.getDetector() % 30) / 6;
147 int layer = p.getDetector() % 6;
149 os <<
"( " << std::setprecision(5) << p.getX()
150 <<
" / " << std::setprecision(5) << p.getY()
151 <<
" / " << std::setprecision(6) << p.getZ() <<
") <-> ["
152 << sector <<
"_" <<
stack <<
"_" <<
layer <<
" (" << p.getDetector() <<
")"
153 <<
" row " << p.getPadRow()
154 <<
" pad " << std::setprecision(5) << p.getPadCol() <<
"]";
short GetDetectorID() const
float getMCMChannel(int mcmcol) const
calculate the channel number within the MCM. 0..21 if valid, -1 if not within this MCM
bool isInMCM(int detector, int padrow, int mcmcol) const
float getPadCol() const
pad position (a.k.a. column) within pad row
bool isFromDriftRegion() const
GLenum GLuint GLint GLint layer
GLdouble GLdouble GLdouble z
constexpr int NADCMCM
the number of ADC channels per MCM
constexpr int NCOLMCM
the number of pads per MCM
std::ostream & operator<<(std::ostream &stream, const Digit &d)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...