LDMX Software
DetectorGeometry.h
Go to the documentation of this file.
1
7#ifndef EVENTDISPLAY_DETECTORGEOMETRY_H
8#define EVENTDISPLAY_DETECTORGEOMETRY_H
9
10// STL
11#include <cmath> //sqrt
12#include <iostream> //cerr
13#include <map> //storage maps
14#include <memory> //unique_ptr
15#include <utility> //BoundingBox
16#include <vector> //BoundingBox
17
18// LDMX Framework
19#include "DetDescr/EcalHexReadout.h"
20#include "DetDescr/EcalID.h"
21#include "DetDescr/HcalID.h"
22#include "Ecal/Event/EcalHit.h"
23#include "Hcal/Event/HcalHit.h"
24#include "SimCore/Event/SimTrackerHit.h" //recoil hits
25
26namespace eventdisplay {
27
35typedef std::vector<std::pair<double, double> > BoundingBox;
36
41struct HexPrism {
42 double x;
43 double y;
44 double z;
45 double height;
46 double radius;
47};
48
55 public:
59 static const DetectorGeometry &getInstance() {
60 static const DetectorGeometry DETECTOR_GEOMETRY;
61 return DETECTOR_GEOMETRY;
62 }
63
71
80 BoundingBox getBoundingBox(const std::vector<ldmx::HcalHit> &hitVec) const;
81
89
96 HexPrism getHexPrism(const ldmx::EcalID &id) const;
97
104 HexPrism getHexTower(int towerIndex) const;
105
113 double getRotAngle(int layerID, int moduleID) const;
114
124 BoundingBox getBoundingBox(int layerID, int moduleID) const;
125
134 BoundingBox getBoundingBox(const ldmx::SimTrackerHit &recoilHit) const;
135
136 private:
145
147 // HCAL
148
150 std::map<ldmx::HcalID::HcalSection, int> hcalNLayers_;
151
153 std::map<ldmx::HcalID::HcalSection, int> hcalNStrips_;
154
156 std::map<ldmx::HcalID::HcalSection, double> hcalLengthScint_;
157
159 std::map<ldmx::HcalID::HcalSection, double> hcalZeroLayer_;
160
162 std::map<ldmx::HcalID::HcalSection, double> hcalZeroStrip_;
163
165 std::map<ldmx::HcalID::HcalSection, double> hcalLayerThickness_;
166
169
172
175
178
180 // ECAL
181
184
187
190
192 std::unique_ptr<ldmx::EcalHexReadout> ecalHexReader_;
193
195 // RECOIL TRACKER
196
197 double recoilStereoStripLength_;
198
199 double recoilStereoXWidth_;
200
201 double recoilStereoYWidth_;
202
203 double recoilStereoSeparation_;
204
205 double recoilStereoAngle_;
206
207 double recoilMonoStripLength_;
208
209 double recoilMonoXWidth_;
210
211 double recoilMonoYWidth_;
212
213 double recoilMonoSeparation_;
214
215 double recoilSensorThickness_;
216
220 std::map<int, std::vector<double> > recoilModulePos_;
221
225 std::map<int, double> recoilModuleAngle_;
226};
227
228} // namespace eventdisplay
229
230#endif /* EVENTDISPLAY_DETECTORGEOMETRY_H */
std::vector< std::pair< double, double > > BoundingBox
@type BoundingBox
Class that defines an ECal detector ID with a cell number.
Class that stores Stores reconstructed hit information from the HCAL.
Class that defines an HCal sensitive detector.
Class which encapsulates information from a hit in a simulated tracking detector.
Class to translated between detector location (section, layer, strip) and real space.
HexPrism getHexTower(int towerIndex) const
Get HexPrism for a tower.
std::map< ldmx::HcalID::HcalSection, int > hcalNLayers_
Number of layers in each section.
HexPrism getHexPrism(const ldmx::EcalID &id) const
Calculate bounding hexagonal prism for input EcalHit.
double getRotAngle(int layerID, int moduleID) const
Get Rotation Angle around z-axis for the input layerID and moduleID.
double ecalZeroLayer_
z-coordinate of plane for first ecal layer [mm]
double hcalThicknessScint_
Thickness of Scintillator Strip [mm].
DetectorGeometry()
Constructor This is where all the detector constants are set.
std::map< ldmx::HcalID::HcalSection, double > hcalLayerThickness_
Thickness of the layers in each seciton [mm].
std::map< ldmx::HcalID::HcalSection, double > hcalLengthScint_
Length of Scintillator Strip [mm].
std::map< int, std::vector< double > > recoilModulePos_
position of each module in recoil detector The key in this map is 10*layerID+moduleID
std::unique_ptr< ldmx::EcalHexReadout > ecalHexReader_
Helper class to calculate (x,y) coordinate from hexagons.
double ecalSiThickness_
Thickness of sensitive Si layers.
int hcalParityVertical_
an example layer number of a vertical layer
static const DetectorGeometry & getInstance()
Get the single instance of this class.
double hcalUncertaintyTimingPos_
Uncertainty in timing position along a bar/strip [mm].
double ecalDepth_
Total depth of ECAL (length in Z direction)
double hcalWidthScint_
Width of Scintillator Strip [mm].
BoundingBox getBoundingBox(const ldmx::HcalHit &hit) const
Calculate real space coordinates from detector location.
std::map< int, double > recoilModuleAngle_
angular tilt for each module in recoil detector The key in this map is 10*layerID+moduleID
std::map< ldmx::HcalID::HcalSection, int > hcalNStrips_
Number of strips per layer in each section.
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].
Extension of DetectorID providing access to ECal layers and cell numbers in a hex grid.
Definition EcalID.h:20
Stores reconstructed hit information from the HCAL.
Definition HcalHit.h:23
HcalSection
Encodes the section of the HCal based on the 'section' field value.
Definition HcalID.h:24
Represents a simulated tracker hit in the simulation.
Stores the necessary geometry details for a hexagonal prism.