12#include <CLHEP/Geometry/Transform3D.h>
13#include <CLHEP/Vector/Rotation.h>
14#include <CLHEP/Vector/ThreeVector.h>
84 Module(
double phiStripWidth,
89 const CLHEP::Hep3Vector& globalOrigin,
90 const CLHEP::Hep3Vector& localReconstructionShift,
91 const CLHEP::HepRotation& rotation);
98 const CLHEP::Hep3Vector& globalOrigin,
99 const CLHEP::Hep3Vector& localReconstructionShift,
100 const CLHEP::HepRotation& rotation,
161 void addPhiScint(
int scint,
double length,
double offset,
double position);
164 void addZScint(
int scint,
double length,
double offset,
double position);
206 const CLHEP::Hep3Vector
getLocalPosition(
double phiStripAve,
double zStripAve)
const;
215 int strip,
bool phiReadout)
const;
220 const CLHEP::Hep3Vector&,
int stripZ,
int stripPhi)
const;
229 int strip,
bool phiReadout)
const;
234 const CLHEP::Hep3Vector&,
int stripZ,
int stripPhi)
const;
259 const CLHEP::Hep3Vector
localToGlobal(
const CLHEP::Hep3Vector& v,
bool reco =
false)
const;
276 const CLHEP::Hep3Vector
globalToLocal(
const CLHEP::Hep3Vector& v,
bool reco =
false)
const;
291 void setAlignment(
const HepGeom::Transform3D& moduleAlignment);
Define the geometry of a BKLM module Each sector [octant] contains Modules.
const CLHEP::Hep3Vector globalToLocal(const CLHEP::Hep3Vector &v, bool reco=false) const
Transform space-point within this module from global to local coordinates.
std::vector< double > m_ZScintPositions
to store the transverse position (within scintillator envelope) of each z-measuring scintillator
const CLHEP::HepRotation getRotationFromTransform3D(const HepGeom::Transform3D &trans) const
Get the rotation from Transform3D.
CLHEP::HepRotation m_DisplacedGeoRotationInverse
inverse of the rotation of displaced geometry transformation
CLHEP::HepRotation m_RotationInverse
to store the inverse of the rotation matrix (in global coordinates) of this module's sector
CLHEP::Hep3Vector m_AlignmentTranslation
translation of the alignment transformation
int m_PhiStripMin
to store the minimum phi strip number in this module
CLHEP::Hep3Vector m_DisplacedGeoTranslation
translation of the displaced geometry transformation
double m_ZPositionBase
to store the base position (in strip
double m_PhiStripWidth
to store the width (in cm) of each phi strip this module
int getZStripMax() const
Get module's z-strip maximum index.
double getPhiStripWidth() const
Get phi-strip width.
std::vector< double > m_ZScintLengths
to store the length of each z-measuring scintillator
double getZScintHalfLength(int scint) const
Get the half-length (within the scintillator envelope) of a given z-measuring scintillator.
const CLHEP::Hep3Vector getLocalReconstructionShift() const
Return the local-coordinate real-vs-ideal translation of this module's sensitive volume; nominally (0...
HepGeom::Transform3D m_DisplacedGeo
displaced geometry w.r.t the nominal geometry, as transformation (rotation + shift)
double getPhiScintOffset(int scint) const
Get the longitudinal offset (within the scintillator envelope) of a given phi-measuring scintillator.
bool m_IsFlipped
flag to indicate if this module is flipped by 180 degrees about z axis within its air gap
int getZStripNumber(const CLHEP::Hep3Vector &p) const
Get z strip corresponding to local z coordinate.
const CLHEP::Hep3Vector RotateToGlobal(const CLHEP::Hep3Vector &v) const
Rotate a vector from local to global system.
CLHEP::HepRotation m_AlignmentRotationInverse
inverse of the rotation of the alignment transformation
Module(void)
Empty constructor does nothing.
HepGeom::Transform3D m_Alignment
alignment transformation (rotation + shift)
const HepGeom::Transform3D getDisplacedGeo() const
Get the displaced geometry Transformation.
const CLHEP::Hep3Vector getPropagationTimes(const CLHEP::Hep3Vector &) const
Convert local coordinates to signal-propagation time (ns) Version for RPCs.
const CLHEP::Hep3Vector getTranslationFromTransform3D(const HepGeom::Transform3D &trans) const
Get the translation from Transform3D.
const CLHEP::Hep3Vector getGlobalOrigin() const
Return the position (in global coordinates) of this module's sensitive-volume origin.
HepGeom::Transform3D m_AlignmentInverse
inverse of alignment transformation
double getZStrip(const CLHEP::Hep3Vector &p) const
Return z strip (including fractional part) corresponding to local z coordinate.
HepGeom::Transform3D m_DisplacedGeoInverse
inverse of displaced geometry transformation
const CLHEP::Hep3Vector getPropagationDistance(const CLHEP::Hep3Vector &) const
Convert local coordinates to signal-propagation distance (cm).
std::vector< double > m_ZScintOffsets
to store the longitudinal offset (within scintillator envelope) of each z-measuring scintillator
double m_ZStripWidth
to store the width (in cm) of each z strip in this module
double getPhiScintPosition(int scint) const
Get the transverse position (within the scintillator envelope) of a given phi-measuring scintillator.
bool hasRPCs() const
Determine if this module contains RPCs (true) or scintillators (false)
double getZScintOffset(int scint) const
Get the longitudinal offset (within the scintillator envelope) of a given z-measuring scintillator.
int m_PhiSensorSide
to store the sensor side for phi scintillators
int getPhiStripMin() const
Get module's phi-strip minimum index.
std::vector< double > m_PhiScintPositions
to store the transverse position (within scintillator envelope) of each phi-measuring scintillator
int m_PhiStripMax
to store the maximum phi strip number in this module
std::vector< double > m_PhiScintLengths
to store the length of each phi-measuring scintillator
double getPropagationTime(const CLHEP::Hep3Vector &local, int strip, bool phiReadout) const
Convert local coordinates to signal-propagation time (ns) Version for scintillators.
const CLHEP::Hep3Vector localToGlobal(const CLHEP::Hep3Vector &v, bool reco=false) const
Transform space-point within this module from local to global coordinates.
CLHEP::HepRotation m_Rotation
to store the rotation matrix (in global coordinates) of this module's sector
int m_ZStripMin
to store the minimum z strip number in this module
void addZScint(int scint, double length, double offset, double position)
Add one z-measuring scintillator strip to the module.
double m_PhiPositionBase
to store the base position (in strip
CLHEP::HepRotation m_DisplacedGeoRotation
rotation of the displaced geometry transformation
const HepGeom::Transform3D getAlignment() const
Get the alignment Transformation.
double getZScintPosition(int scint) const
Get the transverse position (within the scintillator envelope) of a given z-measuring scintillator.
const CLHEP::Hep3Vector RotateToLocal(const CLHEP::Hep3Vector &v) const
Rotate a vector from global to local system.
double m_SignalSpeed
to store the signal-propagation speed (cm/ns) along the strip
double getPhiStrip(const CLHEP::Hep3Vector &p) const
Return phi strip (including fractional part) corresponding to local phi coordinate.
int getZStripMin() const
Get module's z-strip minimum index.
CLHEP::Hep3Vector m_LocalReconstructionShift
to store the local-coordinate real-vs-ideal translation of this module's sensitive volume
int m_ZStripMax
to store the maximum z strip number in this module
const CLHEP::Hep3Vector getLocalPosition(double phiStripAve, double zStripAve) const
Convert 2D strip position (0..nStrips along each axis) to local coordinates.
double getStripLength(int plane, int strip) const
Get scintillator length.
CLHEP::Hep3Vector m_GlobalOrigin
to store the position (in global coordinates) of this module's sensitive-volume origin
int getPhiStripMax() const
Get module's phi-strip maximum index.
void setDisplacedGeo(const HepGeom::Transform3D &moduleDisplacedGeo)
Set the displaced geometry Transformation.
Module & operator=(const Module &m)
Assignment operator: utilizes copy constructor.
void addPhiScint(int scint, double length, double offset, double position)
Add one phi-measuring scintillator strip to the module.
CLHEP::HepRotation m_AlignmentRotation
rotation of the alignment transformation
double getZStripWidth() const
Get z-strip width.
bool m_HasRPCs
flag to indicate whether this module contains RPCs (true) or scintillators (false)
int getPhiStripNumber(const CLHEP::Hep3Vector &p) const
Get phi strip corresponding to local phi coordinate.
double getPhiScintHalfLength(int scint) const
Get the half-length (within the scintillator envelope) of a given phi-measuring scintillator.
std::vector< double > m_PhiScintOffsets
to store the longitudinal offset (within scintillator envelope) of each phi-measuring scintillator
bool isFlipped() const
Determine if this module is flipped by 180 degrees about z axis within its air gap.
void setAlignment(const HepGeom::Transform3D &moduleAlignment)
Set the alignment Transformation.
Abstract base class for different kinds of events.