1#include "Hcal/HcalReconConditions.h"
16 adc_pedestals_{adc_ped},
18 tot_calibs_{tot_calib},
19 toa_calibs_{toa_calib} {}
22 double sum_tot)
const {
39 double sum_tot)
const {
86 const std::string& tagname,
90 tagname, parameters, proc) {
92 EXCEPTION_RAISE(
"BadConfig",
93 "The name provided to HcalReconConditionsProvider " +
94 name +
" is not equal to the expected name " +
119 auto [adc_gain_co, adc_gain_iov] =
122 auto [tot_calib_co, tot_calib_iov] =
124 auto [toa_calib_co, toa_calib_iov] =
130 [[maybe_unused]]
auto min_iov = adc_ped_iov;
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.
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.
std::pair< const ConditionsObject *, ConditionsIOV > requestParentCondition(const std::string &name, const ldmx::EventHeader &context)
Request another condition needed to construct this condition.
Base class for all conditions objects, very simple.
Class which represents the process under execution.
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
a helpful interface for grabbing the parent conditions at once
virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOV > getCondition(const ldmx::EventHeader &context) final override
Get the wrapped condition.
std::string adc_gain_
name of condition object for hcal adc gains
std::string adc_ped_
name of condition object for hcal adc pedestals
std::string tot_calib_
name of condition object for hcal tot calibrations
HcalReconConditionsProvider(const std::string &name, const std::string &tagname, const framework::config::Parameters ¶meters, framework::Process &proc)
Retrieve the name of the parent conditions from the configuration.
std::string toa_calib_
name of condition object for hcal toa calibrations
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
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
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
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.
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
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
static const unsigned int i_low_power
index of low_power in tot_calib table
Extension of HcalAbstractID providing access to HCal digi information.
All classes in the ldmx-sw project use this namespace.