LDMX Software
|
Class to translated between detector location (section, layer, strip) and real space. More...
#include <DetectorGeometry.h>
Public Member Functions | |
BoundingBox | getBoundingBox (const ldmx::HcalHit &hit) const |
Calculate real space coordinates from detector location. | |
BoundingBox | getBoundingBox (const std::vector< ldmx::HcalHit > &hitVec) const |
Calculate real space coordinates of a cluster of hits. | |
BoundingBox | getBoundingBox (ldmx::HcalID::HcalSection section) const |
Get bounding box for the input section. | |
HexPrism | getHexPrism (const ldmx::EcalID &id) const |
Calculate bounding hexagonal prism for input EcalHit. | |
HexPrism | getHexTower (int towerIndex) const |
Get HexPrism for a tower. | |
double | getRotAngle (int layerID, int moduleID) const |
Get Rotation Angle around z-axis for the input layerID and moduleID. | |
BoundingBox | getBoundingBox (int layerID, int moduleID) const |
Get Bounding Box for input recoil module NOTE: This does not take into account any rotation! Use getRotAngle as well! | |
BoundingBox | getBoundingBox (const ldmx::SimTrackerHit &recoilHit) const |
Get Bounding Box for input recoil hit NOTE: This does not take into account any rotation! Use getRotAngle as well! | |
Static Public Member Functions | |
static const DetectorGeometry & | getInstance () |
Get the single instance of this class. | |
Private Member Functions | |
DetectorGeometry () | |
Constructor This is where all the detector constants are set. | |
Private Attributes | |
std::map< ldmx::HcalID::HcalSection, int > | hcalNLayers_ |
Number of layers in each section. | |
std::map< ldmx::HcalID::HcalSection, int > | hcalNStrips_ |
Number of strips per layer in each section. | |
std::map< ldmx::HcalID::HcalSection, double > | hcalLengthScint_ |
Length of Scintillator Strip [mm]. | |
std::map< ldmx::HcalID::HcalSection, double > | hcalZeroLayer_ |
The plane of the zero'th layer of each section [mm]. | |
std::map< ldmx::HcalID::HcalSection, double > | hcalZeroStrip_ |
The plane of the zero'th strip of each section [mm]. | |
std::map< ldmx::HcalID::HcalSection, double > | hcalLayerThickness_ |
Thickness of the layers in each seciton [mm]. | |
int | hcalParityVertical_ |
an example layer number of a vertical layer | |
double | hcalUncertaintyTimingPos_ |
Uncertainty in timing position along a bar/strip [mm]. | |
double | hcalThicknessScint_ |
Thickness of Scintillator Strip [mm]. | |
double | hcalWidthScint_ |
Width of Scintillator Strip [mm]. | |
double | ecalSiThickness_ |
Thickness of sensitive Si layers. | |
double | ecalDepth_ |
Total depth of ECAL (length in Z direction) | |
double | ecalZeroLayer_ |
z-coordinate of plane for first ecal layer [mm] | |
std::unique_ptr< ldmx::EcalHexReadout > | ecalHexReader_ |
Helper class to calculate (x,y) coordinate from hexagons. | |
double | recoilStereoStripLength_ |
double | recoilStereoXWidth_ |
double | recoilStereoYWidth_ |
double | recoilStereoSeparation_ |
double | recoilStereoAngle_ |
double | recoilMonoStripLength_ |
double | recoilMonoXWidth_ |
double | recoilMonoYWidth_ |
double | recoilMonoSeparation_ |
double | recoilSensorThickness_ |
std::map< int, std::vector< double > > | recoilModulePos_ |
position of each module in recoil detector The key in this map is 10*layerID+moduleID | |
std::map< int, double > | recoilModuleAngle_ |
angular tilt for each module in recoil detector The key in this map is 10*layerID+moduleID | |
Class to translated between detector location (section, layer, strip) and real space.
Definition at line 54 of file DetectorGeometry.h.
|
private |
Constructor This is where all the detector constants are set.
It is private so that the user is forced to use the single instance acquired from getInstance() above.
Definition at line 10 of file DetectorGeometry.cxx.
References ecalDepth_, ecalHexReader_, ecalSiThickness_, ecalZeroLayer_, hcalLayerThickness_, hcalLengthScint_, hcalNLayers_, hcalNStrips_, hcalParityVertical_, hcalThicknessScint_, hcalUncertaintyTimingPos_, hcalWidthScint_, hcalZeroLayer_, hcalZeroStrip_, recoilModuleAngle_, recoilModulePos_, and framework::config::Parameters::setParameters().
BoundingBox eventdisplay::DetectorGeometry::getBoundingBox | ( | const ldmx::HcalHit & | hit | ) | const |
Calculate real space coordinates from detector location.
hit | HcalHit to find real space hit for |
Definition at line 250 of file DetectorGeometry.cxx.
References ldmx::CalorimeterHit::getID(), ldmx::CalorimeterHit::getXPos(), ldmx::CalorimeterHit::getYPos(), hcalLayerThickness_, hcalThicknessScint_, hcalUncertaintyTimingPos_, hcalWidthScint_, hcalZeroLayer_, and hcalZeroStrip_.
Referenced by eventdisplay::Objects::draw(), and getBoundingBox().
BoundingBox eventdisplay::DetectorGeometry::getBoundingBox | ( | const ldmx::SimTrackerHit & | recoilHit | ) | const |
Get Bounding Box for input recoil hit NOTE: This does not take into account any rotation! Use getRotAngle as well!
recoilHit | SimTrackerHit in recoil tracker |
Definition at line 521 of file DetectorGeometry.cxx.
References ldmx::SimTrackerHit::getLayerID(), ldmx::SimTrackerHit::getModuleID(), ldmx::SimTrackerHit::getPosition(), getRotAngle(), and recoilModulePos_.
BoundingBox eventdisplay::DetectorGeometry::getBoundingBox | ( | const std::vector< ldmx::HcalHit > & | hitVec | ) | const |
Calculate real space coordinates of a cluster of hits.
Determines cluster's coordinates by a weighted mean of the individuals.
hitVec | vector of HcalHits to find a "center" for |
Definition at line 351 of file DetectorGeometry.cxx.
References getBoundingBox().
BoundingBox eventdisplay::DetectorGeometry::getBoundingBox | ( | int | layerID, |
int | moduleID | ||
) | const |
Get Bounding Box for input recoil module NOTE: This does not take into account any rotation! Use getRotAngle as well!
layerID | index for layer of module |
moduleID | index for module |
Definition at line 491 of file DetectorGeometry.cxx.
References recoilModulePos_.
BoundingBox eventdisplay::DetectorGeometry::getBoundingBox | ( | ldmx::HcalID::HcalSection | section | ) | const |
Get bounding box for the input section.
section | HcalID::HcalSection |
Definition at line 382 of file DetectorGeometry.cxx.
References hcalLayerThickness_, hcalLengthScint_, hcalNLayers_, hcalNStrips_, hcalWidthScint_, hcalZeroLayer_, and hcalZeroStrip_.
HexPrism eventdisplay::DetectorGeometry::getHexPrism | ( | const ldmx::EcalID & | id | ) | const |
Calculate bounding hexagonal prism for input EcalHit.
id | EcalID for the hit |
Definition at line 450 of file DetectorGeometry.cxx.
References ecalHexReader_, and ecalSiThickness_.
HexPrism eventdisplay::DetectorGeometry::getHexTower | ( | int | towerIndex | ) | const |
Get HexPrism for a tower.
towerIndex | int index of hexagonal tower |
Definition at line 459 of file DetectorGeometry.cxx.
References ecalDepth_, ecalHexReader_, and ecalZeroLayer_.
|
inlinestatic |
Get the single instance of this class.
Definition at line 59 of file DetectorGeometry.h.
Referenced by eventdisplay::Objects::draw(), eventdisplay::Objects::draw(), eventdisplay::Objects::draw(), eventdisplay::Objects::draw(), eventdisplay::EveDetectorGeometry::drawECAL(), eventdisplay::EveDetectorGeometry::drawHCAL(), and eventdisplay::EveDetectorGeometry::drawRecoilTracker().
double eventdisplay::DetectorGeometry::getRotAngle | ( | int | layerID, |
int | moduleID | ||
) | const |
Get Rotation Angle around z-axis for the input layerID and moduleID.
layerID | index for layer of recoil module |
moduleID | index for module of recoil module |
Definition at line 478 of file DetectorGeometry.cxx.
References recoilModuleAngle_.
Referenced by getBoundingBox().
|
private |
Total depth of ECAL (length in Z direction)
Definition at line 186 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getHexTower().
|
private |
Helper class to calculate (x,y) coordinate from hexagons.
Definition at line 192 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), getHexPrism(), and getHexTower().
|
private |
Thickness of sensitive Si layers.
Definition at line 183 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getHexPrism().
|
private |
z-coordinate of plane for first ecal layer [mm]
Definition at line 189 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getHexTower().
|
private |
Thickness of the layers in each seciton [mm].
Definition at line 165 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), getBoundingBox(), and getBoundingBox().
|
private |
Length of Scintillator Strip [mm].
Definition at line 156 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getBoundingBox().
|
private |
Number of layers in each section.
Definition at line 150 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getBoundingBox().
|
private |
Number of strips per layer in each section.
Definition at line 153 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getBoundingBox().
|
private |
an example layer number of a vertical layer
Definition at line 168 of file DetectorGeometry.h.
Referenced by DetectorGeometry().
|
private |
Thickness of Scintillator Strip [mm].
Definition at line 174 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getBoundingBox().
|
private |
Uncertainty in timing position along a bar/strip [mm].
Definition at line 171 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getBoundingBox().
|
private |
Width of Scintillator Strip [mm].
Definition at line 177 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), getBoundingBox(), and getBoundingBox().
|
private |
The plane of the zero'th layer of each section [mm].
Definition at line 159 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), getBoundingBox(), and getBoundingBox().
|
private |
The plane of the zero'th strip of each section [mm].
Definition at line 162 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), getBoundingBox(), and getBoundingBox().
|
private |
angular tilt for each module in recoil detector The key in this map is 10*layerID+moduleID
Definition at line 225 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), and getRotAngle().
|
private |
position of each module in recoil detector The key in this map is 10*layerID+moduleID
Definition at line 220 of file DetectorGeometry.h.
Referenced by DetectorGeometry(), getBoundingBox(), and getBoundingBox().
|
private |
Definition at line 213 of file DetectorGeometry.h.
|
private |
Definition at line 207 of file DetectorGeometry.h.
|
private |
Definition at line 209 of file DetectorGeometry.h.
|
private |
Definition at line 211 of file DetectorGeometry.h.
|
private |
Definition at line 215 of file DetectorGeometry.h.
|
private |
Definition at line 205 of file DetectorGeometry.h.
|
private |
Definition at line 203 of file DetectorGeometry.h.
|
private |
Definition at line 197 of file DetectorGeometry.h.
|
private |
Definition at line 199 of file DetectorGeometry.h.
|
private |
Definition at line 201 of file DetectorGeometry.h.