Belle II Software  release-08-01-10
Module Class Reference

Define the geometry of a BKLM module Each sector [octant] contains Modules. More...

#include <Module.h>

Collaboration diagram for Module:

Public Member Functions

 Module (void)
 Empty constructor does nothing.
 
 Module (double phiStripWidth, int phiStripMin, int phiStripMax, double zStripWidth, int zStripNumber, const CLHEP::Hep3Vector &globalOrigin, const CLHEP::Hep3Vector &localReconstructionShift, const CLHEP::HepRotation &rotation)
 Constructor with explicit values (for RPC module)
 
 Module (double stripWidth, int phiStripNumber, int phiSensorSide, int zStripNumber, const CLHEP::Hep3Vector &globalOrigin, const CLHEP::Hep3Vector &localReconstructionShift, const CLHEP::HepRotation &rotation, bool isFlipped)
 Constructor with explicit values (for scint module)
 
 Module (const Module &m)
 Copy constructor.
 
Moduleoperator= (const Module &m)
 Assignment operator: utilizes copy constructor.
 
 ~Module ()
 Destructor.
 
bool isFlipped () const
 Determine if this module is flipped by 180 degrees about z axis within its air gap.
 
bool hasRPCs () const
 Determine if this module contains RPCs (true) or scintillators (false)
 
int getPhiStripMin () const
 Get module's phi-strip minimum index.
 
int getPhiStripMax () const
 Get module's phi-strip maximum index.
 
double getPhiStripWidth () const
 Get phi-strip width.
 
int getZStripMin () const
 Get module's z-strip minimum index.
 
int getZStripMax () const
 Get module's z-strip maximum index.
 
double getZStripWidth () const
 Get z-strip width.
 
void addPhiScint (int scint, double length, double offset, double position)
 Add one phi-measuring scintillator strip to the module.
 
void addZScint (int scint, double length, double offset, double position)
 Add one z-measuring scintillator strip to the module.
 
double getPhiScintHalfLength (int scint) const
 Get the half-length (within the scintillator envelope) of a given phi-measuring scintillator.
 
double getPhiScintOffset (int scint) const
 Get the longitudinal offset (within the scintillator envelope) of a given phi-measuring scintillator.
 
double getPhiScintPosition (int scint) const
 Get the transverse position (within the scintillator envelope) of a given phi-measuring scintillator.
 
double getZScintHalfLength (int scint) const
 Get the half-length (within the scintillator envelope) of a given z-measuring scintillator.
 
double getZScintOffset (int scint) const
 Get the longitudinal offset (within the scintillator envelope) of a given z-measuring scintillator.
 
double getZScintPosition (int scint) const
 Get the transverse position (within the scintillator envelope) of a given z-measuring scintillator.
 
double getStripLength (int plane, int strip) const
 Get scintillator length.
 
const CLHEP::Hep3Vector getLocalPosition (double phiStripAve, double zStripAve) const
 Convert 2D strip position (0..nStrips along each axis) to local coordinates.
 
const CLHEP::Hep3Vector getPropagationDistance (const CLHEP::Hep3Vector &) const
 Convert local coordinates to signal-propagation distance (cm). More...
 
double getPropagationDistance (const CLHEP::Hep3Vector &local, int strip, bool phiReadout) const
 Convert local coordinates to signal-propagation distance (cm) Version for scintillators. More...
 
const CLHEP::Hep3Vector getPropagationDistance (const CLHEP::Hep3Vector &, int stripZ, int stripPhi) const
 Convert local coordinates to signal-propagation distance (cm) Version for scintillators.
 
const CLHEP::Hep3Vector getPropagationTimes (const CLHEP::Hep3Vector &) const
 Convert local coordinates to signal-propagation time (ns) Version for RPCs.
 
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 getPropagationTimes (const CLHEP::Hep3Vector &, int stripZ, int stripPhi) const
 Convert local coordinates to signal-propagation time (ns) Version for scintillators.
 
double getPhiStrip (const CLHEP::Hep3Vector &p) const
 Return phi strip (including fractional part) corresponding to local phi coordinate.
 
double getZStrip (const CLHEP::Hep3Vector &p) const
 Return z strip (including fractional part) corresponding to local z coordinate.
 
int getPhiStripNumber (const CLHEP::Hep3Vector &p) const
 Get phi strip corresponding to local phi coordinate. More...
 
int getZStripNumber (const CLHEP::Hep3Vector &p) const
 Get z strip corresponding to local z coordinate. More...
 
const CLHEP::Hep3Vector localToGlobal (const CLHEP::Hep3Vector &v, bool reco=false) const
 Transform space-point within this module from local to global coordinates. More...
 
const CLHEP::Hep3Vector RotateToLocal (const CLHEP::Hep3Vector &v) const
 Rotate a vector from global to local system.
 
