12#include <klm/bklm/geometry/Module.h>
13#include <klm/dbobjects/bklm/BKLMGeometryPar.h>
16#include <CLHEP/Vector/ThreeVector.h>
63 const CLHEP::Hep3Vector
getGapHalfSize(
int layer,
bool hasChimney)
const;
78 const CLHEP::Hep3Vector
getGasHalfSize(
int layer,
bool hasChimney)
const;
81 const CLHEP::Hep3Vector
getAirHalfSize(
int layer,
bool hasChimney)
const;
147 return m_IsFlipped[section][sector - 1][layer - 1];
577 const HepGeom::Transform3D
getModuleAlignment(
int section,
int sector,
int layer)
const;
static constexpr int getMaximalLayerNumber()
Get maximal layer number (1-based).
static constexpr int getMaximalSectorNumber()
Get maximal sector number (1-based).
The Class for BKLM geometry.
GearDir is the basic class used for accessing the parameter store.
Provides BKLM geometry parameters for simulation, reconstruction etc (from Gearbox or DataBase)
double getScintBoreRadius(void) const
Get the radius of the cylindrical central bore in a scintillator strip.
bool doBeamBackgroundStudy(void) const
Get the beam background study flag.
double m_LocalReconstructionShiftX[2][BKLMElementNumbers::getMaximalSectorNumber()][BKLMElementNumbers::getMaximalLayerNumber()]
Reconstruction dx in local system. displacement, not alignment.
double m_GapInnerRadius
Radius of the inner tangent circle of virtual gap 0 (assuming equal-height layers)
double m_BracketRibWidth
width of the innermost-module support plate's bracket's rib
double m_ScintWidth
width of one scintillator strip (cm), including the TiO2 coating
double m_LocalReconstructionShiftZ[2][BKLMElementNumbers::getMaximalSectorNumber()][BKLMElementNumbers::getMaximalLayerNumber()]
Reconstruction dz in local system. displacement, not alignment.
int m_NZStripsChimney
number of z-measuring cathode strips in a chimney-sector RPC module
double m_ReadoutConnectorsHeight
Height of the readout connectors pair.
double getBracketThickness(void) const
Get the thickness of the layer-0 support plate's bracket.
~GeometryPar()
Hidden destructor.
double m_SupportPlateLengthChimney
length of the innermost-module support plate in the chimney sector
bool m_HasRPCs[BKLMElementNumbers::getMaximalLayerNumber()]
Flag to indicate whether layer contains RPCs (true) or scintillators (false)
double getModuleFoamHeight(void) const
Get the height of the module's transmission-line foam (2 per module)
double m_ChimneyPipeInnerRadius
inner radius of the chimney pipe
double m_BracketLength
length of the innermost-module support plate's bracket
double getGapInnerRadius(void) const
Get the radius of the inner tangent circle of gap 1 (next-to-innermost)
double m_MaximalZStripLength
maximal Z strip length (for scintillators).
double m_ReadoutContainerHeight
Height of the readout station's container.
double m_ReadoutCarrierHeight
Height of the readout carrier card.
double m_ModuleLengthChimney
length along z of the module in the chimney sector
double getModuleMylarHeight(void) const
Get the height of the module's insulating mylar (2 per module)
const CLHEP::Hep3Vector getReadoutContainerHalfSize(void) const
Get the size (dx,dy,dz) of the readout container.
void readDisplacedGeoFromDB()
Initialize and Updates displacements parameters from DB for geometry constructor, registers itself fo...
double m_BracketInnerRadius
inner radius of the innermost-module support plate's bracket
double m_BracketWidth
width of the innermost-module support plate's bracket
double m_BraceWidthChimney
width of the central brace in the middle of the cable-services channel in the chimney sector
int m_NPhiStrips[BKLMElementNumbers::getMaximalLayerNumber()]
Number of phi-readout RPC strips in each layer.
double m_ReadoutContainerLength
Length of the readout station's container.
double m_Gap1IronWidth
Width (at the outer radius) of the adjacent structural iron on either side of innermost gap.
double getModuleFrameWidth(void) const
Get the width of the module's perimeter aluminum frame.
double getMPPCHousingRadius(void) const
Get the MPPC housing radius.
double getLayerOuterRadius(int layer) const
Get the outer radius of specified layer.
double getModuleLength(void) const
Get the length along z of the module.
double getChimneyShieldInnerRadius(void) const
Get the inner radius of the chimney radiation shield.
double getGapNominalHeight(void) const
Get the nominal height of the outer gaps.
double getIronNominalHeight(void) const
Get the nominal height of a layer's structural iron.
const CLHEP::Hep3Vector getModuleHalfSize(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the detector module of specified layer.
double getScintHalfHeight(void) const
Get the height of the entire volume of a scintillator strip (including TiO2 coating)
int getNZStrips(bool isChimney) const
Get the number of z-measuring cathode strips in an RPC module.
double m_IronActualHeight
Actual height of a layer's structural iron.
double m_ZStripWidth[BKLMElementNumbers::getMaximalLayerNumber()]
Width of the z strips on each layer.
double m_ReadoutPreamplifierWidth
Width of the preamplifier card.
double m_IronNominalHeight
Nominal height of a layer's structural iron.
const HepGeom::Transform3D getModuleAlignment(int section, int sector, int layer) const
Get the alignment transformation of a module.
const CLHEP::Hep3Vector getModuleInteriorHalfSize1(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the detector module's interior volume 1.
const Module * findModule(int section, int sector, int layer) const
Get the pointer to the definition of a module.
double getScintTiO2ThicknessTop(void) const
Get the thickness of the inactive TiO2-polystyrene coating on top (broad) surface of a scintillator s...
double m_ScintHeight
height of one scintillator strip (cm), including the TiO2 coating
int getNLayer(void) const
Get the number of modules in one sector.
double m_ChimneyHousingInnerRadius
inner radius of the chimney housing
double m_ModuleFoamHeight
height of a detector module's transmission-line foam
std::map< int, Module * > m_Modules
map of <volumeIDs, pointers to defined modules>
int m_ScintEnvelopeOffsetSign[BKLMElementNumbers::getMaximalLayerNumber()]
Sign (+/-1) of scintillator-envelope's shift along y axis within its enclosing module for MPPC placem...
double m_BracketRibThickness
thickness of the innermost-module support plate's bracket's rib
double m_Gap1NominalHeight
Nominal height of the innermost gap.
int getNPhiScints(int layer) const
Get the number of phi-measuring scintillators in a scintillator module.
double getScintHalfWidth(void) const
Get the height of the entire volume of a scintillator strip (including TiO2 coating)
const CLHEP::Hep3Vector getScintEnvelopeOffset(int layer, bool hasChimney) const
Get the shift (dx,dy,dz) of the scintillator detector module's scintillator envelope within its enclo...
bool hasRPCs(int layer) const
Determine if the sensitive detectors in a given layer are RPCs (=true) or scintillators (=false)
double getMPPCHousingHalfLength(void) const
Get the MPPC housing half-length.
int getNReadoutPreamplifierPosition(void) const
Get the number of preamplifier positions along the length of the carrier card.
double m_ScintFiberRadius
radius (cm) of the central WLS fiber in the scintillator strip
double m_ZScintDLength[BKLMElementNumbers::getMaximalLayerNumber()][NZSCINT]
Shortening of the nominal length of the z scintillators.
double m_MPPCLength
MPPC length.
int getNReadoutStation(void) const
Get the number of preamplifier readout stations.
double getGap1NominalHeight(void) const
Get the nominal height of the innermost gap.
double getScintFiberRadius(void) const
Get the radius of the cylindrical central WLS fiber in a scintillator strip.
double m_SupportPlateLength
length of the innermost-module support plate
const CLHEP::Hep3Vector getScintEnvelopeHalfSize(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the scintillator detector module's scintillator envelope.
GeometryPar(GeometryPar &)
Hidden copy constructor.
double m_ModuleMylarHeight
height of a detector module's mylar insulation
const CLHEP::Hep3Vector getChimneyPosition(int layer) const
Get the position of the chimney hole in the specified layer.
double getGapIronWidth(void) const
Get the width (at the outer radius) of the adjacent structural iron on either side of a gap.
double m_ModuleFrameThickness
thickness of a detector module's frame ("C" shape - thickness of vertical leg)
int m_NPhiScints[BKLMElementNumbers::getMaximalLayerNumber()]
Number of phi-readout scintillators in each layer.
GeometryPar & operator=(const GeometryPar &)
Hidden copy assignment.
double getBracketWidth(void) const
Get the width of the layer-0 support plate's bracket.
double m_ChimneyShieldInnerRadius
inner radius of the chimney shield
double getGap1InnerRadius(void) const
Get the radius of the inner tangent circle of gap 0 (innermost)
std::map< int, HepGeom::Transform3D > m_Displacements
map of <volumeIDs, displacement Transform3D>
double getOuterRadius(void) const
Get the radius of the inscribed circle of the outer polygon.
double getModuleGasHeight(void) const
Get the height of the module's gas gap (2 per module)
double getOffsetZ(void) const
Get the global shift along a of the entire BKLM.
double m_Rotation
Global rotation about z of the BKLM.
int m_NReadoutStation
Number of preamplifier readout stations.
double getBracketZPosition(int, bool) const
Get the position of a layer-0 support plate's bracket.
double m_ModulePolystyreneOuterHeight
height of the outer polystyrene-filler sheet
double getReadoutConnectorsPosition(void) const
Get the position of the readout connectors pair along the length of the carrier card.
double getChimneyPipeOuterRadius(void) const
Get the outer radius of the chimney pipe.
bool getReadoutStationIsPhi(int station) const
Get the selector for phi (true) or z (false) readout station.
const CLHEP::Hep3Vector getReadoutPreamplifierHalfSize(void) const
Get the size (dx,dy,dz) of the preamplifier card.
double getBracketLength(void) const
Get the length of the layer-0 support plate's bracket.
int getNPhiStrips(int layer) const
Get the number of phi-measuring cathode strips in an RPC module.
int getNZScints(bool isChimney) const
Get the number of z-measuring scintillators in a scintillator module.
double getGap1ActualHeight(void) const
Get the actual height of the innermost gap.
double m_ChimneyLength
length along z of the chimney hole
double getModuleLengthChimney(void) const
Get the length along z of the module.
double getPolystyreneOffsetX(void) const
Get the radial offset of the scintillator detector module's active envelope due to difference in poly...
double m_ReadoutContainerWidth
Width of the readout station's container.
double m_OffsetZ
Global offset along z of the BKLM.
double getReadoutStationPosition(int station) const
Get the position of each readout station.
double m_ModuleGasSpacerWidth
width of a detector module's spacer
double m_PhiStripWidth[BKLMElementNumbers::getMaximalLayerNumber()]
Width of the phi strips on each layer.
double getModuleCoverHeight(void) const
Get the height of the module's aluminum cover (2 per module)
const CLHEP::Hep3Vector getReadoutConnectorsHalfSize(void) const
Get the size (dx,dy,dz) of the readout connectors pair.
double getRibThickness(void) const
Get the thickness of the radial rib that supports the solenoid / inner detectors.
int getNSector(void) const
Get the number of sectors of the BKLM.
bool getModuleFlip(int section, int sector, int layer) const
Get the flip (180-degrees about z axis) of a particular BKLM module.
double m_OuterRadius
Radius of the circle tangent to the sides of the outer polygon.
static GeometryPar * m_Instance
static pointer to the singleton instance of this class
double m_BracketThickness
thickness of the innermost-module support plate's bracket
double getModuleElectrodeBorder(void) const
Get the size of the border between a detector module's perimeter and electrode.
double m_ModuleGlassHeight
height of a detector module's glass electrode
const CLHEP::Hep3Vector getModuleInteriorHalfSize2(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the scintillator detector module's polystyrene filler.
double getRotation(void) const
Get the global rotation angle about z of the entire BKLM.
double m_MaximalPhiStripLength
Maximal phi strip length (for scintillators).
double m_RibThickness
thickness of the radial rib that supports the solenoid / inner detectors
double m_ScintTiO2ThicknessTop
thickness (cm) of the TiO2 coating on the top (and bottom) of the scintillator strip
double getHalfLength(void) const
Get the half-length along z of the BKLM.
double m_ModuleReadoutHeight
height of a detector module's readout
const CLHEP::Hep3Vector getGapHalfSize(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the gap [=slot] of specified layer.
double m_ModuleLength
length along z of the module
double m_HalfLength
Half-length along z of the BKLM.
double getBraceWidthChimney(void) const
Get the width of the brace in the middle of the cable-services channel in the chimney sector.
double m_ReadoutPreamplifierHeight
Height of the preamplifier card.
double getBracketRibThickness(void) const
Get the thickness of the layer-0 support plate's bracket's rib.
double m_ChimneyWidth
width of the chimney hole
double m_LayerHeight
Height of a layer: internal use only.
double m_ChimneyShieldOuterRadius
outer radius of the chimney shield
int m_NZScintsChimney
number of z-measuring scintillators in a chimney-sector scintillator module
double getChimneyHousingInnerRadius(void) const
Get the inner radius of the chimney housing.
double m_ReadoutConnectorsLength
Length of the readout connectors pair.
double m_SupportPlateWidth
width of the innermost-module support plate
double m_Layer1Height
Height of layer 0: internal use only.
double m_MPPCHeight
MPPC height.
std::map< int, HepGeom::Transform3D > m_Alignments
map of <volumeIDs, alignment Transform3D>
void readAlignmentFromDB()
Initialize and Updates alignment parameters from DB for reconstruction, that is for Module constructi...
int m_NZStrips
number of z-measuring cathode strips in a standard RPC module
double m_SectorRotation[2][BKLMElementNumbers::getMaximalSectorNumber()]
Global rotation angle of a sector.
double m_BracketInset
distance from support plate's end of bracket
double getMPPCHalfLength(void) const
Get the MPPC half-length.
double getIronActualHeight(void) const
Get the actual height of a layer's structural iron.
int m_NLayer
Number of layers in one sector.
double getPhi(void) const
Get the starting angle of the BKLM's polygon shape.
const CLHEP::Hep3Vector getSupportPlateHalfSize(bool) const
Get the size of the layer-0 support plate.
double m_GapLength
Length along z of each gap.
double m_MPPCHousingRadius
MPPC housing radius.
double m_MPPCHousingLength
MPPC housing length.
double getMaximalZStripLength() const
Get maximal Z strip length (for scintillators).
double m_CablesWidth
width of the cable-services channel at each end
double getModuleGlassHeight(void) const
Get the height of the module's glass electrode (4 per module)
double m_ScintBoreRadius
radius (cm) of the central bore in the scintillator strip
double m_ReadoutCarrierLength
Length of the readout carrier card.
double m_ReadoutConnectorsWidth
Width of the readout connectors pair.
double getGap1IronWidth(void) const
Get the width (at the outer radius) of the adjacent structural iron on either side of innermost gap.
double m_GapIronWidth
Width (at the outer radius) of the adjacent structural iron on either side of a gap.
double getModuleCopperHeight(void) const
Get the height of the module's readout or ground copper plane (4 per module)
double m_ReadoutStationPosition[NSTATION]
Position of each readout station along its relevant axis.
double m_ReadoutPreamplifierLength
Length of the preamplifier card.
double m_ModuleGasHeight
height of a detector module's gas gap
double getActiveMiddleRadius(int section, int sector, int layer) const
Get the radial midpoint of the detector module's active volume of specified layer.
double m_BraceWidth
width of the central brace in the middle of the cable-services channel
const CLHEP::Hep3Vector getChimneyHalfSize(int layer) const
Get the size of the chimney hole in the specified layer.
double m_ModuleFrameWidth
width of a detector module's frame ("C" shape - width of horizontal leg)
double m_MPPCWidth
MPPC width.
double m_ChimneyHousingOuterRadius
outer radius of the chimney housing
double getCablesWidth(void) const
Get the width of the cable-services channel at each end.
double getGapMiddleRadius(int layer) const
Get the radial midpoint of the gap of specified layer.
double m_GapNominalHeight
Nominal height of outer gaps.
double getBracketCutoutDphi(void) const
Get the angular width of the layer-0 support plate's bracket's cutout.
double m_ReadoutConnectorsPosition
Position of the readout connectors pair along the length of the carrier card.
double m_ModulePolystyreneInnerHeight
height of the inner polystyrene-filler sheet
double m_ChimneyCoverThickness
thickness of the chimney's iron cover plate
void readFromDB(const BKLMGeometryPar &)
Get geometry parameters from Conditions Database.
double getChimneyShieldOuterRadius(void) const
Get the outer radius of the chimney radiation shield.
double getChimneyCoverThickness(void) const
Get the thickness of the chimney cover plate.
void clear()
Clear all geometry parameters.
double m_Phi
Starting angle of the polygon shape.
double getReadoutPreamplifierPosition(int preamp) const
Get the position of a preamplifier along the length of the carrier card.
double getBraceWidth(void) const
Get the width of the brace in the middle of the cable-services channel.
double m_ModuleElectrodeBorder
size of the border between a detector module's perimeter and electrode
double m_Gap1ActualHeight
Actual height of the innermost gap.
std::vector< double > m_ReadoutPreamplifierPosition
Positions of the preamplifiers along the length of the carrier card.
double m_ModuleHeight
height of a detector module
const CLHEP::Hep3Vector getReadoutCarrierHalfSize(void) const
Get the size (dx,dy,dz) of the carrier card.
void read(const GearDir &)
Get geometry parameters from Gearbox.
double getModuleGasSpacerWidth(void) const
Get the width of the module's gas-gap's perimeter spacer.
const CLHEP::Hep3Vector getGasHalfSize(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the detector module's gas gaps of specified layer.
double m_GapActualHeight
Actual height of outer gaps.
const CLHEP::Hep3Vector getElectrodeHalfSize(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the detector module's electrode of specified layer.
double m_LocalReconstructionShiftY[2][BKLMElementNumbers::getMaximalSectorNumber()][BKLMElementNumbers::getMaximalLayerNumber()]
Reconstruction dy in local system. displacement, not alignment.
static GeometryPar * instance(void)
Static method to get a reference to the singleton GeometryPar instance.
double m_ModuleCoverHeight
height of a detector module's aluminum cover
double m_Gap1InnerRadius
Radius of the inner tangent circle of the innermost gap.
int getScintEnvelopeOffsetSign(int layer) const
Get the sign (+/-1) of scintillator-envelope's shift along y axis within its enclosing module for MPP...
double m_SolenoidOuterRadius
Outer radius of the solenoid.
double getBracketRibWidth(void) const
Get the width of the layer-0 support plate's bracket's rib.
double getModuleMiddleRadius(int layer) const
Get the radial midpoint of the detector module of specified layer.
double getMPPCHalfWidth(void) const
Get the MPPC half-width.
double getMPPCHalfHeight(void) const
Get the MPPC half-height.
double getGapLength(void) const
Get the length along z of the module gap.
int m_NSector
Number of sectors (=8 : octagonal)
bool m_DoBeamBackgroundStudy
Flag for enabling beam background study (=use bkg sensitive-detector function too)
double m_ChimneyPipeOuterRadius
outer radius of the chimney pipe
double getScintTiO2ThicknessSide(void) const
Get the thickness of the inactive TiO2-polystyrene coating on side (short) surface of a scintillator ...
double getModuleFrameThickness(void) const
Get the thickness of the module's perimeter aluminum frame.
double getSolenoidOuterRadius(void) const
Get the outer radius of the solenoid.
double getChimneyPipeInnerRadius(void) const
Get the inner radius of the chimney pipe.
double getModuleHeight(void) const
Get the height of the module.
const HepGeom::Transform3D getModuleDisplacedGeo(int section, int sector, int layer) const
Get the displacement transformation of a module.
double getBracketInnerRadius(void) const
Get the inner radius of the layer-0 support plate's bracket.
double getLayerInnerRadius(int layer) const
Get the inner radius of specified layer.
double getChimneyHousingOuterRadius(void) const
Get the outer radius of the chimney housing.
bool m_ReadoutStationIsPhi[NSTATION]
Selector for phi (true) or z (false) readout station.
double m_ReadoutCarrierWidth
Width of the readout carrier card.
double getGapActualHeight(void) const
Get the actual height of the outer gaps.
double m_SupportPlateHeight
height of the innermost-module support plate
double m_ScintTiO2ThicknessSide
thickness (cm) of the TiO2 coating on the left (and right) side of the scintillator strip
double m_ModuleCopperHeight
height of a detector module's copper readout or ground plane
bool m_IsFlipped[2][BKLMElementNumbers::getMaximalSectorNumber()][BKLMElementNumbers::getMaximalLayerNumber()]
Flag to indicate whether a module is flipped (true) or not (false) by 180 degrees about the z axis.
double m_BracketCutoutDphi
angular width of the innermost-module support plate's bracket's cutout
HepGeom::Transform3D getTransformFromRigidBodyParams(double dU, double dV, double dW, double dAlpha, double dBeta, double dGamma)
Convert 6 rigid body params (alignment/displacement) to corresponding Transform3D Angles in radians,...
const CLHEP::Hep3Vector getAirHalfSize(int layer, bool hasChimney) const
Get the size (dx,dy,dz) of the scintillator detector module's air filler.
void calculate()
Calculate additional geometry parameters.
double getMaximalPhiStripLength() const
Get maximal phi strip length (for scintillators).
int m_NZScints
number of z-measuring scintillators in a standard scintillator module
Define the geometry of a BKLM module Each sector [octant] contains Modules.
Abstract base class for different kinds of events.