LDMX Software
EcalTriggerGeometry.h
Go to the documentation of this file.
1
8#ifndef ECAL_ECALTRIGGERGEOMETRY_H_
9#define ECAL_ECALTRIGGERGEOMETRY_H_
10
11// LDMX
12#include "DetDescr/EcalID.h"
15
16// STL
17#include <map>
18#include <vector>
19
20namespace ldmx {
21class EcalGeometry;
22}
23
24namespace ecal {
25
32 public:
33 static constexpr const char* CONDITIONS_OBJECT_NAME{"EcalTriggerGeometry"};
34
35 EcalTriggerGeometry(int symmetry, const ldmx::EcalGeometry* ecalGeom = 0);
36
41 std::vector<ldmx::EcalID> contentsOfTriggerCell(
42 ldmx::EcalTriggerID triggerCell) const;
43
49
54 ldmx::EcalTriggerID belongsTo(ldmx::EcalID precisionCell) const;
55
67 std::tuple<double, double, double> globalPosition(
68 ldmx::EcalTriggerID triggerCell) const;
69
75 std::pair<double, double> localPosition(
76 ldmx::EcalTriggerID triggerCell) const;
77
78 private:
88 std::map<ldmx::EcalID, ldmx::EcalTriggerID> precision2trigger_;
91 std::map<ldmx::EcalTriggerID, std::vector<ldmx::EcalID> > trigger2precision_;
92};
93
94} // namespace ecal
95
96#endif // ECAL_ECALTRIGGERGEOMETRY_H_
Base class for conditions information like pedestals, gains, electronics maps, etc.
Class that defines an ECal detector ID with a cell number.
Class that defines an ECal trigger cell detector ID.
defines the relationship between precision cells and trigger cells and provides geometry information ...
std::vector< ldmx::EcalID > contentsOfTriggerCell(ldmx::EcalTriggerID triggerCell) const
Returns the set of precision (full-granularity/DAQ) cells which are associated with the given trigger...
const ldmx::EcalGeometry * ecalGeometry_
Reference to the Ecal geometry used for trigger geometry information.
std::pair< double, double > localPosition(ldmx::EcalTriggerID triggerCell) const
Returns the local (within module) center of the given trigger cell.
int symmetry_
Identifies what symmetries apply in this case, such as all layers being identical,...
std::map< ldmx::EcalTriggerID, std::vector< ldmx::EcalID > > trigger2precision_
Map of trigger cells to precision cells, under symmetry assumptions.
ldmx::EcalTriggerID belongsTo(ldmx::EcalID precisionCell) const
Returns which trigger cell this precision cell is associated with, or a null id if there is no such a...
std::map< ldmx::EcalID, ldmx::EcalTriggerID > precision2trigger_
Map of precision cells to trigger cells, under symmetry assumptions.
std::tuple< double, double, double > globalPosition(ldmx::EcalTriggerID triggerCell) const
Returns the center of the given trigger cell in world coordinates.
ldmx::EcalID centerInTriggerCell(ldmx::EcalTriggerID triggerCell) const
Returns the set of precision (full-granularity/DAQ) cell which is the center of the given trigger cel...
Base class for all conditions objects, very simple.
Translation between real-space positions and cell IDs within the ECal.
Extension of DetectorID providing access to ECal layers and cell numbers in a hex grid.
Definition EcalID.h:20
Extension of DetectorID providing access to ECal trigger cell information.