All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TPCNoiseFilterCanny_tool.cc
Go to the documentation of this file.
1 /**
2  * @file TPCNoiseFilterCannyMC_tool.cc
3  *
4  * @brief This tool converts from daq to LArSoft format with noise filtering
5  *
6  */
7 
8 // Framework Includes
9 #include "art/Framework/Core/EDProducer.h"
10 #include "art/Framework/Principal/Event.h"
11 #include "art/Framework/Principal/Handle.h"
12 #include "art/Framework/Services/Registry/ServiceHandle.h"
13 #include "art/Persistency/Common/PtrMaker.h"
14 #include "art/Utilities/ToolMacros.h"
15 #include "art/Utilities/make_tool.h"
16 #include "cetlib/cpu_timer.h"
17 #include "fhiclcpp/ParameterSet.h"
18 #include "messagefacility/MessageLogger/MessageLogger.h"
19 
20 // LArSoft includes
22 
23 #include "sbndaq-artdaq-core/Overlays/ICARUS/PhysCrateFragment.hh"
24 
26 
27 #include "icarus_signal_processing/ICARUSSigProcDefs.h"
28 #include "icarus_signal_processing/WaveformTools.h"
29 #include "icarus_signal_processing/Filters/FFTFilterFunctions.h"
30 #include "icarus_signal_processing/Filters/ImageFilters.h"
31 #include "icarus_signal_processing/Denoising.h"
32 #include "icarus_signal_processing/Detection/EdgeDetection.h"
33 #include "icarus_signal_processing/Filters/BilateralFilters.h"
34 #include "icarus_signal_processing/ROIFinder2D.h"
35 
36 // std includes
37 #include <string>
38 #include <iostream>
39 #include <memory>
40 
41 //------------------------------------------------------------------------------------------------------------------------------------------
42 // implementation follows
43 
44 namespace daq {
45 /**
46  * @brief TPCNoiseFilterCannyMC class definiton
47  */
48 class TPCNoiseFilterCannyMC : virtual public INoiseFilter
49 {
50 public:
51  /**
52  * @brief Constructor
53  *
54  * @param pset
55  */
56  explicit TPCNoiseFilterCannyMC(fhicl::ParameterSet const &pset);
57 
58  /**
59  * @brief Destructor
60  */
62 
63  /**
64  * @brief Interface for configuring the particular algorithm tool
65  *
66  * @param ParameterSet The input set of parameters for configuration
67  */
68  virtual void configure(const fhicl::ParameterSet&) override;
69 
70  /**
71  * @brief Given a set of recob hits, run DBscan to form 3D clusters
72  *
73  * @param fragment The artdaq fragment to process
74  */
77  const icarus_signal_processing::ArrayFloat&,
78  const size_t&) override;
79 
80  /**
81  * @brief Recover the channels for the processed fragment
82  */
83  const icarus_signal_processing::VectorInt& getChannelIDs() const override {return fChannelIDVec;}
84 
85  /**
86  * @brief Recover the selection values
87  */
88  const icarus_signal_processing::ArrayBool& getSelectionVals() const override {return fSelectVals;};
89 
90  /**
91  * @brief Recover the ROI values
92  */
93  const icarus_signal_processing::ArrayBool& getROIVals() const override {return fROIVals;};
94 
95  /**
96  * @brief Recover the pedestal subtracted waveforms
97  */
98  const icarus_signal_processing::ArrayFloat& getRawWaveforms() const override {return fRawWaveforms;};
99 
100  /**
101  * @brief Recover the pedestal subtracted waveforms
102  */
103  const icarus_signal_processing::ArrayFloat& getPedCorWaveforms() const override {return fPedCorWaveforms;};
104 
105  /**
106  * @brief Recover the "intrinsic" RMS
107  */
108  const icarus_signal_processing::ArrayFloat& getIntrinsicRMS() const override {return fIntrinsicRMS;};
109 
110  /**
111  * @brief Recover the correction median values
112  */
113  const icarus_signal_processing::ArrayFloat& getCorrectedMedians() const override {return fCorrectedMedians;};
114 
115  /**
116  * @brief Recover the waveforms less coherent noise
117  */
118  const icarus_signal_processing::ArrayFloat& getWaveLessCoherent() const override {return fWaveLessCoherent;};
119 
120  /**
121  * @brief Recover the morphological filter waveforms
122  */
123  const icarus_signal_processing::ArrayFloat& getMorphedWaveforms() const override {return fMorphedWaveforms;};
124 
125  /**
126  * @brief Recover the pedestals for each channel
127  */
128  const icarus_signal_processing::VectorFloat& getPedestalVals() const override {return fPedestalVals;};
129 
130  /**
131  * @brief Recover the full RMS before coherent noise
132  */
133  const icarus_signal_processing::VectorFloat& getFullRMSVals() const override {return fFullRMSVals;};
134 
135  /**
136  * @brief Recover the truncated RMS noise
137  */
138  const icarus_signal_processing::VectorFloat& getTruncRMSVals() const override {return fTruncRMSVals;};
139 
140  /**
141  * @brief Recover the number of bins after truncation
142  */
143  const icarus_signal_processing::VectorInt& getNumTruncBins() const override {return fNumTruncBins;};
144 
145 private:
146 
147  using FloatPairVec = std::vector<std::pair<float,float>>;
148 
149  float fSigmaForTruncation; //< Selection cut for truncated rms calculation
150  bool fUseFFTFilter; //< Turn on/off the use of the FFT filter
151  bool fDiagnosticOutput; //< If true will spew endless messages to output
152  FloatPairVec fFFTSigmaValsVec; //< Gives the sigmas for the filter function
153  FloatPairVec fFFTCutoffValsVec; //< Gives the cutoffs for the filter function
154 
155  std::vector<std::string> fFilterModeVec; //< Allowed modes for the filter
156 
157  // fhicl parameters
158  std::vector<size_t> fStructuringElement; ///< Structuring element for morphological filter
159  std::vector<float> fThreshold; ///< Threshold to apply for saving signal
160 
161  // Start with parameters for Butterworth Filter
162  unsigned int fButterworthOrder; ///< Order parameter for Butterworth filter
163  unsigned int fButterworthThreshold; ///< Threshold for Butterworth filter
164 
165  // Parameters for the 2D morphological filter
166  unsigned int fMorph2DStructuringElementX; ///< Structuring element in X
167  unsigned int fMorph2DStructuringElementY; ///< Structuring element in Y
168 
169  // Parameters for the denoiser
170  unsigned int fCoherentNoiseGrouping; ///< Number of consecutive channels in coherent noise subtraction
171  unsigned int fCoherentNoiseOffset; ///< Offset for the midplane...
172  unsigned int fMorphologicalWindow; ///< Window size for filter
173 // bool fOutputStats; ///< Output of timiing statistics?
174  float fCoherentThresholdFactor; ///< Threshold factor for coherent noise removal
175 
176  // Parameters for the ROI finding
177  unsigned int fADFilter_SX; ///<
178  unsigned int fADFilter_SY; ///<
179  float fSigma_x; ///<
180  float fSigma_y; ///<
181  float fSigma_r; ///<
182  float fLowThreshold; ///<
183  float fHighThreshold; ///<
184  unsigned int fBinaryDilation_SX; ///<
185  unsigned int fBinaryDilation_SY; ///<
186 
187  // Allocate containers for noise processing
188  icarus_signal_processing::VectorInt fChannelIDVec;
189  icarus_signal_processing::ArrayBool fSelectVals;
190  icarus_signal_processing::ArrayBool fROIVals;
191  icarus_signal_processing::ArrayFloat fRawWaveforms;
192  icarus_signal_processing::ArrayFloat fPedCorWaveforms;
193  icarus_signal_processing::ArrayFloat fIntrinsicRMS;
194  icarus_signal_processing::ArrayFloat fCorrectedMedians;
195  icarus_signal_processing::ArrayFloat fWaveLessCoherent;
196  icarus_signal_processing::ArrayFloat fMorphedWaveforms;
197 
198  icarus_signal_processing::VectorFloat fPedestalVals;
199  icarus_signal_processing::VectorFloat fFullRMSVals;
200  icarus_signal_processing::VectorFloat fTruncRMSVals;
201  icarus_signal_processing::VectorInt fNumTruncBins;
202  icarus_signal_processing::VectorInt fRangeBins;
203 
204  icarus_signal_processing::VectorFloat fThresholdVec;
205 
206  icarus_signal_processing::FilterFunctionVec fFilterFunctionVec;
207 
208  const geo::Geometry* fGeometry; //< pointer to the Geometry service
209 
210  // Keep track of the FFT
211  icarus_signal_processing::FFTFilterFunctionVec fFFTFilterFunctionVec;
212 
213  // Our denoising functions
214  std::unique_ptr<icarus_signal_processing::IFFTFilterFunction> fButterworthFilter;
215  std::unique_ptr<icarus_signal_processing::IMorphologicalFunctions2D> fMorphologicalFilter;
216  std::unique_ptr<icarus_signal_processing::IDenoiser2D> fDenoiser2D;
217  std::unique_ptr<icarus_signal_processing::BilateralFilters> fBilateralFilters;
218  std::unique_ptr<icarus_signal_processing::EdgeDetection> fEdgeDetection;
219  std::unique_ptr<icarus_signal_processing::IROIFinder2D> fROIFinder2D;
220 
221 };
222 
223 TPCNoiseFilterCannyMC::TPCNoiseFilterCannyMC(fhicl::ParameterSet const &pset)
224 {
225  this->configure(pset);
226 
227  fSelectVals.clear();
228  fROIVals.clear();
229  fRawWaveforms.clear();
230  fPedCorWaveforms.clear();
231  fIntrinsicRMS.clear();
232  fCorrectedMedians.clear();
233  fWaveLessCoherent.clear();
234  fMorphedWaveforms.clear();
235 
236  fPedestalVals.clear();
237  fFullRMSVals.clear();
238  fTruncRMSVals.clear();
239  fNumTruncBins.clear();
240  fRangeBins.clear();
241 
242  return;
243 }
244 
245 //------------------------------------------------------------------------------------------------------------------------------------------
246 
248 {
249 }
250 
251 //------------------------------------------------------------------------------------------------------------------------------------------
252 void TPCNoiseFilterCannyMC::configure(fhicl::ParameterSet const &pset)
253 {
254  fSigmaForTruncation = pset.get<float >("NSigmaForTrucation", 3.5);
255  fCoherentNoiseGrouping = pset.get<size_t >("CoherentGrouping", 64);
256  fUseFFTFilter = pset.get<bool >("UseFFTFilter", true);
257  fDiagnosticOutput = pset.get<bool >("DiagnosticOutput", false);
258  fFilterModeVec = pset.get<std::vector<std::string>>("FilterModeVec", std::vector<std::string>()={"e","g","d"});
259 
260  fFFTSigmaValsVec = pset.get<FloatPairVec >("FFTSigmaVals", FloatPairVec()={{1.5,20.}, {1.5,20.}, {2.0,20.}});
261  fFFTCutoffValsVec = pset.get<FloatPairVec >("FFTCutoffVals", FloatPairVec()={{8.,800.}, {8.,800.}, {0.0,800.}});
262 
263  // Recover parameters for noise/ROI
264  fStructuringElement = pset.get<std::vector<size_t> >("StructuringElement", std::vector<size_t>()={8,16});
265  fThreshold = pset.get<std::vector<float> >("Threshold", std::vector<float>()={2.75,2.75,2.75});
266 
267  fButterworthOrder = pset.get<unsigned int >("ButterworthOrder", 2);
268  fButterworthThreshold = pset.get<unsigned int >("ButterworthThreshld", 30);
269 
270  //fButterworthFilter = std::make_unique<icarus_signal_processing::HighPassButterworthFilter>(fButterworthThreshold,fButterworthOrder,4096);
271  fButterworthFilter = std::make_unique<icarus_signal_processing::NoFFTFilter>();
272 
273  fMorph2DStructuringElementX = pset.get<unsigned int >("Morph2DStructuringElementX", 7);
274  fMorph2DStructuringElementY = pset.get<unsigned int >("Morph2DStructuringElementX", 28);
275 
276  fMorphologicalFilter = std::make_unique<icarus_signal_processing::Dilation2D>(fMorph2DStructuringElementX,fMorph2DStructuringElementY);
277 
278  fCoherentNoiseOffset = pset.get<unsigned int >("CoherentNoiseOffset", 24);
279  fMorphologicalWindow = pset.get<unsigned int >("MorphologicalWindow", 10);
280  fCoherentThresholdFactor = pset.get<float >("CoherentThresholdFactor", 2.5);
281 
282  fThresholdVec.resize(6560/fCoherentNoiseGrouping,fCoherentThresholdFactor);
283 
284  //fDenoiser2D = std::make_unique<icarus_signal_processing::Denoiser2D_Hough>(fMorphologicalFilter.get(), fThresholdVec, fCoherentNoiseGrouping, fCoherentNoiseOffset, fMorphologicalWindow);
285  fDenoiser2D = std::make_unique<icarus_signal_processing::Denoiser2D>(fMorphologicalFilter.get(), fThresholdVec, fCoherentNoiseGrouping, fMorphologicalWindow);
286 
287  fADFilter_SX = pset.get<unsigned int >("ADFilter_SX", 7);
288  fADFilter_SY = pset.get<unsigned int >("ADFilter_SY", 7);
289  fSigma_x = pset.get<float >("Sigma_x", 10.0);
290  fSigma_y = pset.get<float >("Sigma_y", 10.0);
291  fSigma_r = pset.get<float >("Sigma_r", 30.0);
292 
293  fLowThreshold = pset.get<float >("LowThreshold", 10.0);
294  fHighThreshold = pset.get<float >("HighThreshold", 20.0);
295 
296  fBinaryDilation_SX = pset.get<unsigned int >("BinaryDilation_SX", 31);
297  fBinaryDilation_SY = pset.get<unsigned int >("BinaryDilation_SY", 31);
298 
299  fBilateralFilters = std::make_unique<icarus_signal_processing::BilateralFilters>();
300  fEdgeDetection = std::make_unique<icarus_signal_processing::EdgeDetection>();
301 
302  fROIFinder2D = std::make_unique<icarus_signal_processing::ROICannyFilter>(fButterworthFilter.get(),
303  fDenoiser2D.get(),
304  fBilateralFilters.get(),
305  fEdgeDetection.get(),
306  fADFilter_SX,
307  fADFilter_SY,
308  fSigma_x,
309  fSigma_y,
310  fSigma_r,
315 
316  fGeometry = art::ServiceHandle<geo::Geometry const>{}.get();
317 
318  fFFTFilterFunctionVec.clear();
319 
320  if (fUseFFTFilter)
321  {
322  for(int plane = 0; plane < 3; plane++)
323  {
324  if (plane < 2) fFFTFilterFunctionVec.emplace_back(std::make_unique<icarus_signal_processing::WindowFFTFilter>(fFFTSigmaValsVec[plane], fFFTCutoffValsVec[plane]));
325  else fFFTFilterFunctionVec.emplace_back(std::make_unique<icarus_signal_processing::NoFFTFilter>());
326  }
327  }
328 
329  return;
330 }
331 
333  const daq::INoiseFilter::ChannelPlaneVec& channelPlaneVec,
334  const icarus_signal_processing::ArrayFloat& dataArray,
335  const size_t& coherentNoiseGrouping)
336 {
337  cet::cpu_timer theClockTotal;
338 
339  theClockTotal.start();
340 
341  // Recover the number of channels and ticks
342  unsigned int numChannels = dataArray.size();
343  unsigned int numTicks = dataArray[0].size();
344 
345  if (fSelectVals.size() < numChannels) fSelectVals.resize(numChannels, icarus_signal_processing::VectorBool(numTicks));
346  if (fROIVals.size() < numChannels) fROIVals.resize(numChannels, icarus_signal_processing::VectorBool(numTicks));
347  if (fRawWaveforms.size() < numChannels) fRawWaveforms.resize(numChannels, icarus_signal_processing::VectorFloat(numTicks));
348  if (fPedCorWaveforms.size() < numChannels) fPedCorWaveforms.resize(numChannels, icarus_signal_processing::VectorFloat(numTicks));
349  if (fIntrinsicRMS.size() < numChannels) fIntrinsicRMS.resize(numChannels, icarus_signal_processing::VectorFloat(numTicks));
350  if (fCorrectedMedians.size() < numChannels) fCorrectedMedians.resize(numChannels, icarus_signal_processing::VectorFloat(numTicks));
351  if (fWaveLessCoherent.size() < numChannels) fWaveLessCoherent.resize(numChannels, icarus_signal_processing::VectorFloat(numTicks));
352  if (fMorphedWaveforms.size() < numChannels) fMorphedWaveforms.resize(numChannels, icarus_signal_processing::VectorFloat(numTicks));
353 
354  if (fChannelIDVec.size() < numChannels) fChannelIDVec.resize(numChannels);
355  if (fPedestalVals.size() < numChannels) fPedestalVals.resize(numChannels);
356  if (fFullRMSVals.size() < numChannels) fFullRMSVals.resize(numChannels);
357  if (fTruncRMSVals.size() < numChannels) fTruncRMSVals.resize(numChannels);
358  if (fNumTruncBins.size() < numChannels) fNumTruncBins.resize(numChannels);
359  if (fRangeBins.size() < numChannels) fRangeBins.resize(numChannels);
360 
361  if (fThresholdVec.size() < numChannels) fThresholdVec.resize(numChannels / coherentNoiseGrouping);
362 
363  if (fFilterFunctionVec.size() < numChannels) fFilterFunctionVec.resize(numChannels);
364 
365  std::cout <<" -->process_fragment with " << numChannels << " channels and " << numTicks << " ticks, array sizes: " << fCorrectedMedians.size() << ", " << fCorrectedMedians[1].size() << std::endl;
366 
367  icarus_signal_processing::Denoiser1D denoiser;
368  icarus_signal_processing::WaveformTools<float> waveformTools;
369 
370  // Make a pass throught to do pedestal corrections and get raw waveform information
371  for(size_t idx = 0; idx < numChannels; idx++)
372  {
373  icarus_signal_processing::VectorFloat& pedCorDataVec = fPedCorWaveforms[idx];
374 
375  // Keep track of the channel
376  fChannelIDVec[idx] = channelPlaneVec[idx].first;
377 
378  // We need to recover info on which plane we have
379  std::vector<geo::WireID> widVec = fGeometry->ChannelToWire(fChannelIDVec[idx]);
380 
381  // Handle the filter function to use for this channel
382  unsigned int plane = widVec[0].Plane;
383 
384  // Set the threshold which toggles between planes
385  fThresholdVec[idx / coherentNoiseGrouping] = fThreshold[plane];
386 
387  switch(fFilterModeVec[plane][0])
388  {
389  case 'd' :
390  fFilterFunctionVec[idx] = std::make_unique<icarus_signal_processing::Dilation1D>(fStructuringElement[1]);
391  break;
392  case 'e' :
393  fFilterFunctionVec[idx] = std::make_unique<icarus_signal_processing::Erosion1D>(fStructuringElement[1]);
394  break;
395  case 'g' :
396  fFilterFunctionVec[idx] = std::make_unique<icarus_signal_processing::Gradient1D>(fStructuringElement[1]);
397  break;
398  case 'a' :
399  fFilterFunctionVec[idx] = std::make_unique<icarus_signal_processing::Average1D>(fStructuringElement[1]);
400  break;
401  case 'm' :
402  fFilterFunctionVec[idx] = std::make_unique<icarus_signal_processing::Median1D>(fStructuringElement[1]);
403  break;
404  default:
405  std::cout << "***** FOUND NO MATCH FOR TYPE: " << fFilterModeVec[plane] << ", plane " << plane << " DURING INITIALIZATION OF FILTER FUNCTIONS IN TPCNoiseFilterCannyMC" << std::endl;
406  break;
407  }
408 
409  // Now determine the pedestal and correct for it
410  waveformTools.getPedestalCorrectedWaveform(dataArray[idx],
411  pedCorDataVec,
413  fPedestalVals[idx],
414  fFullRMSVals[idx],
415  fTruncRMSVals[idx],
416  fNumTruncBins[idx],
417  fRangeBins[idx]);
418 
419  // Convolve with a filter function
420  if (fUseFFTFilter) (*fFFTFilterFunctionVec[plane])(pedCorDataVec);
421  }
422 
423  icarus_signal_processing::ArrayFloat finalErosion(numChannels,icarus_signal_processing::VectorFloat(numTicks,0.));
424 
425  std::cout << " --> calling icarus_signal_processing code" << std::endl;
426 
427  // Now pass the entire data array to the denoisercoherent
428  (*fROIFinder2D)(fPedCorWaveforms,fRawWaveforms,fROIVals); //,fWaveLessCoherent,fCorrectedMedians,fIntrinsicRMS,fMorphedWaveforms,finalErosion);
429 
430  std::cout << " --> have returned from denoising" << std::endl;
431 
432  theClockTotal.stop();
433 
434  double totalTime = theClockTotal.accumulated_real_time();
435 
436  mf::LogInfo("TPCNoiseFilterCannyMC") << " *totalTime: " << totalTime << std::endl;
437 
438  return;
439 }
440 
441 
442 DEFINE_ART_CLASS_TOOL(TPCNoiseFilterCannyMC)
443 } // namespace lar_cluster3d
icarus_signal_processing::VectorFloat fTruncRMSVals
const icarus_signal_processing::ArrayFloat & getPedCorWaveforms() const override
Recover the pedestal subtracted waveforms.
icarus_signal_processing::VectorFloat fFullRMSVals
TPCNoiseFilterCannyMC class definiton.
icarus_signal_processing::ArrayFloat fPedCorWaveforms
icarus_signal_processing::FilterFunctionVec fFilterFunctionVec
std::vector< std::pair< float, float >> FloatPairVec
const icarus_signal_processing::VectorFloat & getPedestalVals() const override
Recover the pedestals for each channel.
const icarus_signal_processing::VectorFloat & getTruncRMSVals() const override
Recover the truncated RMS noise.
unsigned int fButterworthThreshold
Threshold for Butterworth filter.
unsigned int fCoherentNoiseOffset
Offset for the midplane...
This provides an art tool interface definition for tools which &quot;decode&quot; artdaq fragments into LArSoft...
icarus_signal_processing::ArrayBool fROIVals
const icarus_signal_processing::ArrayFloat & getIntrinsicRMS() const override
Recover the &quot;intrinsic&quot; RMS.
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
std::unique_ptr< icarus_signal_processing::IMorphologicalFunctions2D > fMorphologicalFilter
std::unique_ptr< icarus_signal_processing::BilateralFilters > fBilateralFilters
const icarus_signal_processing::VectorInt & getChannelIDs() const override
Recover the channels for the processed fragment.
unsigned int fCoherentNoiseGrouping
Number of consecutive channels in coherent noise subtraction.
const icarus_signal_processing::ArrayBool & getROIVals() const override
Recover the ROI values.
std::unique_ptr< icarus_signal_processing::IFFTFilterFunction > fButterworthFilter
icarus_signal_processing::VectorFloat fPedestalVals
const icarus_signal_processing::ArrayFloat & getMorphedWaveforms() const override
Recover the morphological filter waveforms.
unsigned int fButterworthOrder
Order parameter for Butterworth filter.
const icarus_signal_processing::VectorFloat & getFullRMSVals() const override
Recover the full RMS before coherent noise.
icarus_signal_processing::ArrayFloat fCorrectedMedians
unsigned int fMorphologicalWindow
Window size for filter.
The geometry of one entire detector, as served by art.
Definition: Geometry.h:181
virtual void configure(const fhicl::ParameterSet &) override
Interface for configuring the particular algorithm tool.
std::vector< std::string > fFilterModeVec
IDecoderFilter interface class definiton.
Definition: INoiseFilter.h:32
icarus_signal_processing::ArrayFloat fIntrinsicRMS
icarus_signal_processing::ArrayFloat fWaveLessCoherent
std::unique_ptr< icarus_signal_processing::EdgeDetection > fEdgeDetection
icarus_signal_processing::VectorInt fRangeBins
icarus_signal_processing::FFTFilterFunctionVec fFFTFilterFunctionVec
const icarus_signal_processing::ArrayBool & getSelectionVals() const override
Recover the selection values.
Contains all timing reference information for the detector.
virtual void process_fragment(detinfo::DetectorClocksData const &, const daq::INoiseFilter::ChannelPlaneVec &, const icarus_signal_processing::ArrayFloat &, const size_t &) override
Given a set of recob hits, run DBscan to form 3D clusters.
icarus_signal_processing::VectorFloat fThresholdVec
const icarus_signal_processing::ArrayFloat & getWaveLessCoherent() const override
Recover the waveforms less coherent noise.
std::vector< size_t > fStructuringElement
Structuring element for morphological filter.
std::unique_ptr< icarus_signal_processing::IROIFinder2D > fROIFinder2D
const icarus_signal_processing::VectorInt & getNumTruncBins() const override
Recover the number of bins after truncation.
float fCoherentThresholdFactor
Threshold factor for coherent noise removal.
const icarus_signal_processing::ArrayFloat & getRawWaveforms() const override
Recover the pedestal subtracted waveforms.
TPCNoiseFilterCannyMC(fhicl::ParameterSet const &pset)
Constructor.
icarus_signal_processing::ArrayBool fSelectVals
std::vector< float > fThreshold
Threshold to apply for saving signal.
icarus_signal_processing::VectorInt fNumTruncBins
unsigned int fMorph2DStructuringElementY
Structuring element in Y.
std::unique_ptr< icarus_signal_processing::IDenoiser2D > fDenoiser2D
icarus_signal_processing::ArrayFloat fMorphedWaveforms
unsigned int fMorph2DStructuringElementX
Structuring element in X.
icarus_signal_processing::ArrayFloat fRawWaveforms
const icarus_signal_processing::ArrayFloat & getCorrectedMedians() const override
Recover the correction median values.
art framework interface to geometry description
BEGIN_PROLOG could also be cout
icarus_signal_processing::VectorInt fChannelIDVec
std::vector< ChannelPlanePair > ChannelPlaneVec
Definition: INoiseFilter.h:54