6#ifndef DETDESCR_HCALGEOMETRY_H_
7#define DETDESCR_HCALGEOMETRY_H_
12#include "Framework/Configure/Parameters.h"
15#include "Math/Vector3D.h"
21class HcalGeometryProvider;
26class 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_; }
183 return isection == ldmx::HcalID::HcalSection::BACK;
218 const std::vector<double>& globalPosition,
const ldmx::HcalID&
id)
const;
292 int back_horizontal_parity_{};
295 int side_3d_readout_{};
306 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?
std::vector< int > double_ended_
Explicit layout: section read out at both ends.
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].
std::map< ldmx::HcalID, ROOT::Math::XYZVector > getStripPositionMap() const
Get the strip position map.
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].
ROOT::Math::XYZVector getStripCenterPosition(ldmx::HcalID id) const
Get a strip center position from a combined hcal ID.
std::map< ldmx::HcalID, ROOT::Math::XYZVector > strip_position_map_
Map of the HcalID position of strip centers relative to world geometry.
double getDistanceAlongBar(ldmx::HcalID id, double x, double y, double z) const
Signed distance along the bar from the strip center [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.
bool hasExplicitLayout() const
Are the strip positions given layer by layer (e.g.
static constexpr const char * CONDITIONS_OBJECT_NAME
Conditions object: The name of the python configuration calling this class (Hcal/python/HcalGeometry....
std::vector< std::vector< double > > layer_bar_center_
Explicit layout: world along-bar coordinate of the bar centers [mm].
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].
std::vector< std::vector< double > > layer_z_
Explicit layout: world z of each layer center [mm].
HcalGeometry(const framework::config::Parameters &ps)
Class constructor, for use only by the provider.
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.
bool isDoubleEnded(int isection) const
Are the bars of this section read out at both ends?
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::vector< std::vector< double > > layer_strip_zero_
Explicit layout: world transverse coordinate of strip 0 [mm].
std::vector< std::vector< int > > num_strips_
Number of strips per layer in each section and each layer.
std::vector< std::vector< int > > layer_long_axis_
Explicit layout: 0 = bar long along x, 1 = along y.
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.