LDMX Software
|
Class to wrap around the various recon condition tables. More...
#include <HcalReconConditions.h>
Public Member Functions | |
HcalReconConditions (const conditions::DoubleTableCondition &adc_ped, const conditions::DoubleTableCondition &adc_gain, const conditions::DoubleTableCondition &tot_calib, const conditions::DoubleTableCondition &toa_calib) | |
Provide the necessary tables to hold in one conditions object. | |
double | adcPedestal (const ldmx::HcalDigiID &id, int idx=0) const |
get the ADC pedestal | |
double | adcGain (const ldmx::HcalDigiID &id, int idx=0) const |
get the ADC gain | |
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 | |
double | linearize (const ldmx::HcalDigiID &id, double sum_tot) const |
linearize the input sum_tot for the input channel into unified amplitude units | |
double | totCalib (const ldmx::HcalDigiID &id, int idx=0) const |
get a TOT calibration value | |
double | toaCalib (const ldmx::HcalDigiID &id, int idx=0) const |
get a TOA calibration value | |
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 const unsigned int | i_m_adc_i = 0 |
index of m_adc_i in tot_calib table | |
static const unsigned int | i_cut_point_tot = 1 |
index of cut_point_tot in tot_calib table | |
static const unsigned int | i_high_slope = 2 |
index of high_slope in tot_calib table | |
static const unsigned int | i_high_offset = 3 |
index of high_offset in tot_calib table | |
static const unsigned int | i_low_slope = 4 |
index of low_slope in tot_calib table | |
static const unsigned int | i_low_power = 5 |
index of low_power in tot_calib table | |
static const unsigned int | i_lower_offset = 6 |
index of lower_offset in tot_calib table | |
static const unsigned int | i_tot_not = 7 |
index of tot_not in tot_calib table | |
static const unsigned int | i_channel = 8 |
index of channel in tot_calib table | |
static const unsigned int | i_flagged = 9 |
index of flagged in tot_calib table | |
static const std::string | CONDITIONS_NAME = "HcalReconConditions" |
the name of the HcalReconConditions table (must match python registration name) | |
Private Attributes | |
const conditions::DoubleTableCondition & | adc_pedestals_ |
reference to the table of conditions storing the adc pedestals | |
const conditions::DoubleTableCondition & | adc_gains_ |
reference to the table of conditions storing the adc gains | |
const conditions::DoubleTableCondition & | tot_calibs_ |
reference to the table of conditions storing the tot calibrations | |
const conditions::DoubleTableCondition & | toa_calibs_ |
reference to the table of conditions storing the toa calibrations | |
Class to wrap around the various recon condition tables.
We expect all of the condition tables to only have two columns (the DetID and the condition itself) so that the column number for getting a value from any of them is zero.
Definition at line 17 of file HcalReconConditions.h.
hcal::HcalReconConditions::HcalReconConditions | ( | const conditions::DoubleTableCondition & | adc_ped, |
const conditions::DoubleTableCondition & | adc_gain, | ||
const conditions::DoubleTableCondition & | tot_calib, | ||
const conditions::DoubleTableCondition & | toa_calib | ||
) |
Provide the necessary tables to hold in one conditions object.
[in] | adc_ped | double table of ADC pedestals |
[in] | adc_gain | double table of ADC gains |
[in] | tot_calib | double table of TOT calibrations |
[in] | toa_calib | double table of TOA calibrations |
Definition at line 10 of file HcalReconConditions.cxx.
|
inline |
get the ADC gain
The ADC gain converts the ADC counts measuring a voltage amplitude into an estimated charge deposition [fC].
[in] | id | raw ID for specific chip |
Definition at line 77 of file HcalReconConditions.h.
References adc_gains_, and conditions::HomogenousTableCondition< T >::get().
|
inline |
get the ADC pedestal
[in] | id | HCal Digi ID for specific chip |
[in] | index | of column in condition file |
Definition at line 63 of file HcalReconConditions.h.
References adc_pedestals_, and conditions::HomogenousTableCondition< T >::get().
bool hcal::HcalReconConditions::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
[in] | id | HcalDigiID for the channel |
[in] | sum_tot | already evaluated sum of TOT values |
Definition at line 21 of file HcalReconConditions.cxx.
References i_flagged, i_lower_offset, and totCalib().
double hcal::HcalReconConditions::linearize | ( | const ldmx::HcalDigiID & | id, |
double | sum_tot | ||
) | const |
linearize the input sum_tot for the input channel into unified amplitude units
[in] | id | HcalDigiID for the channel |
[in] | sum_toto | already evaluated sum of TOT values |
Definition at line 38 of file HcalReconConditions.cxx.
References i_cut_point_tot, i_high_offset, i_high_slope, i_low_power, i_low_slope, i_lower_offset, i_tot_not, and totCalib().
|
inline |
get a TOA calibration value
[in] | id | HCal Digi ID for specific chip |
[in] | index | of column in condition file |
Definition at line 124 of file HcalReconConditions.h.
References conditions::HomogenousTableCondition< T >::get(), and toa_calibs_.
|
inline |
get a TOT calibration value
The column indices are stored as static members of this class.
[in] | id | HCal Digi ID for specific chip |
[in] | index | of column in condition file |
Definition at line 113 of file HcalReconConditions.h.
References conditions::HomogenousTableCondition< T >::get(), and tot_calibs_.
Referenced by is_adc(), and linearize().
|
private |
reference to the table of conditions storing the adc gains
Definition at line 132 of file HcalReconConditions.h.
Referenced by adcGain().
|
private |
reference to the table of conditions storing the adc pedestals
Definition at line 130 of file HcalReconConditions.h.
Referenced by adcPedestal().
|
static |
the name of the HcalReconConditions table (must match python registration name)
Definition at line 41 of file HcalReconConditions.h.
Referenced by hcal::HcalReconConditionsProvider::HcalReconConditionsProvider(), hcal::HcalDoubleEndRecProducer::produce(), hcal::HcalRecProducer::produce(), and hcal::HcalSingleEndRecProducer::produce().
|
static |
index of channel in tot_calib table
Definition at line 36 of file HcalReconConditions.h.
|
static |
index of cut_point_tot in tot_calib table
Definition at line 22 of file HcalReconConditions.h.
Referenced by linearize().
|
static |
index of flagged in tot_calib table
Definition at line 38 of file HcalReconConditions.h.
Referenced by is_adc().
|
static |
index of high_offset in tot_calib table
Definition at line 26 of file HcalReconConditions.h.
Referenced by linearize().
|
static |
index of high_slope in tot_calib table
Definition at line 24 of file HcalReconConditions.h.
Referenced by linearize().
|
static |
index of low_power in tot_calib table
Definition at line 30 of file HcalReconConditions.h.
Referenced by linearize().
|
static |
index of low_slope in tot_calib table
Definition at line 28 of file HcalReconConditions.h.
Referenced by linearize().
|
static |
index of lower_offset in tot_calib table
Definition at line 32 of file HcalReconConditions.h.
Referenced by is_adc(), and linearize().
|
static |
index of m_adc_i in tot_calib table
Definition at line 20 of file HcalReconConditions.h.
|
static |
index of tot_not in tot_calib table
Definition at line 34 of file HcalReconConditions.h.
Referenced by linearize().
|
private |
reference to the table of conditions storing the toa calibrations
Definition at line 136 of file HcalReconConditions.h.
Referenced by toaCalib().
|
private |
reference to the table of conditions storing the tot calibrations
Definition at line 134 of file HcalReconConditions.h.
Referenced by totCalib().