LDMX Software
|
defines the relationship between precision cells and trigger cells and provides geometry information for trigger cells More...
#include <EcalTriggerGeometry.h>
Public Member Functions | |
EcalTriggerGeometry (int symmetry, const ldmx::EcalGeometry *ecalGeom=0) | |
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 cell. | |
ldmx::EcalID | centerInTriggerCell (ldmx::EcalTriggerID triggerCell) const |
Returns the set of precision (full-granularity/DAQ) cell which is the center of the given trigger cell. | |
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 association. | |
std::tuple< double, double, double > | globalPosition (ldmx::EcalTriggerID triggerCell) const |
Returns the center of the given trigger cell in world coordinates. | |
std::pair< double, double > | localPosition (ldmx::EcalTriggerID triggerCell) const |
Returns the local (within module) center of the given trigger cell. | |
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 {"EcalTriggerGeometry"} |
Private Attributes | |
int | symmetry_ |
Identifies what symmetries apply in this case, such as all layers being identical, or all even and odd planes being identical and whether all modules on the same plane are identical. | |
const ldmx::EcalGeometry * | ecalGeometry_ |
Reference to the Ecal geometry used for trigger geometry information. | |
std::map< ldmx::EcalID, ldmx::EcalTriggerID > | precision2trigger_ |
Map of precision cells to trigger cells, under symmetry assumptions. | |
std::map< ldmx::EcalTriggerID, std::vector< ldmx::EcalID > > | trigger2precision_ |
Map of trigger cells to precision cells, under symmetry assumptions. | |
defines the relationship between precision cells and trigger cells and provides geometry information for trigger cells
Definition at line 31 of file EcalTriggerGeometry.h.
ecal::EcalTriggerGeometry::EcalTriggerGeometry | ( | int | symmetry, |
const ldmx::EcalGeometry * | ecalGeom = 0 |
||
) |
lower left-sector
upper-left sector
Definition at line 15 of file EcalTriggerGeometry.cxx.
References precision2trigger_, symmetry_, and trigger2precision_.
ldmx::EcalTriggerID ecal::EcalTriggerGeometry::belongsTo | ( | ldmx::EcalID | precisionCell | ) | const |
Returns which trigger cell this precision cell is associated with, or a null id if there is no such association.
Definition at line 115 of file EcalTriggerGeometry.cxx.
References ldmx::EcalID::cell(), ldmx::EcalID::layer(), ldmx::EcalID::module(), precision2trigger_, and symmetry_.
Referenced by ecal::EcalTrigPrimDigiProducer::produce().
ldmx::EcalID ecal::EcalTriggerGeometry::centerInTriggerCell | ( | ldmx::EcalTriggerID | triggerCell | ) | const |
Returns the set of precision (full-granularity/DAQ) cell which is the center of the given trigger cell.
Definition at line 98 of file EcalTriggerGeometry.cxx.
References ldmx::EcalTriggerID::layer(), ldmx::EcalTriggerID::module(), symmetry_, trigger2precision_, and ldmx::EcalTriggerID::triggercell().
Referenced by globalPosition(), and localPosition().
std::vector< ldmx::EcalID > ecal::EcalTriggerGeometry::contentsOfTriggerCell | ( | ldmx::EcalTriggerID | triggerCell | ) | const |
Returns the set of precision (full-granularity/DAQ) cells which are associated with the given trigger cell.
Definition at line 81 of file EcalTriggerGeometry.cxx.
References ldmx::EcalTriggerID::layer(), ldmx::EcalTriggerID::module(), symmetry_, trigger2precision_, and ldmx::EcalTriggerID::triggercell().
std::tuple< double, double, double > ecal::EcalTriggerGeometry::globalPosition | ( | ldmx::EcalTriggerID | triggerCell | ) | const |
Returns the center of the given trigger cell in world coordinates.
depends on Ecal Geometry (ldmx::EcalGeometry)
C++17's structured bindings is helpful here
Definition at line 131 of file EcalTriggerGeometry.cxx.
References centerInTriggerCell(), ecalGeometry_, and ldmx::EcalGeometry::getPosition().
Referenced by trigger::TrigEcalClusterProducer::produce().
std::pair< double, double > ecal::EcalTriggerGeometry::localPosition | ( | ldmx::EcalTriggerID | triggerCell | ) | const |
Returns the local (within module) center of the given trigger cell.
depends on Ecal Geometry (ldmx::EcalGeometry)
Definition at line 138 of file EcalTriggerGeometry.cxx.
References ldmx::EcalID::cell(), centerInTriggerCell(), ecalGeometry_, and ldmx::EcalGeometry::getPositionInModule().
|
staticconstexpr |
Definition at line 33 of file EcalTriggerGeometry.h.
|
private |
Reference to the Ecal geometry used for trigger geometry information.
Definition at line 85 of file EcalTriggerGeometry.h.
Referenced by globalPosition(), and localPosition().
|
private |
Map of precision cells to trigger cells, under symmetry assumptions.
Definition at line 88 of file EcalTriggerGeometry.h.
Referenced by belongsTo(), and EcalTriggerGeometry().
|
private |
Identifies what symmetries apply in this case, such as all layers being identical, or all even and odd planes being identical and whether all modules on the same plane are identical.
Definition at line 83 of file EcalTriggerGeometry.h.
Referenced by belongsTo(), centerInTriggerCell(), contentsOfTriggerCell(), and EcalTriggerGeometry().
|
private |
Map of trigger cells to precision cells, under symmetry assumptions.
Definition at line 91 of file EcalTriggerGeometry.h.
Referenced by centerInTriggerCell(), contentsOfTriggerCell(), and EcalTriggerGeometry().