All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
opHitFinderSBND_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: opHitFinderSBND
3 // Module Type: producer
4 // File: opHitFinderSBND_module.cc
5 //
6 // This module produces an OpHit object for light analysis
7 // Created by L. Paulucci, F. Marinho, and I.L. de Icaza
8 ////////////////////////////////////////////////////////////////////////
9 
10 #include "art/Framework/Core/EDProducer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/Handle.h"
14 #include "art/Framework/Principal/Run.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "canvas/Utilities/InputTag.h"
17 #include "fhiclcpp/ParameterSet.h"
18 #include "messagefacility/MessageLogger/MessageLogger.h"
19 #include "canvas/Utilities/Exception.h"
20 #include "canvas/Utilities/InputTag.h"
21 #include "art/Framework/Services/Registry/ServiceHandle.h"
22 #include "art_root_io/TFileService.h"
23 
28 //#include "larana/OpticalDetector/OpHitFinder/OpHitAlg.h"
29 //#include "lardataobj/Simulation/BeamGateInfo.h"
30 
38 //#include "larsim/MCCheater/PhotonBackTracker.h"
39 
40 #include <memory>
41 #include <algorithm>
42 #include <vector>
43 #include "TMath.h"
44 #include "TH1D.h"
45 #include "TRandom3.h"
46 #include "TF1.h"
47 
49 
50 namespace opdet {
51 
52  class opHitFinderSBND;
53 
54  class opHitFinderSBND : public art::EDProducer {
55  public:
56  explicit opHitFinderSBND(fhicl::ParameterSet const & p);
57  // The destructor generated by the compiler is fine for classes
58  // without bare pointers or other resource use.
59 
60  // Plugins should not be copied or assigned.
61  opHitFinderSBND(opHitFinderSBND const &) = delete;
62  opHitFinderSBND(opHitFinderSBND &&) = delete;
63  opHitFinderSBND & operator = (opHitFinderSBND const &) = delete;
65 
66  // Required functions.
67  void produce(art::Event & e) override;
68  opdet::sbndPDMapAlg map; //map for photon detector types
69 
70  private:
71 
72  // Declare member data here.
73  std::string fInputModuleName;
74  // art::ServiceHandle<cheat::PhotonBackTracker> pbt;
75  double fSampling; //in MHz
76  double fSampling_Daphne; //Daphne electronics's readout sampling frequency, in MHz
77  double fBaselineSample; //in ticks
78  double fPulsePolarityPMT;
79  double fPulsePolarityArapuca;
80  double fSaturation; //in number of p.e.
81  double fArea1pePMT; //area of 1 pe in ADC*ns for PMTs
82  double fArea1peSiPM; //area of 1 pe in ADC*ns for Arapucas
84  int fThresholdPMT; //in ADC
85  int fThresholdArapuca; //in ADC
86  int fEvNumber;
87  int fChNumber;
88  std::string opdetType;
89  std::string electronicsType;
90  int threshold;
91  std::vector<double> fwaveform;
92  std::vector<double> outwvform;
93  //int fSize;
94  //int fTimePMT; //Start time of PMT signal
95  //int fTimeMax; //Time of maximum (minimum) PMT signal
96  void subtractBaseline(std::vector<double>& waveform, std::string pdtype, std::string electronicsType, double& rms);
97  bool findAndSuppressPeak(std::vector<double>& waveform, size_t& timebin,
98  double& Area, double& amplitude,
99  const int& threshold, const std::string& opdetType, const std::string& electronicsType);
100  void denoise(std::vector<double>& waveform, std::vector<double>& outwaveform);
101  bool TV1D_denoise(std::vector<double>& waveform,
102  std::vector<double>& outwaveform,
103  const double lambda);
104  void TV1D_denoise_v2(std::vector<double>& input, std::vector<double>& output,
105  unsigned int width, const double lambda);
106  //std::stringstream histname;
107  };
108 
109  opHitFinderSBND::opHitFinderSBND(fhicl::ParameterSet const & p)
110  : EDProducer{p}
111  // Initialize member data here.
112  {
113  fInputModuleName = p.get< std::string >("InputModule" );
114  fBaselineSample = p.get< int >("BaselineSample"); //in ticks
115  fSaturation = p.get< double >("Saturation" ); //in number of p.e.
116  fArea1pePMT = p.get< double >("Area1pePMT" ); //in ADC*ns for PMTs
117  fArea1peSiPM = p.get< double >("Area1peSiPM" ); //in ADC*ns for SiPMs
118  fThresholdPMT = p.get< double >("ThresholdPMT" ); //in ADC
119  fThresholdArapuca = p.get< double>("ThresholdArapuca"); //in ADC
120  fPulsePolarityPMT = p.get< int >("PulsePolarityPMT");
121  fPulsePolarityArapuca = p.get<int>("PulsePolarityArapuca");
122  fUseDenoising = p.get< bool >("UseDenoising");
123 
124  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
125  fSampling = clockData.OpticalClock().Frequency(); // MHz
126  fSampling_Daphne = p.get<double>("DaphneFrequency");
127 
128  // Call appropriate produces<>() functions here.
129  produces<std::vector<recob::OpHit>>();
130  }
131 
132  void opHitFinderSBND::produce(art::Event & e)
133  {
134  // Implementation of required member function here.
135  fEvNumber = e.id().event();
136  mf::LogInfo("opHitFinder") << "Event #" << fEvNumber;
137 
138  std::unique_ptr< std::vector< recob::OpHit > > pulseVecPtr(std::make_unique< std::vector< recob::OpHit > > ());
139  fwaveform.reserve(30000); // TODO: no hardcoded value
140  outwvform.reserve(30000); // TODO: no hardcoded value
141 
142  art::ServiceHandle<art::TFileService> tfs;
143  art::Handle< std::vector< raw::OpDetWaveform > > wvfHandle;
144  std::vector<art::Ptr<raw::OpDetWaveform>> wvfList;
145  if(e.getByLabel(fInputModuleName, wvfHandle))
146  art::fill_ptr_vector(wvfList, wvfHandle);
147 
148  if(!wvfHandle.isValid()) {
149  mf::LogWarning("opHitFinder") << Form("Did not find any waveform");
150  }
151 
152  size_t timebin = 0;
153  double FWHM = 1, Area = 0, phelec, fasttotal = 3./4., rms = 0, amplitude = 0, time = 0;
154  unsigned short frame = 1;
155  //int histogram_number = 0;
156  for(auto const& wvf_P : wvfList) {
157  auto const& wvf = *wvf_P;
158  if (wvf.size() == 0 ) {
159  mf::LogInfo("opHitFinder") << "Empty waveform, continue.";
160  continue;
161  }
162 
163  fChNumber = wvf.ChannelNumber();
166  if(opdetType == "pmt_coated" || opdetType == "pmt_uncoated") {
168  }
169  else if((opdetType == "xarapuca_vuv") || (opdetType == "xarapuca_vis")) {
171  }
172  else {
173  mf::LogWarning("opHitFinder") << "Unexpected OpChannel: " << opdetType;
174  continue;
175  }
176 
177  fwaveform.resize(wvf.size());
178  for(unsigned int i = 0; i < wvf.size(); i++) {
179  fwaveform[i] = wvf[i];
180  }
181 
183 
184  if(fUseDenoising) {
185  if((opdetType == "pmt_coated") || (opdetType == "pmt_uncoated")) {
186  }
187  else if((opdetType == "xarapuca_vuv") || (opdetType == "xarapuca_vis")) {
189  }
190  else {
191  mf::LogInfo("opHitFinder") << "Unexpected OpChannel: " << opdetType
192  << ", continue." << std::endl;
193  std::terminate();
194  }
195  }
196 
197  // TODO: pass rms to this function once that's sorted. ~icaza
198  while(findAndSuppressPeak(fwaveform, timebin, Area, amplitude, threshold, opdetType, electronicsType)){
199  if(electronicsType == "daphne") time = wvf.TimeStamp() + (double)timebin / fSampling_Daphne;
200  else time = wvf.TimeStamp() + (double)timebin / fSampling;
201 
202  if(opdetType == "pmt_coated" || opdetType == "pmt_uncoated") {
203  phelec = Area / fArea1pePMT;
204  }
205  else if((opdetType == "xarapuca_vuv") || (opdetType == "xarapuca_vis")) {
206  phelec = Area / fArea1peSiPM;
207  }
208  else {
209  mf::LogWarning("opHitFinder") << "Unexpected OpChannel: " << opdetType
210  << ", continue.";
211  continue;
212  }
213 
214  //including hit info: OpChannel, PeakTime, PeakTimeAbs, Frame, Width, Area, PeakHeight, PE, FastToTotal
215  recob::OpHit opHit(fChNumber, time, time, frame, FWHM, Area, amplitude, phelec, fasttotal);
216  pulseVecPtr->emplace_back(opHit);
217  } // while findAndSuppressPeak()
218  } // for(auto const& wvf : (*wvfHandle)){
219  e.put(std::move(pulseVecPtr));
220  std::vector<double>().swap(fwaveform); // clear and release the memory of fwaveform
221  std::vector<double>().swap(outwvform); // clear and release the memory of outwvform
222  } // void opHitFinderSBND::produce(art::Event & e)
223 
224  DEFINE_ART_MODULE(opHitFinderSBND)
225 
226  void opHitFinderSBND::subtractBaseline(std::vector<double>& waveform,
227  std::string pdtype, std::string electronicsType, double& rms)
228  {
229  double baseline = 0.0;
230  rms = 0.0;
231  int cnt = 0;
232  double NBins=fBaselineSample;
233  if (electronicsType=="daphne") NBins/=(fSampling/fSampling_Daphne);//correct the number of bins to the sampling frecuency. TODO: use a fixed time interval instead, then use the channel frequency to get the number of bins ~rodrigoa
234  // TODO: this is broken it assumes that the beginning of the
235  // waveform is only noise, which is not always the case. ~icaza.
236  // TODO: use std::accumulate instead of this loop. ~icaza.
237  for(int i = 0; i < NBins; i++) {
238  baseline += waveform[i];
239  rms += std::pow(waveform[i], 2);
240  cnt++;
241  }
242 
243  baseline = baseline / cnt;
244  rms = sqrt(rms / cnt - baseline * baseline);
245  rms = rms / sqrt(cnt - 1);
246 
247  if(pdtype == "pmt_coated" || pdtype == "pmt_uncoated") {
248  for(unsigned int i = 0; i < waveform.size(); i++) waveform[i] = fPulsePolarityPMT * (waveform[i] - baseline);
249  }
250  else if((opdetType == "xarapuca_vuv") || (opdetType == "xarapuca_vis")) {
251  for(unsigned int i = 0; i < waveform.size(); i++) waveform[i] = fPulsePolarityArapuca * (waveform[i] - baseline);
252  }
253  else {
254  mf::LogWarning("opHitFinder") << "Unexpected OpChannel: " << opdetType;
255  return;
256  }
257  }
258 
259 
260  // TODO: pass rms to this function once that's sorted. ~icaza
261  bool opHitFinderSBND::findAndSuppressPeak(std::vector<double>& waveform,
262  size_t& timebin, double& Area,
263  double& amplitude, const int& threshold,
264  const std::string& opdetType,
265  const std::string& electronicsType)
266  {
267 
268  std::vector<double>::iterator max_element_it = std::max_element(waveform.begin(), waveform.end());
269  amplitude = *max_element_it;
270  if(amplitude < threshold) return false; // stop if there's no more peaks
271  timebin = std::distance(waveform.begin(), max_element_it);
272 
273  // it_e contains the iterator to the last element in the peak
274  // where waveform is above threshold
275  auto it_e = std::find_if(max_element_it,
276  waveform.end(),
277  [threshold](const double& x)->bool
278  {return x < threshold;} );
279  // it_s contains the iterator to the first element in the peak
280  // where waveform is above threshold
281  auto it_s = std::find_if(std::make_reverse_iterator(max_element_it),
282  std::make_reverse_iterator(waveform.begin()),
283  [threshold](const double& x)->bool
284  {return x < threshold;} ).base();
285 
286  // integrate the area below the peak
287  // note that fSampling is in MHz and
288  // we convert it to GHz here so as to
289  // have an area in ADC*ns.
290  Area = std::accumulate(it_s, it_e, 0.0);
291  if (electronicsType == "daphne"){
292  Area = Area / (fSampling_Daphne / 1000.);}
293  else{
294  Area = Area / (fSampling / 1000.);};
295 
296  // TODO: try to just remove this
297  // TODO: better even, return iterator to last position
298  std::fill(it_s, it_e, 0.0); // zeroes out that peak
299  return true;
300  } // bool opHitFinderSBND::findAndSuppressPeak()
301 
302 
303  void opHitFinderSBND::denoise(std::vector<double>& waveform, std::vector<double>& outwaveform)
304  {
305 
306  int wavelength = waveform.size();
307  outwaveform = waveform; // copy
308  double lambda = 10.0;
309  const uint retries = 5; uint try_ = 0;
310  if (wavelength > 0) {
311  while (try_ <= retries) {
312  if (TV1D_denoise(waveform, outwaveform, lambda)) break;
313  try_++;
314  mf::LogInfo("opHitFinder") << try_ << "/" << retries
315  << " Coming out of TV1D_denoise() unsuccessfully, "
316  << "using lambda: " << lambda;
317  lambda += 0.1 * lambda;
318  if (try_ == retries) mf::LogWarning("opHitFinder") << "Couldn't denoise!";
319  }
320  }
321  // if (wavelength > 0) TV1D_denoise_v2(waveform, outwaveform, wavelength, lambda);
322 
323  // TODO: fairly certain this for is completely redundant,
324  // and if not a std::move or swap would be better. ~icaza
325  for(int i = 0; i < wavelength; i++) {
326  if(outwaveform[i]) waveform[i] = outwaveform[i];
327  }
328  } // void opHitFinderSBND::denoise()
329 
330  // TODO: this function is not robust, check if the expected input is given and put exceptions
331  bool opHitFinderSBND::TV1D_denoise(std::vector<double>& waveform,
332  std::vector<double>& outwaveform,
333  const double lambda)
334  {
335  int width = waveform.size();
336  int k = 0, k0 = 0; // k: current sample location, k0: beginning of current segment
337  double umin = lambda, umax = -lambda; // u is the dual variable
338  double vmin = waveform[0] - lambda, vmax = waveform[0] + lambda; // bounds for the segment's value
339  int kplus = 0, kminus = 0; // last positions where umax=-lambda, umin=lambda, respectively
340  const double twolambda = 2.0 * lambda; // auxiliary variable
341  const double minlambda = -lambda; // auxiliary variable
342  for (;;) { // simple loop, the exit test is inside
343  while (k == width - 1) { // we use the right boundary condition
344  if (umin < 0.0) { // vmin is too high -> negative jump necessary
345  do outwaveform[k0++] = vmin; while (k0 <= kminus);
346  umax = (vmin = waveform[kminus = k = k0]) + (umin = lambda) - vmax;
347  }
348  else if (umax > 0.0) { // vmax is too low -> positive jump necessary
349  do outwaveform[k0++] = vmax; while (k0 <= kplus);
350  umin = (vmax = waveform[kplus = k = k0]) + (umax = minlambda) - vmin;
351  }
352  else {
353  vmin += umin / (k - k0 + 1);
354  do outwaveform[k0++] = vmin; while(k0 <= k);
355  return true;
356  }
357  } // while (k == width - 1)
358  if ((umin += waveform[k + 1] - vmin) < minlambda) { // negative jump necessary
359  if (k0 > width) return false;
360  do outwaveform[k0++] = vmin; while (k0 <= kminus);
361  vmax = (vmin = waveform[kplus = kminus = k = k0]) + twolambda;
362  umin = lambda; umax = minlambda;
363  }
364  else if ((umax += waveform[k + 1] - vmax) > lambda) { // positive jump necessary
365  if (k0 > width) return false;
366  do outwaveform[k0++] = vmax; while (k0 <= kplus);
367  vmin = (vmax = waveform[kplus = kminus = k = k0]) - twolambda;
368  umin = lambda; umax = minlambda;
369  }
370  else { //no jump necessary, we continue
371  k++;
372  if (k > width) return false;
373  if (umin >= lambda) { // update of vmin
374  vmin += (umin - lambda) / ((kminus = k) - k0 + 1);
375  umin = lambda;
376  }
377  if (umax <= minlambda) { // update of vmax
378  vmax += (umax + lambda) / ((kplus = k) - k0 + 1);
379  umax = minlambda;
380  }
381  }
382  } // for (;;)
383  } // bool opHitFinderSBND::TV1D_denoise()
384 
385 
386  void opHitFinderSBND::TV1D_denoise_v2(std::vector<double>& input, std::vector<double>& output,
387  unsigned int width, const double lambda)
388  {
389  // unsigned int* indstart_low = malloc(sizeof *indstart_low * width);
390  // unsigned int* indstart_up = malloc(sizeof *indstart_up * width);
391  std::vector<unsigned int> indstart_low(width);
392  std::vector<unsigned int> indstart_up(width);
393  unsigned int j_low = 0, j_up = 0, jseg = 0, indjseg = 0, i = 1, indjseg2, ind;
394  double output_low_first = input[0] - lambda;
395  double output_low_curr = output_low_first;
396  double output_up_first = input[0] + lambda;
397  double output_up_curr = output_up_first;
398  const double twolambda = 2.0 * lambda;
399  if (width == 1) {
400  output[0] = input[0];
401  return;
402  }
403  indstart_low[0] = 0;
404  indstart_up[0] = 0;
405  width--;
406  for (; i < width; i++) {
407  if (input[i] >= output_low_curr) {
408  if (input[i] <= output_up_curr) {
409  output_up_curr += (input[i] - output_up_curr) / (i - indstart_up[j_up] + 1);
410  output[indjseg] = output_up_first;
411  while ((j_up > jseg) && (output_up_curr <= output[ind = indstart_up[j_up - 1]]))
412  output_up_curr += (output[ind] - output_up_curr) *
413  ((double)(indstart_up[j_up--] - ind) / (i - ind + 1));
414  if (j_up == jseg) {
415  while ((output_up_curr <= output_low_first) && (jseg < j_low)) {
416  indjseg2 = indstart_low[++jseg];
417  output_up_curr += (output_up_curr - output_low_first) *
418  ((double)(indjseg2 - indjseg) / (i - indjseg2 + 1));
419  while (indjseg < indjseg2) output[indjseg++] = output_low_first;
420  output_low_first = output[indjseg];
421  }
422  output_up_first = output_up_curr;
423  indstart_up[j_up = jseg] = indjseg;
424  }
425  else output[indstart_up[j_up]] = output_up_curr;
426  }
427  else
428  output_up_curr = output[i] = input[indstart_up[++j_up] = i];
429  output_low_curr += (input[i] - output_low_curr) / (i - indstart_low[j_low] + 1);
430  output[indjseg] = output_low_first;
431  while ((j_low > jseg) && (output_low_curr >= output[ind = indstart_low[j_low - 1]]))
432  output_low_curr += (output[ind] - output_low_curr) *
433  ((double)(indstart_low[j_low--] - ind) / (i - ind + 1));
434  if (j_low == jseg) {
435  while ((output_low_curr >= output_up_first) && (jseg < j_up)) {
436  indjseg2 = indstart_up[++jseg];
437  output_low_curr += (output_low_curr - output_up_first) *
438  ((double)(indjseg2 - indjseg) / (i - indjseg2 + 1));
439  while (indjseg < indjseg2) output[indjseg++] = output_up_first;
440  output_up_first = output[indjseg];
441  }
442  if ((indstart_low[j_low = jseg] = indjseg) == i) output_low_first = output_up_first - twolambda;
443  else output_low_first = output_low_curr;
444  }
445  else output[indstart_low[j_low]] = output_low_curr;
446  }
447  else {
448  output_up_curr += ((output_low_curr = output[i] = input[indstart_low[++j_low] = i]) -
449  output_up_curr) / (i - indstart_up[j_up] + 1);
450  output[indjseg] = output_up_first;
451  while ((j_up > jseg) && (output_up_curr <= output[ind = indstart_up[j_up - 1]]))
452  output_up_curr += (output[ind] - output_up_curr) *
453  ((double)(indstart_up[j_up--] - ind) / (i - ind + 1));
454  if (j_up == jseg) {
455  while ((output_up_curr <= output_low_first) && (jseg < j_low)) {
456  indjseg2 = indstart_low[++jseg];
457  output_up_curr += (output_up_curr - output_low_first) *
458  ((double)(indjseg2 - indjseg) / (i - indjseg2 + 1));
459  while (indjseg < indjseg2) output[indjseg++] = output_low_first;
460  output_low_first = output[indjseg];
461  }
462  if ((indstart_up[j_up = jseg] = indjseg) == i) output_up_first = output_low_first + twolambda;
463  else output_up_first = output_up_curr;
464  }
465  else output[indstart_up[j_up]] = output_up_curr;
466  }
467  }
468  /* here i==width (with value the actual width minus one) */
469  if (input[i] + lambda <= output_low_curr) {
470  while (jseg < j_low) {
471  indjseg2 = indstart_low[++jseg];
472  while (indjseg < indjseg2) output[indjseg++] = output_low_first;
473  output_low_first = output[indjseg];
474  }
475  while (indjseg < i) output[indjseg++] = output_low_first;
476  output[indjseg] = input[i] + lambda;
477  }
478  else if (input[i] - lambda >= output_up_curr) {
479  while (jseg < j_up) {
480  indjseg2 = indstart_up[++jseg];
481  while (indjseg < indjseg2) output[indjseg++] = output_up_first;
482  output_up_first = output[indjseg];
483  }
484  while (indjseg < i) output[indjseg++] = output_up_first;
485  output[indjseg] = input[i] - lambda;
486  }
487  else {
488  output_low_curr += (input[i] + lambda - output_low_curr) / (i - indstart_low[j_low] + 1);
489  output[indjseg] = output_low_first;
490  while ((j_low > jseg) && (output_low_curr >= output[ind = indstart_low[j_low - 1]]))
491  output_low_curr += (output[ind] - output_low_curr) *
492  ((double)(indstart_low[j_low--] - ind) / (i - ind + 1));
493  if (j_low == jseg) {
494  if (output_up_first >= output_low_curr)
495  while (indjseg <= i) output[indjseg++] = output_low_curr;
496  else {
497  output_up_curr += (input[i] - lambda - output_up_curr) / (i - indstart_up[j_up] + 1);
498  output[indjseg] = output_up_first;
499  while ((j_up > jseg) && (output_up_curr <= output[ind = indstart_up[j_up - 1]]))
500  output_up_curr += (output[ind] - output_up_curr) *
501  ((double)(indstart_up[j_up--] - ind) / (i - ind + 1));
502  while (jseg < j_up) {
503  indjseg2 = indstart_up[++jseg];
504  while (indjseg < indjseg2) output[indjseg++] = output_up_first;
505  output_up_first = output[indjseg];
506  }
507  indjseg = indstart_up[j_up];
508  while (indjseg <= i) output[indjseg++] = output_up_curr;
509  }
510  }
511  else {
512  while (jseg < j_low) {
513  indjseg2 = indstart_low[++jseg];
514  while (indjseg < indjseg2) output[indjseg++] = output_low_first;
515  output_low_first = output[indjseg];
516  }
517  indjseg = indstart_low[j_low];
518  while (indjseg <= i) output[indjseg++] = output_low_curr;
519  }
520  }
521  // free(indstart_low);
522  // free(indstart_up);
523  }// void opHitFinderSBND::TV1D_denoise_v2()
524 
525 } // namespace opdet
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
process_name opflash particleana ie x
void TV1D_denoise_v2(std::vector< double > &input, std::vector< double > &output, unsigned int width, const double lambda)
double lambda(double a, double b, double c)
pdgs p
Definition: selectors.fcl:22
opdet::sbndPDMapAlg map
process_name eventweight kplus
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
std::vector< double > outwvform
Simulation objects for optical detectors.
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
Service to provide microboone-specific signal shaping for simulation (convolution) and reconstruction...
void subtractBaseline(TH1D *hist, std::string pdtype, double &rms)
opHitFinderSBND(fhicl::ParameterSet const &p, const detinfo::DetectorClocks *timeService)
BEGIN_PROLOG baseline
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
j template void())
Definition: json.hpp:3108
std::vector< double > fwaveform
void TV1D_denoise(float *input, float *&output, const int width, const float lambda)
void produce(art::Event &e) override
std::string electronicsType(size_t ch) const
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
opHitFinderSBND & operator=(opHitFinderSBND const &)=delete
object containing MC truth information necessary for making RawDigits and doing back tracking ...
do i e
art::ServiceHandle< art::TFileService > tfs
pdgs k
Definition: selectors.fcl:22
process_name eventweight kminus
std::string pdType(size_t ch) const override
Tools and modules for checking out the basics of the Monte Carlo.
art framework interface to geometry description
bool findAndSuppressPeak(std::vector< double > &waveform, size_t &timebin, double &Area, double &amplitude, const int &threshold, const std::string &opdetType, const std::string &electronicsType)