LDMX Software
|
Implementation of HCal strip readout. More...
#include <HcalGeometry.h>
Public Types | |
enum class | ScintillatorOrientation { horizontal = 0 , vertical = 1 , depth = 2 } |
Encodes the orientation of a bar. More... | |
Public Member Functions | |
~HcalGeometry ()=default | |
Class destructor. | |
ScintillatorOrientation | getScintillatorOrientation (const ldmx::HcalID id) const |
TVector3 | getStripCenterPosition (ldmx::HcalID id) const |
Get a strip center position from a combined hcal ID. | |
std::map< ldmx::HcalID, TVector3 > | getStripPositionMap () const |
Get the strip position map. | |
bool | backLayerIsHorizontal (const int layer) const |
Check whether a given layer corresponds to a horizontal (scintillator length along the x-axis) or vertical layer in the back HCal. | |
double | getHalfTotalWidth (int isection, int layer=1) const |
Get the half total width of a layer for a given section(strip) for back(side) Hcal. | |
double | getScintillatorLength (ldmx::HcalID id) const |
Get the length of a scintillator bar. | |
double | getScintillatorWidth () const |
Get the scitillator width. | |
double | getScintillatorThickness () const |
Get the scitillator thickness. | |
int | getNumSections () const |
Get the number of sections. | |
int | getNumLayers (int isection) const |
Get the number of layers for that section. | |
int | getNumStrips (int isection, int layer=1) const |
Get the number of strips per layer for that section and layer. | |
int | getZeroStrip (int isection, int layer=1) const |
Get the location of the zeroStrip in a given section and layer. | |
double | getEcalDx () const |
Get the length of the Ecal in (x) for the side Hcal. | |
double | getEcalDy () const |
Get the length of the Ecal in (y) for the side Hcal. | |
bool | hasSide3DReadout () const |
Does the Side Hcal have 3D readout? | |
bool | isPrototype () const |
std::vector< double > | rotateGlobalToLocalBarPosition (const std::vector< double > &globalPosition, const ldmx::HcalID &id) const |
Coordinates that are given by Geant4 are typically global. | |
Public Member Functions inherited from framework::ConditionsObject | |
ConditionsObject (const std::string &name) | |
Class constructor. | |
virtual | ~ConditionsObject () |
Destructor. | |
std::string | getName () const |
Get the name of this object. | |
Static Public Attributes | |
static constexpr const char * | CONDITIONS_OBJECT_NAME {"HcalGeometry"} |
Conditions object: The name of the python configuration calling this class (Hcal/python/HcalGeometry.py) needs to match the CONDITIONS_OBJECT_NAME exactly. | |
Private Member Functions | |
HcalGeometry (const framework::config::Parameters &ps) | |
Class constructor, for use only by the provider. | |
void | buildStripPositionMap () |
Map builder of HcalID and position. | |
void | printPositionMap (int section) const |
Debugging utility, prints out the HcalID and corresponding value of all entries in the strip_position_map_ for a given section. | |
void | printPositionMap () const |
Debugging utility, prints out the HcalID and corresponding value of all entries in the strip_position_map_. | |
Private Attributes | |
int | verbose_ {0} |
Parameters that apply to all types of geometries Verbosity, not configurable but helpful if developing. | |
double | scint_thickness_ |
Thickness of scintillator. | |
double | scint_width_ |
Width of Scintillator Strip [mm]. | |
std::vector< double > | zero_layer_ |
Front of HCal relative to world geometry for each section [mm]. | |
std::vector< double > | layer_thickness_ |
Thickness of the layers in each section [mm]. | |
std::vector< int > | num_layers_ |
Number of layers in each section. | |
int | num_sections_ |
Number of sections. | |
double | ecal_dx_ |
Lenght of the Ecal (in x and y) | |
double | ecal_dy_ |
double | y_offset_ |
int | back_horizontal_parity_ {} |
int | side_3d_readout_ {} |
std::vector< std::vector< int > > | num_strips_ |
Number of strips per layer in each section and each layer. | |
std::vector< std::vector< double > > | zero_strip_ |
The plane of the zero'th strip of each section [mm]. | |
std::vector< std::vector< double > > | half_total_width_ |
Half Total Width of Strips [mm]. | |
std::vector< std::vector< double > > | scint_length_ |
Length of strips [mm]. | |
bool | is_prototype_ {} |
std::map< ldmx::HcalID, TVector3 > | strip_position_map_ |
Map of the HcalID position of strip centers relative to world geometry. | |
Friends | |
class | hcal::HcalGeometryProvider |
Implementation of HCal strip readout.
Definition at line 34 of file HcalGeometry.h.
|
strong |
Encodes the orientation of a bar.
horizontal : The length of the bar is along the x-axis vertical : The length of the bar is along the y-axis depth : The length of the bar is along the z-axis
Definition at line 50 of file HcalGeometry.h.
|
default |
Class destructor.
Does nothing because the stl containers clean up automatically.
|
private |
Class constructor, for use only by the provider.
ps | Parameters to configure the HcalGeometry |
Definition at line 11 of file HcalGeometry.cxx.
References buildStripPositionMap(), ecal_dx_, framework::config::Parameters::getParameter(), half_total_width_, layer_thickness_, num_layers_, num_sections_, num_strips_, printPositionMap(), scint_length_, scint_thickness_, scint_width_, verbose_, zero_layer_, and zero_strip_.
|
inline |
Check whether a given layer corresponds to a horizontal (scintillator length along the x-axis) or vertical layer in the back HCal.
See the back_horizontal_parity_ member for details.
Definition at line 89 of file HcalGeometry.h.
|
private |
Map builder of HcalID and position.
To build the map we loop over the number of Hcal sections, layers and strips. The Hcal sections range from 0 to 4. (We hard-code the number of sections as seen in HcalID) The Hcal layers range from 1 to NumLayers_[section]. The Hcal strips range from 0 to NumStrips_[section].
Odd layers have horizontal strips. Even layers have vertical strips.
For back Hcal:
Now compute, y(x) position for horizontal(vertical) layers, relative to the center of detector. Strips enumeration starts from -y(-x) stripcenter will be large for +y(+x) and the half width of the strip needs to be subtracted The halfwidth of the scintillator is given by half_total_width_. The x(y) position is set to the center of the strip (0).
For side Hcal before 3D readout
Definition at line 171 of file HcalGeometry.cxx.
References ecal_dx_, getHalfTotalWidth(), getNumStrips(), getScintillatorLength(), getScintillatorWidth(), getZeroStrip(), layer_thickness_, num_layers_, num_sections_, scint_thickness_, scint_width_, strip_position_map_, and zero_layer_.
Referenced by HcalGeometry().
|
inline |
Get the length of the Ecal in (x) for the side Hcal.
Definition at line 152 of file HcalGeometry.h.
References ecal_dx_.
|
inline |
Get the length of the Ecal in (y) for the side Hcal.
Definition at line 157 of file HcalGeometry.h.
|
inline |
Get the half total width of a layer for a given section(strip) for back(side) Hcal.
section | |
layer |
Definition at line 99 of file HcalGeometry.h.
References half_total_width_.
Referenced by buildStripPositionMap().
|
inline |
Get the number of layers for that section.
Definition at line 131 of file HcalGeometry.h.
References num_layers_.
|
inline |
Get the number of sections.
Definition at line 126 of file HcalGeometry.h.
References num_sections_.
|
inline |
Get the number of strips per layer for that section and layer.
Definition at line 136 of file HcalGeometry.h.
References num_strips_.
Referenced by buildStripPositionMap(), and printPositionMap().
|
inline |
Get the length of a scintillator bar.
id | The HcalID of the bar |
id
[mm] Definition at line 110 of file HcalGeometry.h.
References scint_length_.
Referenced by buildStripPositionMap().
HcalGeometry::ScintillatorOrientation ldmx::HcalGeometry::getScintillatorOrientation | ( | const ldmx::HcalID | id | ) | const |
Definition at line 100 of file HcalGeometry.cxx.
|
inline |
Get the scitillator thickness.
Definition at line 121 of file HcalGeometry.h.
References scint_thickness_.
|
inline |
Get the scitillator width.
Definition at line 116 of file HcalGeometry.h.
References scint_width_.
Referenced by buildStripPositionMap().
|
inline |
Get a strip center position from a combined hcal ID.
std::out_of_range | if HcalID is not on map. |
HcalID |
Definition at line 74 of file HcalGeometry.h.
References strip_position_map_.
Referenced by printPositionMap().
|
inline |
Get the strip position map.
Definition at line 81 of file HcalGeometry.h.
References strip_position_map_.
|
inline |
Get the location of the zeroStrip in a given section and layer.
Definition at line 144 of file HcalGeometry.h.
References zero_strip_.
Referenced by buildStripPositionMap().
|
inline |
Does the Side Hcal have 3D readout?
In other words, does the side hcal layers alter in scintillator direction (z vs x/y).
Definition at line 165 of file HcalGeometry.h.
|
inline |
Definition at line 171 of file HcalGeometry.h.
|
inlineprivate |
Debugging utility, prints out the HcalID and corresponding value of all entries in the strip_position_map_.
For printing only one of the sections, see the overloaded version of this function taking a section parameter.
Definition at line 231 of file HcalGeometry.h.
References num_sections_, and printPositionMap().
Referenced by HcalGeometry(), and printPositionMap().
|
private |
Debugging utility, prints out the HcalID and corresponding value of all entries in the strip_position_map_ for a given section.
section | The section number to print, see HcalID for details. |
Definition at line 156 of file HcalGeometry.cxx.
References getNumStrips(), getStripCenterPosition(), and num_layers_.
std::vector< double > ldmx::HcalGeometry::rotateGlobalToLocalBarPosition | ( | const std::vector< double > & | globalPosition, |
const ldmx::HcalID & | id | ||
) | const |
Coordinates that are given by Geant4 are typically global.
These can be transformed into corresponding local coordinates of a volume with a TopTransform. However, a TopTransform translates to the local bar but does not do the rotation (this is because we don't do a rotation when placing the bars in the GDML). This is used primarily for recording pre and post step positions in local coordinates of the volume in HcalSD.
the logic below does the rotation to the local coordiates where x : short transverse side of bar y : long transverse side of bar z : along length of bar
Definition at line 49 of file HcalGeometry.cxx.
|
friend |
Definition at line 205 of file HcalGeometry.h.
|
private |
Definition at line 270 of file HcalGeometry.h.
|
staticconstexpr |
Conditions object: The name of the python configuration calling this class (Hcal/python/HcalGeometry.py) needs to match the CONDITIONS_OBJECT_NAME exactly.
Definition at line 42 of file HcalGeometry.h.
Referenced by simcore::HcalSD::decodeCopyNumber(), hcal::HcalTriggerGeometryProvider::getCondition(), simcore::HcalSD::ProcessHits(), hcal::HcalClusterProducer::produce(), hcal::HcalDigiProducer::produce(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), and hcal::HcalSingleEndRecProducer::produce().
|
private |
Lenght of the Ecal (in x and y)
Definition at line 261 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), getEcalDx(), and HcalGeometry().
|
private |
Definition at line 262 of file HcalGeometry.h.
|
private |
Half Total Width of Strips [mm].
Definition at line 280 of file HcalGeometry.h.
Referenced by getHalfTotalWidth(), and HcalGeometry().
|
private |
Definition at line 284 of file HcalGeometry.h.
|
private |
Thickness of the layers in each section [mm].
Definition at line 252 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), and HcalGeometry().
|
private |
Number of layers in each section.
Definition at line 255 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), getNumLayers(), HcalGeometry(), and printPositionMap().
|
private |
Number of sections.
Definition at line 258 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), getNumSections(), HcalGeometry(), and printPositionMap().
|
private |
Number of strips per layer in each section and each layer.
Definition at line 276 of file HcalGeometry.h.
Referenced by getNumStrips(), and HcalGeometry().
|
private |
Length of strips [mm].
Definition at line 282 of file HcalGeometry.h.
Referenced by getScintillatorLength(), and HcalGeometry().
|
private |
Thickness of scintillator.
Definition at line 243 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), getScintillatorThickness(), and HcalGeometry().
|
private |
Width of Scintillator Strip [mm].
Definition at line 246 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), getScintillatorWidth(), and HcalGeometry().
|
private |
Definition at line 273 of file HcalGeometry.h.
|
private |
Map of the HcalID position of strip centers relative to world geometry.
The map is not configurable and is calculated by buildStripPositionMap().
Definition at line 290 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), getStripCenterPosition(), and getStripPositionMap().
|
private |
Parameters that apply to all types of geometries Verbosity, not configurable but helpful if developing.
Definition at line 240 of file HcalGeometry.h.
Referenced by HcalGeometry().
|
private |
Definition at line 265 of file HcalGeometry.h.
|
private |
Front of HCal relative to world geometry for each section [mm].
Definition at line 249 of file HcalGeometry.h.
Referenced by buildStripPositionMap(), and HcalGeometry().
|
private |
The plane of the zero'th strip of each section [mm].
Definition at line 278 of file HcalGeometry.h.
Referenced by getZeroStrip(), and HcalGeometry().