1#include "Hcal/HcalTriggerGeometry.h"
13 : ConditionsObject(CONDITIONS_OBJECT_NAME), hcalGeometry_{hcalGeom} {}
15std::vector<ldmx::HcalDigiID> HcalTriggerGeometry::contentsOfQuad(
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;
22 triggerCell.section(), triggerCell.
layer(), strip, triggerCell.
end()));
27std::vector<ldmx::HcalDigiID> HcalTriggerGeometry::contentsOfSTQ(
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()))
48 precisionCell.
strip() / 4, precisionCell.
end());
56 int layer = precisionCell.
layer();
57 int superlayer = 2 * (layer / 4) + (layer % 4) % 2;
59 precisionCell.
strip() / 8, precisionCell.
end());
68 const std::string& tagname,
72 tagname, parameters, process),
73 hcalTriggerGeometry_{nullptr} {}
77 if (hcalTriggerGeometry_ !=
nullptr)
delete hcalTriggerGeometry_;
78 hcalTriggerGeometry_ =
nullptr;
90 if (hcalTriggerGeometry_ ==
nullptr) {
91 std::pair<const framework::ConditionsObject*, framework::ConditionsIOV>
92 cond_hcal_geom = requestParentCondition(
98 return std::make_pair(hcalTriggerGeometry_,
Base class for provider of conditions information like pedestals, gains, electronics maps,...
#define DECLARE_CONDITIONS_PROVIDER_NS(NS, CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
Class that translates HCal ID into positions of strip hits.
be configured to load conditions objects from CSV files.
Class which defines the run/event/type range for which a given condition is valid,...
Base class for all providers of conditions objects.
Base class for all conditions objects, very simple.
Class which represents the process under execution.
Class encapsulating parameters for configuring a processor.
virtual ~HcalTriggerGeometryProvider()
Destructor.
virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOV > getCondition(const ldmx::EventHeader &context)
Provides access to the HcalGeometry or HcalTriggerGeometry.
virtual void releaseConditionsObject(const framework::ConditionsObject *co)
Take no action on release, as the object is permanently owned by the Provider.
HcalTriggerGeometryProvider(const std::string &name, const std::string &tagname, const framework::config::Parameters ¶meters, framework::Process &process)
Class constructor.
defines the relationship between HCal strips and CMB quad trigger primitives and provides geometry in...
Extension of HcalAbstractID providing access to HCal digi information.
int strip() const
Get the value of the 'strip' field from the ID.
int section() const
Get the value of the 'section' field from the ID.
int layer() const
Get the value of the layer field from the ID.
int end() const
Get the value of the 'end' field from the ID.
Implementation of HCal strip readout.
static constexpr const char * CONDITIONS_OBJECT_NAME
Conditions object: The name of the python configuration calling this class (Hcal/python/HcalGeometry....
Extension of DetectorID providing access to HCal trigger cell.
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.