Belle II Software  release-08-01-10
Module.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 /* Own header. */
10 #include <klm/bklm/geometry/Module.h>
11 
12 /* KLM headers. */
13 #include <klm/dataobjects/bklm/BKLMElementNumbers.h>
14 
15 /* Basf2 headers. */
16 #include <framework/gearbox/Const.h>
17 #include <framework/logging/Logger.h>
18 
19 /* C++ headers. */
20 #include <iostream>
21 
22 using namespace Belle2::bklm;
23 
25  m_HasRPCs(false),
26  m_IsFlipped(false),
27  m_PhiStripWidth(0.0),
28  m_PhiStripMin(0),
29  m_PhiStripMax(0),
30  m_PhiPositionBase(0.0),
31  m_ZStripWidth(0.0),
32  m_ZStripMin(0),
33  m_ZStripMax(0),
34  m_ZPositionBase(0.0),
35  m_PhiSensorSide(0),
36  m_SignalSpeed(0.0),
37  m_GlobalOrigin(CLHEP::Hep3Vector()),
38  m_LocalReconstructionShift(CLHEP::Hep3Vector()),
39  m_Rotation(CLHEP::HepRotation()),
40  m_Alignment(HepGeom::Transform3D()),
41  m_AlignmentRotation(CLHEP::HepRotation()),
42  m_AlignmentTranslation(CLHEP::Hep3Vector()),
43  m_AlignmentInverse(HepGeom::Transform3D()),
44  m_AlignmentRotationInverse(CLHEP::HepRotation()),
45  m_DisplacedGeo(HepGeom::Transform3D()),
46  m_DisplacedGeoRotation(CLHEP::HepRotation()),
47  m_DisplacedGeoTranslation(CLHEP::Hep3Vector()),
48  m_DisplacedGeoInverse(HepGeom::Transform3D()),
49  m_DisplacedGeoRotationInverse(CLHEP::HepRotation())
50 {
51  m_RotationInverse = m_Rotation.inverse();
52  m_PhiScintPositions.clear();
53  m_PhiScintLengths.clear();
54  m_PhiScintOffsets.clear();
55  m_ZScintPositions.clear();
56  m_ZScintLengths.clear();
57  m_ZScintOffsets.clear();
58 }
59 
60 // constructor for RPC module
61 Module::Module(double phiStripWidth,
62  int phiStripMin,
63  int phiStripMax,
64  double zStripWidth,
65  int zStripNumber,
66  const CLHEP::Hep3Vector& globalOrigin,
67  const CLHEP::Hep3Vector& localReconstructionShift,
68  const CLHEP::HepRotation& rotation) :
69  m_HasRPCs(true),
70  m_IsFlipped(false),
71  m_PhiStripWidth(phiStripWidth),
72  m_PhiStripMin(phiStripMin),
73  m_PhiStripMax(phiStripMax),
74  m_PhiPositionBase(0.5 * (phiStripMin + phiStripMax - 1) + 1.0), // start at #1
75  m_ZStripWidth(zStripWidth),
76  m_ZStripMin(1),
77  m_ZStripMax(zStripNumber),
78  m_ZPositionBase(1.0), // start at #1
79  m_PhiSensorSide(1),
80  m_SignalSpeed(0.5 * Const::speedOfLight),
81  m_GlobalOrigin(globalOrigin),
82  m_LocalReconstructionShift(localReconstructionShift),
83  m_Rotation(rotation),
84  m_Alignment(HepGeom::Transform3D()),
85  m_AlignmentRotation(CLHEP::HepRotation()),
86  m_AlignmentTranslation(CLHEP::Hep3Vector()),
87  m_AlignmentInverse(HepGeom::Transform3D()),
88  m_AlignmentRotationInverse(CLHEP::HepRotation()),
89  m_DisplacedGeo(HepGeom::Transform3D()),
90  m_DisplacedGeoRotation(CLHEP::HepRotation()),
91  m_DisplacedGeoTranslation(CLHEP::Hep3Vector()),
92  m_DisplacedGeoInverse(HepGeom::Transform3D()),
93  m_DisplacedGeoRotationInverse(CLHEP::HepRotation())
94 {
95  m_RotationInverse = m_Rotation.inverse();
96  m_PhiScintLengths.clear();
97  m_PhiScintPositions.clear();
98  m_PhiScintOffsets.clear();
99  m_ZScintLengths.clear();
100  m_ZScintPositions.clear();
101  m_ZScintOffsets.clear();
102 }
103 
104 // constructor for scint module
105 Module::Module(double stripWidth,
106  int phiStripNumber,
107  int phiSensorSide,
108  int zStripNumber,
109  const CLHEP::Hep3Vector& globalOrigin,
110  const CLHEP::Hep3Vector& localReconstructionShift,
111  const CLHEP::HepRotation& rotation,
112  bool isFlipped) :
113  m_HasRPCs(false),
114  m_IsFlipped(isFlipped),
115  m_PhiStripWidth(stripWidth),
116  m_PhiStripMin(1),
117  m_PhiStripMax(phiStripNumber),
118  m_PhiPositionBase(0.5 * phiStripNumber + 1.0), // start at #1
119  m_ZStripWidth(stripWidth),
120  m_ZStripMin(1),
121  m_ZStripMax(zStripNumber),
122  m_ZPositionBase(1.0), // start at #1
123  m_PhiSensorSide(phiSensorSide),
124  m_SignalSpeed(0.5671 * Const::speedOfLight), // m_firstPhotonlightSpeed, from EKLM
125  m_GlobalOrigin(globalOrigin),
126  m_LocalReconstructionShift(localReconstructionShift),
127  m_Rotation(rotation),
128  m_Alignment(HepGeom::Transform3D()),
129  m_AlignmentRotation(CLHEP::HepRotation()),
130  m_AlignmentTranslation(CLHEP::Hep3Vector()),
131  m_AlignmentInverse(HepGeom::Transform3D()),
132  m_AlignmentRotationInverse(CLHEP::HepRotation()),
133  m_DisplacedGeo(HepGeom::Transform3D()),
134  m_DisplacedGeoRotation(CLHEP::HepRotation()),
135  m_DisplacedGeoTranslation(CLHEP::Hep3Vector()),
136  m_DisplacedGeoInverse(HepGeom::Transform3D()),
137  m_DisplacedGeoRotationInverse(CLHEP::HepRotation())
138 {
139  if (isFlipped)
140  m_Rotation.rotateZ(M_PI);
141  m_RotationInverse = m_Rotation.inverse();
142  m_PhiScintLengths.clear();
143  m_PhiScintPositions.clear();
144  m_PhiScintOffsets.clear();
145  m_ZScintLengths.clear();
146  m_ZScintPositions.clear();
147  m_ZScintOffsets.clear();
148 }
149 
150 // copy constructor
152  m_HasRPCs(m.m_HasRPCs),
153  m_IsFlipped(m.m_IsFlipped),
154  m_PhiStripWidth(m.m_PhiStripWidth),
155  m_PhiStripMin(m.m_PhiStripMin),
156  m_PhiStripMax(m.m_PhiStripMax),
157  m_PhiPositionBase(m.m_PhiPositionBase),
158  m_ZStripWidth(m.m_ZStripWidth),
159  m_ZStripMin(m.m_ZStripMin),
160  m_ZStripMax(m.m_ZStripMax),
161  m_ZPositionBase(m.m_ZPositionBase),
162  m_PhiSensorSide(m.m_PhiSensorSide),
163  m_SignalSpeed(m.m_SignalSpeed),
164  m_GlobalOrigin(m.m_GlobalOrigin),
165  m_LocalReconstructionShift(m.m_LocalReconstructionShift),
166  m_Rotation(m.m_Rotation),
167  m_RotationInverse(m.m_RotationInverse),
168  m_Alignment(m.m_Alignment),
169  m_AlignmentRotation(m.m_AlignmentRotation),
170  m_AlignmentTranslation(m.m_AlignmentTranslation),
171  m_AlignmentInverse(m.m_AlignmentInverse),
172  m_AlignmentRotationInverse(m.m_AlignmentRotationInverse),
173  m_DisplacedGeo(m.m_DisplacedGeo),
174  m_DisplacedGeoRotation(m.m_DisplacedGeoRotation),
175  m_DisplacedGeoTranslation(m.m_DisplacedGeoTranslation),
176  m_DisplacedGeoInverse(m.m_DisplacedGeoInverse),
177  m_DisplacedGeoRotationInverse(m.m_DisplacedGeoRotationInverse),
178  m_PhiScintLengths(m.m_PhiScintLengths),
179  m_PhiScintPositions(m.m_PhiScintPositions),
180  m_PhiScintOffsets(m.m_PhiScintOffsets),
181  m_ZScintLengths(m.m_ZScintLengths),
182  m_ZScintPositions(m.m_ZScintPositions),
183  m_ZScintOffsets(m.m_ZScintOffsets)
184 {
185 }
186 
187 // Assignment operator
189 {
190  if (this != &m) {
191  m_HasRPCs = m.m_HasRPCs;
192  m_IsFlipped = m.m_IsFlipped;
193  m_PhiStripWidth = m.m_PhiStripWidth;
194  m_PhiStripMin = m.m_PhiStripMin;
195  m_PhiStripMax = m.m_PhiStripMax;
196  m_PhiPositionBase = m.m_PhiPositionBase;
197  m_ZStripWidth = m.m_ZStripWidth;
198  m_ZStripMin = m.m_ZStripMin;
199  m_ZStripMax = m.m_ZStripMax;
200  m_ZPositionBase = m.m_ZPositionBase;
201  m_PhiSensorSide = m.m_PhiSensorSide;
202  m_SignalSpeed = m.m_SignalSpeed;
203  m_GlobalOrigin = m.m_GlobalOrigin;
204  m_LocalReconstructionShift = m.m_LocalReconstructionShift;
205  m_Rotation = m.m_Rotation;
206  m_RotationInverse = m.m_RotationInverse;
207  m_Alignment = m.m_Alignment;
208  m_AlignmentRotation = m.m_AlignmentRotation;
209  m_AlignmentTranslation = m.m_AlignmentTranslation;
210  m_AlignmentInverse = m.m_AlignmentInverse;
211  m_AlignmentRotationInverse = m.m_AlignmentRotationInverse;
212  m_DisplacedGeo = m.m_DisplacedGeo;
213  m_DisplacedGeoRotation = m.m_DisplacedGeoRotation;
214  m_DisplacedGeoTranslation = m.m_DisplacedGeoTranslation;
215  m_DisplacedGeoInverse = m.m_DisplacedGeoInverse;
216  m_DisplacedGeoRotationInverse = m.m_DisplacedGeoRotationInverse;
217  m_PhiScintLengths = m.m_PhiScintLengths;
218  m_PhiScintPositions = m.m_PhiScintPositions;
219  m_PhiScintOffsets = m.m_PhiScintOffsets;
220  m_ZScintLengths = m.m_ZScintLengths;
221  m_ZScintPositions = m.m_ZScintPositions;
222  m_ZScintOffsets = m.m_ZScintOffsets;
223  }
224  return *this;
225 }
226 
228 {
229 }
230 
231 void Module::addPhiScint(int scint, double length, double offset, double position)
232 {
233  while (m_PhiScintLengths.size() <= (unsigned int)scint) {
234  m_PhiScintLengths.push_back(0.0);
235  m_PhiScintOffsets.push_back(0.0);
236  m_PhiScintPositions.push_back(0.0);
237  }
238  m_PhiScintLengths[scint] = length;
239  m_PhiScintOffsets[scint] = offset;
240  m_PhiScintPositions[scint] = position;
241 }
242 
243 void Module::addZScint(int scint, double length, double offset, double position)
244 {
245  while (m_ZScintLengths.size() <= (unsigned int)scint) {
246  m_ZScintLengths.push_back(0.0);
247  m_ZScintOffsets.push_back(0.0);
248  m_ZScintPositions.push_back(0.0);
249  }
250  m_ZScintLengths[scint] = length;
251  m_ZScintOffsets[scint] = offset;
252  m_ZScintPositions[scint] = position;
253 }
254 
255 double Module::getStripLength(int plane, int strip) const
256 {
257  if (plane == BKLMElementNumbers::c_ZPlane)
258  return m_ZScintLengths[strip];
259  else if (plane == BKLMElementNumbers::c_PhiPlane)
260  return m_PhiScintLengths[strip];
261  else
262  B2FATAL("Incorrect plane number.");
263 }
264 
265 const CLHEP::Hep3Vector Module::getLocalPosition(double phiStripAve, double zStripAve) const
266 {
267  // "+0.5" assures that the local position is in the middle of the strip
268  return CLHEP::Hep3Vector(0.0,
269  (phiStripAve - m_PhiPositionBase + 0.5) * m_PhiStripWidth,
270  (zStripAve - m_ZPositionBase + 0.5) * m_ZStripWidth);
271 }
272 
273 double Module::getPropagationDistance(const CLHEP::Hep3Vector& local,
274  int strip, bool phiReadout) const
275 {
276  double distance;
277  if (phiReadout) {
278  distance = m_ZStripMax * m_ZStripWidth - local.z();
279  } else {
284  distance = fabs(m_ZScintOffsets[strip] -
285  0.5 * m_PhiSensorSide * m_ZScintLengths[strip] - local.y());
286  }
287  return distance;
288 }
289 
290 const CLHEP::Hep3Vector Module::getPropagationDistance(const CLHEP::Hep3Vector& local) const
291 {
292  double dy = m_PhiPositionBase * m_PhiStripWidth - m_PhiSensorSide * local.y();
293  double dz = m_ZStripMax * m_ZStripWidth - local.z();
294  return CLHEP::Hep3Vector(0.0, dz, dy);
295 }
296 
297 const CLHEP::Hep3Vector Module::getPropagationDistance(
298  const CLHEP::Hep3Vector& local, int stripZ, int stripPhi) const
299 {
300  double distanceZ = getPropagationDistance(local, stripZ, false);
301  double distancePhi = getPropagationDistance(local, stripPhi, true);
302  return CLHEP::Hep3Vector(0.0, distancePhi, distanceZ);
303 }
304 
305 const CLHEP::Hep3Vector Module::getPropagationTimes(const CLHEP::Hep3Vector& local) const
306 {
307  const CLHEP::Hep3Vector proDist = getPropagationDistance(local);
308  return CLHEP::Hep3Vector(0.0, proDist[1] / m_SignalSpeed, proDist[2] / m_SignalSpeed);
309 }
310 
311 double Module::getPropagationTime(const CLHEP::Hep3Vector& local, int strip,
312  bool phiReadout) const
313 {
314  double distance = getPropagationDistance(local, strip, phiReadout);
315  return distance / m_SignalSpeed;
316 }
317 
318 const CLHEP::Hep3Vector Module::getPropagationTimes(
319  const CLHEP::Hep3Vector& local, int stripZ, int stripPhi) const
320 {
321  double distanceZ = getPropagationDistance(local, stripZ, false);
322  double distancePhi = getPropagationDistance(local, stripPhi, true);
323  return CLHEP::Hep3Vector(0.0, distancePhi / m_SignalSpeed, distanceZ / m_SignalSpeed);
324 }
325 
326 const CLHEP::Hep3Vector Module::localToGlobal(const CLHEP::Hep3Vector& v, bool m_reco) const
327 {
328  CLHEP::Hep3Vector vlocal(v.x(), v.y(), v.z());
329  if (m_reco) {
330  vlocal = m_AlignmentRotation * vlocal + m_AlignmentTranslation; // to nominal + displaced local
331  vlocal = m_DisplacedGeoRotation * vlocal + m_DisplacedGeoTranslation; //to nominal local
332  return m_Rotation * vlocal + m_GlobalOrigin; //to global
333  } else {
334  vlocal = m_DisplacedGeoRotation * vlocal + m_DisplacedGeoTranslation; // to nominal local
335  return m_Rotation * vlocal + m_GlobalOrigin; //to global
336  }
337 }
338 
339 const CLHEP::Hep3Vector Module::globalToLocal(const CLHEP::Hep3Vector& v, bool reco) const
340 {
341  CLHEP::Hep3Vector vlocal = m_RotationInverse * (v - m_GlobalOrigin); //now in nominal local
342  vlocal = m_DisplacedGeoRotationInverse * (vlocal - m_DisplacedGeoTranslation); //now in displaced local
343  if (reco) {
344  vlocal = m_AlignmentRotationInverse * (vlocal - m_AlignmentTranslation); //now in real local
345  }
346  return vlocal;
347 }
348 
349 int Module::getPhiStripNumber(const CLHEP::Hep3Vector& p) const
350 {
351  int strip = std::floor(getPhiStrip(p));
352  if (strip < m_PhiStripMin || strip > m_PhiStripMax)
353  return -1;
354  return strip;
355 }
356 
357 int Module::getZStripNumber(const CLHEP::Hep3Vector& p) const
358 {
359  int strip = std::floor(getZStrip(p));
360  if (strip < m_ZStripMin || strip > m_ZStripMax)
361  return -1;
362  return strip;
363 }
364 
365 void Module::setAlignment(const HepGeom::Transform3D& moduleAlignment)
366 {
367  m_Alignment = moduleAlignment;
370  m_AlignmentInverse = moduleAlignment.inverse();
372 }
373 
374 void Module::setDisplacedGeo(const HepGeom::Transform3D& moduleDisplacedGeo)
375 {
376  m_DisplacedGeo = moduleDisplacedGeo;
379  m_DisplacedGeoInverse = moduleDisplacedGeo.inverse();
381 }
382 
383 const CLHEP::Hep3Vector Module::getTranslationFromTransform3D(const HepGeom::Transform3D& trans) const
384 {
385  HepGeom::Scale3D scale;
386  HepGeom::Rotate3D rotation;
387  HepGeom::Translate3D translation;
388  trans.getDecomposition(scale, rotation, translation);
389  CLHEP::Hep3Vector t(translation.dx(), translation.dy(), translation.dz());
390  return t;
391 }
392 
393 const CLHEP::HepRotation Module::getRotationFromTransform3D(const HepGeom::Transform3D& trans) const
394 {
395  HepGeom::Scale3D scale;
396  HepGeom::Rotate3D rotation;
397  HepGeom::Translate3D translation;
398  trans.getDecomposition(scale, rotation, translation);
399  CLHEP::HepRep3x3 rRep(rotation.xx(), rotation.xy(), rotation.xz(),
400  rotation.yx(), rotation.yy(), rotation.yz(),
401  rotation.zx(), rotation.zy(), rotation.zz()
402  );
403  CLHEP::HepRotation r;
404  r.set(rRep);
405  return r;
406 }
This class provides a set of constants for the framework.
Definition: Const.h:34
Define the geometry of a BKLM module Each sector [octant] contains Modules.
Definition: Module.h:76
const CLHEP::Hep3Vector globalToLocal(const CLHEP::Hep3Vector &v, bool reco=false) const
Transform space-point within this module from global to local coordinates.
Definition: Module.cc:339
std::vector< double > m_ZScintPositions
to store the transverse position (within scintillator envelope) of each z-measuring scintillator
Definition: Module.h:407
const CLHEP::HepRotation getRotationFromTransform3D(const HepGeom::Transform3D &trans) const
Get the rotation from Transform3D.
Definition: Module.cc:393
CLHEP::HepRotation m_DisplacedGeoRotationInverse
inverse of the rotation of displaced geometry transformation
Definition: Module.h:392
CLHEP::HepRotation m_RotationInverse
to store the inverse of the rotation matrix (in global coordinates) of this module's sector
Definition: Module.h:362
CLHEP::Hep3Vector m_AlignmentTranslation
translation of the alignment transformation
Definition: Module.h:371
int m_PhiStripMin
to store the minimum phi strip number in this module
Definition: Module.h:326
CLHEP::Hep3Vector m_DisplacedGeoTranslation
translation of the displaced geometry transformation
Definition: Module.h:386
double m_ZPositionBase
to store the base position (in strip
Definition: Module.h:344
double m_PhiStripWidth
to store the width (in cm) of each phi strip this module
Definition: Module.h:323
std::vector< double > m_ZScintLengths
to store the length of each z-measuring scintillator
Definition: Module.h:404
HepGeom::Transform3D m_DisplacedGeo
displaced geometry w.r.t the nominal geometry, as transformation (rotation + shift)
Definition: Module.h:380
bool m_IsFlipped
flag to indicate if this module is flipped by 180 degrees about z axis within its air gap
Definition: Module.h:320
int getZStripNumber(const CLHEP::Hep3Vector &p) const
Get z strip corresponding to local z coordinate.
Definition: Module.cc:357
CLHEP::HepRotation m_AlignmentRotationInverse
inverse of the rotation of the alignment transformation
Definition: Module.h:377
Module(void)
Empty constructor does nothing.
Definition: Module.cc:24
HepGeom::Transform3D m_Alignment
alignment transformation (rotation + shift)
Definition: Module.h:365
~Module()
Destructor.
Definition: Module.cc:227
const CLHEP::Hep3Vector getPropagationTimes(const CLHEP::Hep3Vector &) const
Convert local coordinates to signal-propagation time (ns) Version for RPCs.
Definition: Module.cc:305
const CLHEP::Hep3Vector getTranslationFromTransform3D(const HepGeom::Transform3D &trans) const
Get the translation from Transform3D.
Definition: Module.cc:383
HepGeom::Transform3D m_AlignmentInverse
inverse of alignment transformation
Definition: Module.h:374
double getZStrip(const CLHEP::Hep3Vector &p) const
Return z strip (including fractional part) corresponding to local z coordinate.
Definition: Module.h:243
HepGeom::Transform3D m_DisplacedGeoInverse
inverse of displaced geometry transformation
Definition: Module.h:389
const CLHEP::Hep3Vector getPropagationDistance(const CLHEP::Hep3Vector &) const
Convert local coordinates to signal-propagation distance (cm).
Definition: Module.cc:290
std::vector< double > m_ZScintOffsets
to store the longitudinal offset (within scintillator envelope) of each z-measuring scintillator
Definition: Module.h:410
double m_ZStripWidth
to store the width (in cm) of each z strip in this module
Definition: Module.h:335
int m_PhiSensorSide
to store the sensor side for phi scintillators
Definition: Module.h:347
std::vector< double > m_PhiScintPositions
to store the transverse position (within scintillator envelope) of each phi-measuring scintillator
Definition: Module.h:398
int m_PhiStripMax
to store the maximum phi strip number in this module
Definition: Module.h:329
std::vector< double > m_PhiScintLengths
to store the length of each phi-measuring scintillator
Definition: Module.h:395
double getPropagationTime(const CLHEP::Hep3Vector &local, int strip, bool phiReadout) const
Convert local coordinates to signal-propagation time (ns) Version for scintillators.
Definition: Module.cc:311
const CLHEP::Hep3Vector localToGlobal(const CLHEP::Hep3Vector &v, bool reco=false) const
Transform space-point within this module from local to global coordinates.
Definition: Module.cc:326
CLHEP::HepRotation m_Rotation
to store the rotation matrix (in global coordinates) of this module's sector
Definition: Module.h:359
int m_ZStripMin
to store the minimum z strip number in this module
Definition: Module.h:338
void addZScint(int scint, double length, double offset, double position)
Add one z-measuring scintillator strip to the module.
Definition: Module.cc:243
double m_PhiPositionBase
to store the base position (in strip
Definition: Module.h:332
CLHEP::HepRotation m_DisplacedGeoRotation
rotation of the displaced geometry transformation
Definition: Module.h:383
double m_SignalSpeed
to store the signal-propagation speed (cm/ns) along the strip
Definition: Module.h:350
double getPhiStrip(const CLHEP::Hep3Vector &p) const
Return phi strip (including fractional part) corresponding to local phi coordinate.
Definition: Module.h:237
CLHEP::Hep3Vector m_LocalReconstructionShift
to store the local-coordinate real-vs-ideal translation of this module's sensitive volume
Definition: Module.h:356
int m_ZStripMax
to store the maximum z strip number in this module
Definition: Module.h:341
const CLHEP::Hep3Vector getLocalPosition(double phiStripAve, double zStripAve) const
Convert 2D strip position (0..nStrips along each axis) to local coordinates.
Definition: Module.cc:265
double getStripLength(int plane, int strip) const
Get scintillator length.
Definition: Module.cc:255
CLHEP::Hep3Vector m_GlobalOrigin
to store the position (in global coordinates) of this module's sensitive-volume origin
Definition: Module.h:353
void setDisplacedGeo(const HepGeom::Transform3D &moduleDisplacedGeo)
Set the displaced geometry Transformation.
Definition: Module.cc:374
Module & operator=(const Module &m)
Assignment operator: utilizes copy constructor.
Definition: Module.cc:188
void addPhiScint(int scint, double length, double offset, double position)
Add one phi-measuring scintillator strip to the module.
Definition: Module.cc:231
CLHEP::HepRotation m_AlignmentRotation
rotation of the alignment transformation
Definition: Module.h:368
bool m_HasRPCs
flag to indicate whether this module contains RPCs (true) or scintillators (false)
Definition: Module.h:317
int getPhiStripNumber(const CLHEP::Hep3Vector &p) const
Get phi strip corresponding to local phi coordinate.
Definition: Module.cc:349
std::vector< double > m_PhiScintOffsets
to store the longitudinal offset (within scintillator envelope) of each phi-measuring scintillator
Definition: Module.h:401
bool isFlipped() const
Determine if this module is flipped by 180 degrees about z axis within its air gap.
Definition: Module.h:113
void setAlignment(const HepGeom::Transform3D &moduleAlignment)
Set the alignment Transformation.
Definition: Module.cc:365