const CLHEP::Hep3Vector RotateToGlobal (const CLHEP::Hep3Vector &v) const
 Rotate a vector from local to global system.
 
const CLHEP::Hep3Vector globalToLocal (const CLHEP::Hep3Vector &v, bool reco=false) const
 Transform space-point within this module from global to local coordinates. More...
 
const CLHEP::Hep3Vector getLocalReconstructionShift () const
 Return the local-coordinate real-vs-ideal translation of this module's sensitive volume; nominally (0,0,0)
 
const CLHEP::Hep3Vector getGlobalOrigin () const
 Return the position (in global coordinates) of this module's sensitive-volume origin.
 
void setAlignment (const HepGeom::Transform3D &moduleAlignment)
 Set the alignment Transformation.
 
void setDisplacedGeo (const HepGeom::Transform3D &moduleDisplacedGeo)
 Set the displaced geometry Transformation.
 
const HepGeom::Transform3D getAlignment () const
 Get the alignment Transformation.
 
const HepGeom::Transform3D getDisplacedGeo () const
 Get the displaced geometry Transformation.
 
const CLHEP::HepRotation getRotationFromTransform3D (const HepGeom::Transform3D &trans) const
 Get the rotation from Transform3D.
 
const CLHEP::Hep3Vector getTranslationFromTransform3D (const HepGeom::Transform3D &trans) const
 Get the translation from Transform3D.
 

Private Attributes

bool m_HasRPCs
 flag to indicate whether this module contains RPCs (true) or scintillators (false)
 
bool m_IsFlipped
 flag to indicate if this module is flipped by 180 degrees about z axis within its air gap
 
double m_PhiStripWidth
 to store the width (in cm) of each phi strip this module
 
int m_PhiStripMin
 to store the minimum phi strip number in this module
 
int m_PhiStripMax
 to store the maximum phi strip number in this module
 
