LDMX Software
EcalReconConditions.h
1
2#ifndef ECAL_ECALRECONCONDTIONS_H_
3#define ECAL_ECALRECONCONDTIONS_H_
4
5#include "Conditions/SimpleTableCondition.h"
6#include "DetDescr/EcalID.h"
7
8namespace ecal {
9
18 public:
21 static const std::string CONDITIONS_NAME;
23 static const unsigned int IADC_PEDESTAL = 0;
25 static const unsigned int IADC_GAIN = 1;
27 static const unsigned int ITOT_PEDESTAL = 2;
29 static const unsigned int ITOT_GAIN = 3;
32 static const std::vector<std::string> EXPECTED_COLUMNS;
33
48 bool validate = true);
49
56 double adcPedestal(const ldmx::EcalID& id) const {
57 return the_table_.get(id.raw(), IADC_PEDESTAL);
58 }
59
70 double adcGain(const ldmx::EcalID& id) const {
71 return the_table_.get(id.raw(), IADC_GAIN);
72 }
73
80 double totPedestal(const ldmx::EcalID& id) const {
81 return the_table_.get(id.raw(), ITOT_PEDESTAL);
82 }
83
94 double totGain(const ldmx::EcalID& id) const {
95 return the_table_.get(id.raw(), ITOT_GAIN);
96 }
97
98 private:
101}; // EcalReconConditions
102
103} // namespace ecal
104
105#endif // ECAL_ECALRECONCONDITIONS_H_
Class that defines an ECal detector ID with a cell number.
T get(unsigned int id, unsigned int col) const
Get an entry by DetectorId and number.
Class to wrap around an double table of conditions.
double adcPedestal(const ldmx::EcalID &id) const
get the ADC pedestal
const conditions::DoubleTableCondition & the_table_
reference to the table of conditions storing the chip conditions
static const unsigned int IADC_PEDESTAL
column index for ADC pedestal
static const unsigned int ITOT_GAIN
column index for TOT gain
double adcGain(const ldmx::EcalID &id) const
get the ADC gain
static const unsigned int IADC_GAIN
column index for ADC threshold
double totPedestal(const ldmx::EcalID &id) const
get the TOT pedestal
static const std::vector< std::string > EXPECTED_COLUMNS
expected order of column names matching the above indices (must match the indices above)
static const std::string CONDITIONS_NAME
the name of the EcalReconConditions table (must match python registration name)
double totGain(const ldmx::EcalID &id) const
get the TOT gain
static const unsigned int ITOT_PEDESTAL
column index for TOT pedestal
Extension of DetectorID providing access to ECal layers and cell numbers in a hex grid.
Definition EcalID.h:20