LDMX Software
HcalReconConditions.h
1
2#ifndef HCAL_HCALRECONCONDTIONS_H_
3#define HCAL_HCALRECONCONDTIONS_H_
4
5#include "Conditions/SimpleTableCondition.h"
6#include "DetDescr/HcalDigiID.h"
7
8namespace hcal {
9
18 public:
20 static const unsigned int i_m_adc_i = 0;
22 static const unsigned int i_cut_point_tot = 1;
24 static const unsigned int i_high_slope = 2;
26 static const unsigned int i_high_offset = 3;
28 static const unsigned int i_low_slope = 4;
30 static const unsigned int i_low_power = 5;
32 static const unsigned int i_lower_offset = 6;
34 static const unsigned int i_tot_not = 7;
36 static const unsigned int i_channel = 8;
38 static const unsigned int i_flagged = 9;
41 static const std::string CONDITIONS_NAME;
42
53 const conditions::DoubleTableCondition& tot_calib,
54 const conditions::DoubleTableCondition& toa_calib);
55
63 double adcPedestal(const ldmx::HcalDigiID& id, int idx = 0) const {
64 return adc_pedestals_.get(id.raw(), idx);
65 }
66
77 double adcGain(const ldmx::HcalDigiID& id, int idx = 0) const {
78 return adc_gains_.get(id.raw(), idx);
79 }
80
89 bool is_adc(const ldmx::HcalDigiID& id, double sum_tot) const;
90
102 double linearize(const ldmx::HcalDigiID& id, double sum_tot) const;
103
113 double totCalib(const ldmx::HcalDigiID& id, int idx = 0) const {
114 return tot_calibs_.get(id.raw(), idx);
115 }
116
124 double toaCalib(const ldmx::HcalDigiID& id, int idx = 0) const {
125 return toa_calibs_.get(id.raw(), idx);
126 }
127
128 private:
137}; // HcalReconConditions
138
139} // namespace hcal
140
141#endif // HCAL_HCALRECONCONDITIONS_H_
T get(unsigned int id, unsigned int col) const
Get an entry by DetectorId and number.
Base class for all conditions objects, very simple.
Class to wrap around the various recon condition tables.
static const unsigned int i_lower_offset
index of lower_offset in tot_calib table
static const unsigned int i_high_offset
index of high_offset in tot_calib table
double adcGain(const ldmx::HcalDigiID &id, int idx=0) const
get the ADC gain
static const unsigned int i_flagged
index of flagged in tot_calib table
bool is_adc(const ldmx::HcalDigiID &id, double sum_tot) const
check if the input digi is in ADC mode (or not) using the digi id and its evaluated sum tot
const conditions::DoubleTableCondition & adc_pedestals_
reference to the table of conditions storing the adc pedestals
double linearize(const ldmx::HcalDigiID &id, double sum_tot) const
linearize the input sum_tot for the input channel into unified amplitude units
static const std::string CONDITIONS_NAME
the name of the HcalReconConditions table (must match python registration name)
double totCalib(const ldmx::HcalDigiID &id, int idx=0) const
get a TOT calibration value
double adcPedestal(const ldmx::HcalDigiID &id, int idx=0) const
get the ADC pedestal
static const unsigned int i_m_adc_i
index of m_adc_i in tot_calib table
static const unsigned int i_channel
index of channel in tot_calib table
const conditions::DoubleTableCondition & tot_calibs_
reference to the table of conditions storing the tot calibrations
static const unsigned int i_high_slope
index of high_slope in tot_calib table
static const unsigned int i_cut_point_tot
index of cut_point_tot in tot_calib table
double toaCalib(const ldmx::HcalDigiID &id, int idx=0) const
get a TOA calibration value
static const unsigned int i_tot_not
index of tot_not in tot_calib table
static const unsigned int i_low_slope
index of low_slope in tot_calib table
const conditions::DoubleTableCondition & adc_gains_
reference to the table of conditions storing the adc gains
const conditions::DoubleTableCondition & toa_calibs_
reference to the table of conditions storing the toa calibrations
static const unsigned int i_low_power
index of low_power in tot_calib table
Extension of HcalAbstractID providing access to HCal digi information.
Definition HcalDigiID.h:13