double m_PhiPositionBase
 to store the base position (in strip More...
 
double m_ZStripWidth
 to store the width (in cm) of each z strip in this module
 
int m_ZStripMin
 to store the minimum z strip number in this module
 
int m_ZStripMax
 to store the maximum z strip number in this module
 
double m_ZPositionBase
 to store the base position (in strip More...
 
int m_PhiSensorSide
 to store the sensor side for phi scintillators
 
double m_SignalSpeed
 to store the signal-propagation speed (cm/ns) along the strip
 
CLHEP::Hep3Vector m_GlobalOrigin
 to store the position (in global coordinates) of this module's sensitive-volume origin
 
CLHEP::Hep3Vector m_LocalReconstructionShift
 to store the local-coordinate real-vs-ideal translation of this module's sensitive volume
 
CLHEP::HepRotation m_Rotation
 to store the rotation matrix (in global coordinates) of this module's sector
 
CLHEP::HepRotation m_RotationInverse
 to store the inverse of the rotation matrix (in global coordinates) of this module's sector
 
HepGeom::Transform3D m_Alignment
 alignment transformation (rotation + shift)
 
CLHEP::HepRotation m_AlignmentRotation
 rotation of the alignment transformation
 
CLHEP::Hep3Vector m_AlignmentTranslation
 translation of the alignment transformation
 
HepGeom::Transform3D m_AlignmentInverse
 inverse of alignment transformation
 
CLHEP::HepRotation m_AlignmentRotationInverse
 inverse of the rotation of the alignment transformation
 
HepGeom::Transform3D m_DisplacedGeo
 displaced geometry w.r.t the nominal geometry, as transformation (rotation + shift)
 
CLHEP::HepRotation m_DisplacedGeoRotation
 rotation of the displaced geometry transformation
 
CLHEP::Hep3Vector m_DisplacedGeoTranslation
 translation of the displaced geometry transformation
 
HepGeom::Transform3D m_DisplacedGeoInverse
 inverse of displaced geometry transformation
 
CLHEP::HepRotation m_DisplacedGeoRotationInverse
 inverse of the rotation of displaced geometry transformation
 
std::vector< double > m_PhiScintLengths
 to store the length of each phi-measuring scintillator
 
std::vector< double > m_PhiScintPositions
 to store the transverse position (within scintillator envelope) of each phi-measuring scintillator
 
std::vector< double > m_PhiScintOffsets
 to store the longitudinal offset (within scintillator envelope) of each phi-measuring scintillator
 
std::vector< double > m_ZScintLengths
 to store the length of each z-measuring scintillator
 
std::vector< double > m_ZScintPositions
 to store the transverse position (within scintillator envelope) of each z-measuring scintillator
 
std::vector< double > m_ZScintOffsets
 to store the longitudinal offset (within scintillator envelope) of each z-measuring scintillator
 

Detailed Description

Define the geometry of a BKLM module Each sector [octant] contains Modules.

Sectors are numbered 1..8, moving counterclockwise around the global z axis in the global x-y plane. The local geometry of a sector and its modules is defined by the orientation of sector 1 (centred on the global +x axis).

 SECTOR 1 GLOBAL COORDINATES        SECTOR s LOCAL COORDINATES

+y _ +y _ ^ / | ^ / | | / | | / | | / | |/ | | / | /| | | | end | || end |

  • - - - - - | view | - - > +x - - - - - |+ view | - - > +x | | | | \ | \ | \ | \ | \ | \ | _| _|

The sector's local origin is shifted along the global z axis so that it is at the boundary between the forward and backward barrel KLM.

The sector's local origin is shifted along the local +x axis so that it coincides with the middle of the layer-1 gap (=slot between iron layers); outer layers are at larger values of sector-local x. The module's local origin is shifted along the local x axis so that it is in the middle of the module's sensitive volume. The module's local origin is also shifted slightly along the local y and z axes so that it is in the middle of the sensitive volume along the local y axis and at the edge nearest the local origin of the sensitive volume along the local z axis.

For the backward sectors, the module is rotated by 180 degrees about the +x axis so that the orientation of the local z axis is flipped from the global orientation so that all modules extend along the local +z axis from the local z=0 (which is nearest the forward-backward boundary).

Strip numbering for RPCs: z-measuring strips: #1 is nearest the I.P., sensors are at the other end phi-measuring strips: #1 is on the local -y end, sensors are at the local +y end

Strip numbering for scintillatorss: z-measuring strips: #1 is nearest the I.P., sensors are at the other end phi-measuring strips: if phiSensorSide > 0: #1 is on the local -y end, sensors are at the local +y end if phiSensorSide < 0: #1 is on the local +y end, sensors are at the local -y end

Definition at line 76 of file Module.h.

Member Function Documentation

◆ getPhiStripNumber()

int getPhiStripNumber ( const CLHEP::Hep3Vector &  p) const

Get phi strip corresponding to local phi coordinate.

Returns
Strip number, -1 if not found.

Definition at line 349 of file Module.cc.

350 {
351  int strip = std::floor(getPhiStrip(p));
352  if (strip < m_PhiStripMin || strip > m_PhiStripMax)
353  return -1;
354  return strip;
355 }
int m_PhiStripMax
to store the maximum phi strip number in this module
Definition: Module.h:329
double getPhiStrip(const CLHEP::Hep3Vector &p) const
Return phi strip (including fractional part) corresponding to local phi coordinate.
Definition: Module.h:237

◆ getPropagationDistance() [1/2]

const CLHEP::Hep3Vector getPropagationDistance ( const CLHEP::Hep3Vector &  local) const

Convert local coordinates to signal-propagation distance (cm).

Version for RPCs.

Definition at line 290 of file Module.cc.

◆ getPropagationDistance() [2/2]

double getPropagationDistance ( const CLHEP::Hep3Vector &  local,
int  strip,
bool  phiReadout 
) const

Convert local coordinates to signal-propagation distance (cm) Version for scintillators.

The value m_PhiSensorSide == -1 corresponds to SiPMs at positive local coordinate (and vice versa). Consequently, the sign is negative.

Definition at line 273 of file Module.cc.

◆ getZStripNumber()

int getZStripNumber ( const CLHEP::Hep3Vector &  p) const

Get z strip corresponding to local z coordinate.

Returns
Strip number, -1 if not found.

Definition at line 357 of file Module.cc.

◆ globalToLocal()

const CLHEP::Hep3Vector globalToLocal ( const CLHEP::Hep3Vector &  v,
bool  reco = false 
) const

Transform space-point within this module from global to local coordinates.

Parameters
[in]vPoint in global coordinates.
[in]recoApply alignment correction (true) or return nominal position (false).

Definition at line 339 of file Module.cc.

◆ localToGlobal()

const CLHEP::Hep3Vector localToGlobal ( const CLHEP::Hep3Vector &  v,
bool  reco = false 
) const

Transform space-point within this module from local to global coordinates.

Parameters
[in]vPoint in local coordinates.
[in]recoApply alignment correction (true) or return nominal position (false).

Definition at line 326 of file Module.cc.

Member Data Documentation

◆ m_PhiPositionBase

double m_PhiPositionBase
private

to store the base position (in strip

  1. units) along phi coordinate of the edge of first phi-measuring strip

Definition at line 332 of file Module.h.

◆ m_ZPositionBase

double m_ZPositionBase
private

to store the base position (in strip

  1. units) along z coordinate of the edge of first z-measuring strip

Definition at line 344 of file Module.h.


The documentation for this class was generated from the following files: