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