1 #ifndef WIRECELLSIGPROC_OMNICHANNELNOISEDB 2 #define WIRECELLSIGPROC_OMNICHANNELNOISEDB 18 #include <unordered_map> 96 double from_gain,
double from_shaping,
97 double to_gain,
double to_shaping,
136 std::unordered_map<int, ChannelInfo>
m_db;
139 auto it = m_db.find(ch);
140 if (it == m_db.end()) {
157 shared_filter_t
make_filter(std::complex<float> defval = std::complex<float>(1,0));
163 shared_filter_t
get_reconfig(
double from_gain,
double from_shaping,
164 double to_gain,
double to_shaping);
std::unordered_map< int, shared_filter_t > m_rcrc_cache
std::vector< int > channel_group_t
virtual float coherent_nf_adc_limit(int channel) const
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
virtual const filter_t & config(int channel) const
Return the filter to correct any wrongly configured channels.
virtual const filter_t & noise(int channel) const
Return the filter to attenuate noise.
shared_filter_t get_reconfig(double from_gain, double from_shaping, double to_gain, double to_shaping)
virtual float coherent_nf_min_adc_limit(int channel) const
boost::error_info< struct tag_errmsg, std::string > errmsg
virtual float coherent_nf_decon_limit1(int channel) const
shared_filter_t parse_rcrc(Json::Value jrcrc, int nrc)
virtual double sample_time() const
FIXME: how to handle state changes?
IFieldResponse::pointer m_fr
std::unordered_map< int, shared_filter_t > m_response_cache
virtual int pad_window_back(int channel) const
std::vector< int > parse_channels(const Json::Value &jchannels)
virtual double min_rms_cut(int channel) const
const ChannelInfo & dbget(int ch) const
shared_filter_t default_filter()
ChannelInfo & get_ci(int chid)
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
std::unordered_map< int, shared_filter_t > m_waveform_cache
QTextStream & reset(QTextStream &s)
virtual void set_bad_channels(const channel_group_t &bad)
double parse_gain(Json::Value jreconfig)
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
virtual float coherent_nf_roi_min_max_ratio(int channel) const
virtual float coherent_nf_protection_factor(int channel) const
std::shared_ptr< Interface > pointer
virtual channel_group_t bad_channels() const
Return channels which are considered a'priori "bad".
virtual ~OmniChannelNoiseDB()
virtual double nominal_baseline(int channel) const
Return a nominal baseline correction (additive offset)
virtual float coherent_nf_decon_lf_cutoff(int channel) const
virtual const filter_t & rcrc(int channel) const
Return the filter for the RC+RC coupling response function.
virtual float coherent_nf_decon_limit(int channel) const
std::shared_ptr< filter_t > shared_filter_t
channel_group_t m_bad_channels
channel_group_t m_miscfg_channels
WireCell::Waveform::compseq_t filter_t
The data type for all frequency-space, multiplicative filters.
void update_channels(Json::Value cfg)
std::unordered_map< int, ChannelInfo > m_db
std::shared_ptr< spdlog::logger > logptr_t
std::string format(const std::string &form, TYPES...objs)
shared_filter_t parse_reconfig(Json::Value jreconfig)
virtual const filter_t & response(int channel) const
A nominal detector response spectrum for a given channel.
std::unordered_map< int, shared_filter_t > m_reconfig_cache
std::vector< shared_filter_t > filter_vector_t
IAnodePlane::pointer m_anode
virtual std::vector< channel_group_t > coherent_channels() const
Return channel grouping for coherent noise subtraction.
virtual double max_rms_cut(int channel) const
virtual void set_misconfigured(const std::vector< int > &channels, double from_gain, double from_shaping, double to_gain, double to_shaping, bool reset=false)
shared_filter_t parse_response(Json::Value jreconfig)
Json::Value Configuration
virtual double response_offset(int channel) const
Return a time offset associated with the response().
virtual double gain_correction(int channel) const
shared_filter_t parse_freqmasks(Json::Value jfm)
std::vector< channel_group_t > m_channel_groups
virtual channel_group_t miscfg_channels() const
Return channels which are considered a'priori "misconfigured".
virtual int pad_window_front(int channel) const
shared_filter_t make_filter(std::complex< float > defval=std::complex< float >(1, 0))
Thrown when a wrong key or has been encountered.