IChannelNoiseDatabase.h
Go to the documentation of this file.
1 #ifndef WIRECELL_ICHANNELNOISEDATABASE
2 #define WIRECELL_ICHANNELNOISEDATABASE
3 
6 
7 #include <vector>
8 
9 namespace WireCell {
10 
11  // FIXME: this needs to be simplified into a Noise Subtraction
12  // Service interface. All these details need to be subsumed into
13  // an implementation!
14  class IChannelNoiseDatabase : public WireCell::IComponent<IChannelNoiseDatabase> {
15  public:
16 
17  /// The data type for all frequency-space, multiplicative filters.
19  typedef std::vector<int> channel_group_t;
20 
21  virtual ~IChannelNoiseDatabase() ;
22 
23 
24  /// FIXME: how to handle state changes?
25 
26  /// Return the time-domain sample period (time in system of
27  /// units) which is was used in producing the filter
28  /// response spectral functions (filter_t).
29  ///
30  /// Warning: take care that the number of frequency samples
31  /// (filter_t::size()) is fixed and may not match the number
32  /// of ticks in your waveform.
33  virtual double sample_time() const = 0;
34 
35  /// Return a nominal baseline correction (additive offset)
36  virtual double nominal_baseline(int channel) const = 0;
37 
38  /// Return simple gain correction (a multiplicative, unitless
39  /// scaling) to apply to a given channel.
40  virtual double gain_correction(int channel) const = 0;
41 
42  /// Return a time offset associated with the response().
43  virtual double response_offset(int channel) const = 0;
44 
45  // return the protected window padding in the front
46  virtual int pad_window_front(int channel) const = 0;
47  // return the protected window padding in the back
48  virtual int pad_window_back(int channel) const = 0;
49 
50  virtual float coherent_nf_decon_limit(int channel) const = 0;
51  virtual float coherent_nf_decon_lf_cutoff(int channel) const = 0;
52  virtual float coherent_nf_adc_limit(int channel) const = 0;
53  virtual float coherent_nf_decon_limit1(int channel) const = 0;
54  virtual float coherent_nf_protection_factor(int channel) const = 0;
55  virtual float coherent_nf_min_adc_limit(int channel) const = 0;
56  virtual float coherent_nf_roi_min_max_ratio(int channel) const = 0;
57 
58  // return the min rms cut for a channel
59  virtual double min_rms_cut(int channel) const = 0;
60  // return the max rms cut for a channel
61  virtual double max_rms_cut(int channel) const = 0;
62 
63  /// Return the filter for the RC+RC coupling response function.
64  virtual const filter_t& rcrc(int channel) const = 0;
65 
66  /// Return the filter to correct any wrongly configured channels.
67  virtual const filter_t& config(int channel) const = 0;
68 
69  /// Return the filter to attenuate noise.
70  virtual const filter_t& noise(int channel) const = 0;
71 
72  /// A nominal detector response spectrum for a given channel.
73  virtual const filter_t& response(int channel) const = 0;
74 
75 
76  /// Return channel grouping for coherent noise subtraction
77  virtual std::vector<channel_group_t> coherent_channels() const = 0;
78 
79  /// Return channels which are considered a'priori "bad".
80  virtual channel_group_t bad_channels() const {
81  return channel_group_t();
82  }
83 
84  /// Return channels which are considered a'priori "misconfigured".
85  virtual channel_group_t miscfg_channels() const {
86  return channel_group_t();
87  }
88  };
89 
90 }
91 
92 #endif
virtual float coherent_nf_decon_lf_cutoff(int channel) const =0
virtual channel_group_t miscfg_channels() const
Return channels which are considered a&#39;priori "misconfigured".
virtual const filter_t & noise(int channel) const =0
Return the filter to attenuate noise.
virtual double nominal_baseline(int channel) const =0
Return a nominal baseline correction (additive offset)
virtual float coherent_nf_roi_min_max_ratio(int channel) const =0
virtual const filter_t & config(int channel) const =0
Return the filter to correct any wrongly configured channels.
virtual const filter_t & rcrc(int channel) const =0
Return the filter for the RC+RC coupling response function.
virtual const filter_t & response(int channel) const =0
A nominal detector response spectrum for a given channel.
virtual int pad_window_front(int channel) const =0
virtual channel_group_t bad_channels() const
Return channels which are considered a&#39;priori "bad".
virtual float coherent_nf_min_adc_limit(int channel) const =0
virtual int pad_window_back(int channel) const =0
virtual double gain_correction(int channel) const =0
virtual double response_offset(int channel) const =0
Return a time offset associated with the response().
virtual double sample_time() const =0
FIXME: how to handle state changes?
virtual std::vector< channel_group_t > coherent_channels() const =0
Return channel grouping for coherent noise subtraction.
virtual double min_rms_cut(int channel) const =0
virtual double max_rms_cut(int channel) const =0
WireCell::Waveform::compseq_t filter_t
The data type for all frequency-space, multiplicative filters.
Definition: Main.h:22
virtual float coherent_nf_decon_limit(int channel) const =0
virtual float coherent_nf_decon_limit1(int channel) const =0
Sequence< complex_t > compseq_t
A complex-valued sequence, eg for discrete spectrum powers.
Definition: Waveform.h:34
virtual float coherent_nf_protection_factor(int channel) const =0
virtual float coherent_nf_adc_limit(int channel) const =0