LDMX Software
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
hcal::HcalTriggerGeometry Class Reference

defines the relationship between HCal strips and CMB quad trigger primitives and provides geometry information for trigger primitives More...

#include <HcalTriggerGeometry.h>

Public Member Functions

 HcalTriggerGeometry (const ldmx::HcalGeometry *hcalGeom=0)
 
std::vector< ldmx::HcalDigiIDcontentsOfQuad (ldmx::HcalTriggerID triggerCell) const
 Returns the set of precision (full-granularity/DAQ) cells which are associated with the given trigger cell.
 
std::vector< ldmx::HcalDigiIDcontentsOfSTQ (ldmx::HcalTriggerID triggerCell) const
 
ldmx::HcalTriggerID belongsToQuad (ldmx::HcalDigiID precisionCell) const
 Returns which trigger cell this precision cell is associated with, or a null id if there is no such association.
 
ldmx::HcalTriggerID belongsToSTQ (ldmx::HcalDigiID precisionCell) const
 
- 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 {"HcalTriggerGeometry"}
 

Private Attributes

const ldmx::HcalGeometryhcalGeometry_
 Reference to the Hcal geometry used for trigger geometry information.
 

Detailed Description

defines the relationship between HCal strips and CMB quad trigger primitives and provides geometry information for trigger primitives

Definition at line 25 of file HcalTriggerGeometry.h.

Constructor & Destructor Documentation

◆ HcalTriggerGeometry()

hcal::HcalTriggerGeometry::HcalTriggerGeometry ( const ldmx::HcalGeometry hcalGeom = 0)

Definition at line 12 of file HcalTriggerGeometry.cxx.

13 : ConditionsObject(CONDITIONS_OBJECT_NAME), hcalGeometry_{hcalGeom} {}
ConditionsObject(const std::string &name)
Class constructor.
const ldmx::HcalGeometry * hcalGeometry_
Reference to the Hcal geometry used for trigger geometry information.

Member Function Documentation

◆ belongsToQuad()

ldmx::HcalTriggerID hcal::HcalTriggerGeometry::belongsToQuad ( ldmx::HcalDigiID  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 45 of file HcalTriggerGeometry.cxx.

46 {
47 return ldmx::HcalTriggerID(precisionCell.section(), precisionCell.layer(),
48 precisionCell.strip() / 4, precisionCell.end());
49}
int strip() const
Get the value of the 'strip' field from the ID.
Definition HcalDigiID.h:99
int section() const
Get the value of the 'section' field from the ID.
Definition HcalDigiID.h:75
int layer() const
Get the value of the layer field from the ID.
Definition HcalDigiID.h:81
int end() const
Get the value of the 'end' field from the ID.
Definition HcalDigiID.h:105
Extension of DetectorID providing access to HCal trigger cell.

References ldmx::HcalDigiID::end(), ldmx::HcalDigiID::layer(), ldmx::HcalDigiID::section(), and ldmx::HcalDigiID::strip().

Referenced by hcal::HcalTrigPrimDigiProducer::produce().

◆ belongsToSTQ()

ldmx::HcalTriggerID hcal::HcalTriggerGeometry::belongsToSTQ ( ldmx::HcalDigiID  precisionCell) const

Definition at line 51 of file HcalTriggerGeometry.cxx.

52 {
53 // 2x2 groups of quads, with "superlayers" like:
54 // 0 1 0 1 2 3 2 3 ...
55 // V H V H V H V H ...
56 int layer = precisionCell.layer();
57 int superlayer = 2 * (layer / 4) + (layer % 4) % 2;
58 return ldmx::HcalTriggerID(precisionCell.section(), superlayer,
59 precisionCell.strip() / 8, precisionCell.end());
60}

◆ contentsOfQuad()

std::vector< ldmx::HcalDigiID > hcal::HcalTriggerGeometry::contentsOfQuad ( ldmx::HcalTriggerID  triggerCell) const

Returns the set of precision (full-granularity/DAQ) cells which are associated with the given trigger cell.

Definition at line 15 of file HcalTriggerGeometry.cxx.

16 {
17 std::vector<ldmx::HcalDigiID> retval;
18 for (int iStrip = 0; iStrip < 4; iStrip++) {
19 int strip = iStrip + 4 * triggerCell.superstrip();
20 if (strip >= hcalGeometry_->getNumStrips(triggerCell.section())) break;
21 retval.push_back(ldmx::HcalDigiID(
22 triggerCell.section(), triggerCell.layer(), strip, triggerCell.end()));
23 }
24 return retval;
25}
Extension of HcalAbstractID providing access to HCal digi information.
Definition HcalDigiID.h:13
int getNumStrips(int isection, int layer=1) const
Get the number of strips per layer for that section and layer.
int superstrip() const
Get the value of the 'superstrip' field from the ID.
int end() const
Get the value of the 'end' field from the ID.
int layer() const
Get the value of the layer field from the ID.

References ldmx::HcalTriggerID::end(), ldmx::HcalTriggerID::layer(), and ldmx::HcalTriggerID::superstrip().

Referenced by hcal::HcalTrigPrimDigiProducer::produce().

◆ contentsOfSTQ()

std::vector< ldmx::HcalDigiID > hcal::HcalTriggerGeometry::contentsOfSTQ ( ldmx::HcalTriggerID  triggerCell) const

Definition at line 27 of file HcalTriggerGeometry.cxx.

28 {
29 std::vector<ldmx::HcalDigiID> retval;
30 for (int iStrip = 0; iStrip < 8; iStrip++) {
31 for (int iLayer = 0; iLayer < 2; iLayer++) {
32 int strip = iStrip + 8 * triggerCell.superstrip();
33 if (strip >= hcalGeometry_->getNumStrips(triggerCell.section())) continue;
34 int tlayer = triggerCell.layer();
35 int player = 2 * (tlayer + iStrip) - tlayer % 2;
36 if (player >= hcalGeometry_->getNumLayers(triggerCell.section()))
37 continue;
38 retval.push_back(ldmx::HcalDigiID(triggerCell.section(), player, strip,
39 triggerCell.end()));
40 }
41 }
42 return retval;
43}
int getNumLayers(int isection) const
Get the number of layers for that section.

Member Data Documentation

◆ CONDITIONS_OBJECT_NAME

constexpr const char* hcal::HcalTriggerGeometry::CONDITIONS_OBJECT_NAME {"HcalTriggerGeometry"}
staticconstexpr

Definition at line 27 of file HcalTriggerGeometry.h.

27{"HcalTriggerGeometry"};

◆ hcalGeometry_

const ldmx::HcalGeometry* hcal::HcalTriggerGeometry::hcalGeometry_
private

Reference to the Hcal geometry used for trigger geometry information.

Definition at line 49 of file HcalTriggerGeometry.h.


The documentation for this class was generated from the following files: