@@ -35,18 +35,18 @@ class SegmentationChip
3535 // The "detector coordinate system" refers to the hit position in row,col inside the sensor
3636 // This class provides the transformations from the local and detector coordinate systems
3737 // The conversion between global and local coordinate systems is operated by the transformation matrices
38- // For the curved VD layers there exist three coordinate systems and one is transient .
38+ // For the curved VD layers there exist four coordinate systems.
3939 // 1. The global (curved) coordinate system. The chip's center of coordinate system is
4040 // defined at the the mid-point of the detector.
41- // 2. The local (flat ) coordinate system. This is the tube segment projected onto a flat
42- // surface. In the projection we implicitly assume that the inner and outer
43- // stretch does not depend on the radius .
44- // 3. The detector coordinate system. Defined by the row and column segmentation
45- // defined at the upper edge in the flat coord .
41+ // 2. The local (curved ) coordinate system, centered in 0,0,0.
42+ // 3. The local (flat) coordinate system. This is the tube segment projected onto a flat
43+ // surface, centered in the middle of the chip, with the y axis pointing towards the interaction point .
44+ // In the projection we implicitly assume that the inner and outer stretch does not depend on the radius.
45+ // 4. The detector coordinate system. Defined by the row and column segmentation .
4646 // For the flat ML and OT layers, there exist two coordinate systems:
4747 // 1. The global (flat) coordinate system. The chip's center of coordinate system is
4848 // defined at the the mid-point of the detector.
49- // 2. The detector coordinate system. Defined by the row and column segmentation
49+ // 2. The detector coordinate system. Defined by the row and column segmentation.
5050 // TODO: add segmentation for VD disks
5151
5252 public:
@@ -121,15 +121,20 @@ class SegmentationChip
121121 pitchCol = PitchColMLOT;
122122 maxWidth = constants::ML::width;
123123 maxLength = constants::ML::length;
124- } else if (subDetID == 1 && layer >= 4 ) { // OT
124+ } else if (subDetID == 1 && layer == 4 ) { // ML/OT (mixed layer, length = ML but staggered as OT)
125+ pitchRow = PitchRowMLOT;
126+ pitchCol = PitchColMLOT;
127+ maxWidth = constants::OT::width;
128+ maxLength = constants::ML::length;
129+ } else if (subDetID == 1 && layer > 4 ) { // OT
125130 pitchRow = PitchRowMLOT;
126131 pitchCol = PitchColMLOT;
127132 maxWidth = constants::OT::width;
128133 maxLength = constants::OT::length;
129134 }
130135 // convert to row/col
131- iRow = static_cast <int >(std::floor ((maxWidth / 2 - xRow) / pitchRow));
132- iCol = static_cast <int >(std::floor ((zCol + maxLength / 2 ) / pitchCol));
136+ iRow = static_cast <int >(((maxWidth / 2 - xRow) / pitchRow));
137+ iCol = static_cast <int >(((zCol + maxLength / 2 ) / pitchCol));
133138 };
134139
135140 // Check local coordinates (cm) validity.
@@ -143,7 +148,10 @@ class SegmentationChip
143148 } else if (subDetID == 1 && layer <= 3 ) { // ML
144149 maxWidth = constants::ML::width;
145150 maxLength = constants::ML::length;
146- } else if (subDetID == 1 && layer >= 4 ) { // OT
151+ } else if (subDetID == 1 && layer == 4 ) { // ML/OT (mixed layer, length = ML but staggered as OT)
152+ maxWidth = constants::OT::width;
153+ maxLength = constants::ML::length;
154+ } else if (subDetID == 1 && layer > 4 ) { // OT
147155 maxWidth = constants::OT::width;
148156 maxLength = constants::OT::length;
149157 }
@@ -162,7 +170,10 @@ class SegmentationChip
162170 } else if (subDetID == 1 && layer <= 3 ) { // ML
163171 nRows = constants::ML::nRows;
164172 nCols = constants::ML::nCols;
165- } else if (subDetID == 1 && layer >= 4 ) { // OT
173+ } else if (subDetID == 1 && layer == 4 ) { // ML/OT (mixed layer, length = ML but staggered as OT)
174+ nRows = constants::OT::nRows;
175+ nCols = constants::ML::nCols;
176+ } else if (subDetID == 1 && layer > 4 ) { // OT
166177 nRows = constants::OT::nRows;
167178 nCols = constants::OT::nCols;
168179 }
@@ -210,7 +221,10 @@ class SegmentationChip
210221 } else if (subDetID == 1 && layer <= 3 ) { // ML
211222 xRow = 0.5 * (constants::ML::width - PitchRowMLOT) - (row * PitchRowMLOT);
212223 zCol = col * PitchRowMLOT + 0.5 * (PitchRowMLOT - constants::ML::length);
213- } else if (subDetID == 1 && layer >= 4 ) { // OT
224+ } else if (subDetID == 1 && layer == 4 ) { // ML/OT (mixed layer, length = ML but staggered as OT)
225+ xRow = 0.5 * (constants::OT::width - PitchRowMLOT) - (row * PitchRowMLOT);
226+ zCol = col * PitchRowMLOT + 0.5 * (PitchRowMLOT - constants::ML::length);
227+ } else if (subDetID == 1 && layer > 4 ) { // OT
214228 xRow = 0.5 * (constants::OT::width - PitchRowMLOT) - (row * PitchRowMLOT);
215229 zCol = col * PitchColMLOT + 0.5 * (PitchColMLOT - constants::OT::length);
216230 }
@@ -263,7 +277,7 @@ class SegmentationChip
263277 }
264278
265279 // / Print segmentation info
266- static const void Print () noexcept
280+ static void Print () noexcept
267281 {
268282 LOG (info) << " Number of rows:\n VD L0: " << constants::VD::petal::layer::nRows[0 ]
269283 << " \n VD L1: " << constants::VD::petal::layer::nRows[1 ]
@@ -274,6 +288,14 @@ class SegmentationChip
274288 LOG (info) << " Number of cols:\n VD: " << constants::VD::petal::layer::nCols
275289 << " \n ML stave: " << constants::ML::nCols
276290 << " \n OT stave: " << constants::OT::nCols;
291+
292+ LOG (info) << " Pitch rows [cm]:\n VD: " << PitchRowVD
293+ << " \n ML stave: " << PitchRowMLOT
294+ << " \n OT stave: " << PitchRowMLOT;
295+
296+ LOG (info) << " Pitch cols [cm]:\n VD: " << PitchColVD
297+ << " \n ML stave: " << PitchColMLOT
298+ << " \n OT stave: " << PitchColMLOT;
277299 }
278300};
279301
0 commit comments