1 #ifndef WIRECELLSIGPROC_SIMPLECHANNELNOISEDB 2 #define WIRECELLSIGPROC_SIMPLECHANNELNOISEDB 11 #include <unordered_map> 77 double from_gain_mVfC=7.8,
double to_gain_mVfC=14.0,
119 typedef std::tuple<double, int, int>
mask_t;
121 void set_filter(
const std::vector<int>& channels,
const multimask_t&
mask);
151 int chind(
int ch)
const;
float m_default_decon_lf_cutoff
std::vector< int > channel_group_t
SimpleChannelNoiseDB(double tick=0.5 *units::us, int nsamples=9600)
float m_default_decon_limit1
void set_coherent_nf_decon_lf_cutoff(const std::vector< int > &channels, float decon_lf_cutoff)
void set_coherent_nf_decon_limit(const std::vector< int > &channels, float decon_limit)
virtual int pad_window_back(int channel) const
std::vector< mask_t > multimask_t
void set_gains_shapings(const std::vector< int > &channels, double from_gain_mVfC=7.8, double to_gain_mVfC=14.0, double from_shaping=1.0 *units::us, double to_shaping=2.0 *units::us)
void set_coherent_nf_protection_factor(const std::vector< int > &channels, float protection_factor)
std::vector< double > m_max_rms
void set_max_rms_cut(const std::vector< int > &channels, double max_rms)
virtual const filter_t & config(int channel) const
Return the filter to correct any wrongly configured channels.
std::vector< float > m_protection_factor
void set_coherent_nf_min_adc_limit(const std::vector< int > &channels, float min_adc_limit)
virtual double min_rms_cut(int channel) const
virtual int pad_window_front(int channel) const
void set_coherent_nf_roi_min_max_ratio(const std::vector< int > &channels, float roi_min_max_ratio)
shared_filter_t m_default_filter
void set_max_rms_cut_one(int channel, double max_rms)
void set_nominal_baseline(const std::vector< int > &channels, double baseline)
Set nominal baseline in units of ADC (eg uB is -2048 for U/V, -400 for W)
void set_rcrc_constant(const std::vector< int > &channels, double rcrc=2000.0)
std::vector< double > m_gain
std::vector< double > m_offset
virtual ~SimpleChannelNoiseDB()
std::vector< double > m_min_rms
shared_filter_t m_default_response
void set_filter(const std::vector< int > &channels, const multimask_t &mask)
std::vector< float > m_min_adc_limit
void set_min_rms_cut(const std::vector< int > &channels, double min_rms)
float m_default_adc_limit
std::vector< float > m_roi_min_max_ratio
virtual float coherent_nf_roi_min_max_ratio(int channel) const
std::unordered_map< int, int > m_ch2ind
virtual channel_group_t bad_channels() const
Return channels which are considered a'priori "bad".
virtual std::vector< channel_group_t > coherent_channels() const
Return channel grouping for coherent noise subtraction.
void set_pad_window_front(const std::vector< int > &channels, int pad_f)
virtual const filter_t & response(int channel) const
A nominal detector response spectrum for a given channel.
virtual float coherent_nf_adc_limit(int channel) const
float m_default_decon_limit
std::vector< float > m_decon_limit
std::vector< float > m_decon_limit1
float m_default_roi_min_max_ratio
void set_min_rms_cut_one(int channel, double min_rms)
void set_response_offset(const std::vector< int > &channels, double offset)
Set a response offset for the given set of channels.
virtual float coherent_nf_decon_limit1(int channel) const
std::vector< double > m_baseline
float m_default_protection_factor
channel_group_t m_bad_channels
void set_coherent_nf_decon_limit1(const std::vector< int > &channels, float decon_limit)
WireCell::Waveform::compseq_t filter_t
The data type for all frequency-space, multiplicative filters.
virtual double max_rms_cut(int channel) const
double m_default_baseline
virtual double response_offset(int channel) const
Return a time offset associated with the response().
virtual float coherent_nf_protection_factor(int channel) const
virtual float coherent_nf_min_adc_limit(int channel) const
void set_response(const std::vector< int > &channels, const filter_t &spectrum)
Set a detector response spectrum for the set of channels.
virtual const filter_t & noise(int channel) const
Return the filter to attenuate noise.
std::vector< float > m_adc_limit
std::shared_ptr< filter_t > shared_filter_t
std::vector< int > m_pad_b
const IChannelNoiseDatabase::filter_t & get_filter(int channel, const filter_vector_t &fv) const
void set_channel_groups(const std::vector< channel_group_t > &channel_groups)
Set the channel groups.
virtual float coherent_nf_decon_limit(int channel) const
std::vector< shared_filter_t > filter_vector_t
std::vector< float > m_decon_lf_cutoff
virtual double sample_time() const
FIXME: how to handle state changes?
float m_default_min_adc_limit
void set_pad_window_back(const std::vector< int > &channels, int pad_b)
std::vector< channel_group_t > m_channel_groups
virtual const filter_t & rcrc(int channel) const
Return the filter for the RC+RC coupling response function.
virtual float coherent_nf_decon_lf_cutoff(int channel) const
std::vector< int > m_pad_f
void set_coherent_nf_adc_limit(const std::vector< int > &channels, float adc_limit)
void set_bad_channels(const channel_group_t &bc)
Set "bad" channels.
filter_vector_t m_response
void set_sampling(double tick=0.5 *units::us, int nsamples=9600)
virtual double nominal_baseline(int channel) const
Return a nominal baseline correction (additive offset)
virtual double gain_correction(int channel) const
std::tuple< double, int, int > mask_t