6#ifndef DETDESCR_HCALGEOMETRY_H_
7#define DETDESCR_HCALGEOMETRY_H_
12#include "Framework/Configure/Parameters.h"
13#include "Framework/Exception/Exception.h"
22class HcalGeometryProvider;
27class HcalGeometryProvider;
90 return layer % 2 == back_horizontal_parity_;
101 auto layer_index = layer - 1;
137 auto layer_index = layer - 1;
145 auto layer_index = layer - 1;
171 bool isPrototype()
const {
return is_prototype_; }
196 const std::vector<double> &globalPosition,
const ldmx::HcalID &
id)
const;
270 int back_horizontal_parity_{};
273 int side_3d_readout_{};
284 bool is_prototype_{};
Base class for conditions information like pedestals, gains, electronics maps, etc.
Class that defines an HCal sensitive detector.
Base class for all conditions objects, very simple.
Class encapsulating parameters for configuring a processor.
Implementation of HCal strip readout.
std::vector< double > layer_thickness_
Thickness of the layers in each section [mm].
int getNumLayers(int isection) const
Get the number of layers for that section.
bool hasSide3DReadout() const
Does the Side Hcal have 3D readout?
TVector3 getStripCenterPosition(ldmx::HcalID id) const
Get a strip center position from a combined hcal ID.
double getEcalDx() const
Get the length of the Ecal in (x) for the side Hcal.
std::vector< double > zero_layer_
Front of HCal relative to world geometry for each section [mm].
double ecal_dx_
Lenght of the Ecal (in x and y)
void buildStripPositionMap()
Map builder of HcalID and position.
std::vector< std::vector< double > > zero_strip_
The plane of the zero'th strip of each section [mm].
int getZeroStrip(int isection, int layer=1) const
Get the location of the zeroStrip in a given section and layer.
int getNumSections() const
Get the number of sections.
static constexpr const char * CONDITIONS_OBJECT_NAME
Conditions object: The name of the python configuration calling this class (Hcal/python/HcalGeometry....
double getScintillatorLength(ldmx::HcalID id) const
Get the length of a scintillator bar.
void printPositionMap() const
Debugging utility, prints out the HcalID and corresponding value of all entries in the strip_position...
double getScintillatorThickness() const
Get the scitillator thickness.
std::vector< std::vector< double > > scint_length_
Length of strips [mm].
int verbose_
Parameters that apply to all types of geometries Verbosity, not configurable but helpful if developin...
std::vector< std::vector< double > > half_total_width_
Half Total Width of Strips [mm].
double scint_width_
Width of Scintillator Strip [mm].
double getEcalDy() const
Get the length of the Ecal in (y) for the side Hcal.
std::vector< double > rotateGlobalToLocalBarPosition(const std::vector< double > &globalPosition, const ldmx::HcalID &id) const
Coordinates that are given by Geant4 are typically global.
double getScintillatorWidth() const
Get the scitillator width.
double scint_thickness_
Thickness of scintillator.
bool backLayerIsHorizontal(const int layer) const
Check whether a given layer corresponds to a horizontal (scintillator length along the x-axis) or ver...
~HcalGeometry()=default
Class destructor.
std::vector< int > num_layers_
Number of layers in each section.
ScintillatorOrientation
Encodes the orientation of a bar.
int getNumStrips(int isection, int layer=1) const
Get the number of strips per layer for that section and layer.
std::map< ldmx::HcalID, TVector3 > strip_position_map_
Map of the HcalID position of strip centers relative to world geometry.
std::map< ldmx::HcalID, TVector3 > getStripPositionMap() const
Get the strip position map.
std::vector< std::vector< int > > num_strips_
Number of strips per layer in each section and each layer.
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.
int num_sections_
Number of sections.
Implements detector ids for HCal subdetector.