LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DataProviderAlg.cxx
Go to the documentation of this file.
1 // Class: PointIdAlg
3 // Author: P.Plonski, R.Sulej (Robert.Sulej@cern.ch), D.Stefan, May 2016
5 
7 
10 
11 #include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom<>()
12 
13 #include "larevt/CalibrationDBI/Interface/ChannelStatusService.h"
14 #include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h"
15 
17 
18 #include "CLHEP/Random/RandGauss.h"
19 
21  fCryo(9999), fTPC(9999), fPlane(9999),
22  fNWires(0), fNDrifts(0), fNScaledDrifts(0), fNCachedDrifts(0),
23  fDownscaleMode(img::DataProviderAlg::kMax), fDriftWindow(10),
24  fCalorimetryAlg(config.CalorimetryAlg()),
25  fGeometry( &*(art::ServiceHandle<geo::Geometry>()) ),
26  fDetProp(lar::providerFrom<detinfo::DetectorPropertiesService>()),
27  fAdcSumOverThr(0), fAdcSumThr(10), // set fixed threshold of 10 ADC counts for counting the sum
28  fAdcAreaOverThr(0),
29  fNoiseSigma(0), fCoherentSigma(0)
30 {
33  fCalibrateAmpl = config.CalibrateAmpl();
34 
36  if (fCalibrateAmpl)
37  {
38  mf::LogInfo("DataProviderAlg") << "Using calibration constants:";
39  for (size_t p = 0; p < fAmplCalibConst.size(); ++p)
40  {
41  try
42  {
44  mf::LogInfo("DataProviderAlg") << " plane:" << p << " const:" << 1.0 / fAmplCalibConst[p];
45  }
46  catch (...) { fAmplCalibConst[p] = 1.0; }
47  }
48  }
49  else
50  {
51  mf::LogInfo("DataProviderAlg") << "No plane-to-plane calibration.";
52  for (size_t p = 0; p < fAmplCalibConst.size(); ++p) { fAmplCalibConst[p] = 1.0; }
53  }
54 
55  fDriftWindow = config.DriftWindow();
58 
59  std::string mode_str = config.DownscaleFn();
60  mf::LogVerbatim("DataProviderAlg") << "Downscale mode is: " << mode_str;
61  if (mode_str == "maxpool")
62  {
63  //fnDownscale = [this](std::vector<float> & dst, std::vector<float> const & adc, size_t tick0) { downscaleMax(dst, adc, tick0); };
65  }
66  else if (mode_str == "maxmean")
67  {
68  //fnDownscale = [this](std::vector<float> & dst, std::vector<float> const & adc, size_t tick0) { downscaleMaxMean(dst, adc, tick0); };
70  }
71  else if (mode_str == "mean")
72  {
73  //fnDownscale = [this](std::vector<float> & dst, std::vector<float> const & adc, size_t tick0) { downscaleMean(dst, adc, tick0); };
75  }
76  else
77  {
78  mf::LogError("DataProviderAlg") << "Downscale mode string not recognized, set to max pooling.";
79  //fnDownscale = [this](std::vector<float> & dst, std::vector<float> const & adc, size_t tick0) { downscaleMax(dst, adc, tick0); };
81  }
82 
83  fAdcMax = config.AdcMax();
84  fAdcMin = config.AdcMin();
85  fAdcOffset = config.OutMin();
86  fAdcScale = (config.OutMax() - fAdcOffset) / (fAdcMax - fAdcMin);
87  fAdcZero = fAdcOffset + fAdcScale * (0 - fAdcMin); // level of zero ADC after scaling
88 
89  if (fAdcMax <= fAdcMin) { throw cet::exception("img::DataProviderAlg") << "Misconfigured: AdcMax <= AdcMin" << std::endl; }
90  if (fAdcScale == 0) { throw cet::exception("img::DataProviderAlg") << "Misconfigured: OutMax == OutMin" << std::endl; }
91 
92  fBlurKernel = config.BlurKernel();
93  fNoiseSigma = config.NoiseSigma();
94  fCoherentSigma = config.CoherentSigma();
95 }
96 // ------------------------------------------------------
97 
99 {
100 }
101 // ------------------------------------------------------
102 
103 void img::DataProviderAlg::resizeView(size_t wires, size_t drifts)
104 {
105  fNWires = wires; fNDrifts = drifts;
106  fNScaledDrifts = drifts / fDriftWindow;
107 
109  else { fNCachedDrifts = fNDrifts; }
110 
111  fWireChannels.resize(wires);
113 
114  fWireDriftData.resize(wires);
115  for (auto & w : fWireDriftData)
116  {
117  w.resize(fNCachedDrifts);
118  std::fill(w.begin(), w.end(), fAdcZero);
119  }
120 
122  if (fCalibrateLifetime)
123  {
124  for (size_t t = 0; t < fNDrifts; ++t) { fLifetimeCorrFactors[t] = fCalorimetryAlg.LifetimeCorrection(t); }
125  }
126  else
127  {
128  for (size_t t = 0; t < fNDrifts; ++t) { fLifetimeCorrFactors[t] = 1.0; }
129  }
130 }
131 // ------------------------------------------------------
132 
133 float img::DataProviderAlg::poolMax(int wire, int drift, size_t r) const
134 {
135  size_t rw = r, rd = r;
136  if (!fDownscaleFullView) { rd *= fDriftWindow; }
137 
138  size_t didx = getDriftIndex(drift);
139  int d0 = didx - rd; if (d0 < 0) { d0 = 0; }
140  int d1 = didx + rd; if (d1 >= (int)fNCachedDrifts) { d1 = fNCachedDrifts - 1; }
141 
142  int w0 = wire - rw; if (w0 < 0) { w0 = 0; }
143  int w1 = wire + rw; if (w1 >= (int)fNWires) { w1 = fNWires - 1; }
144 
145  float adc, max_adc = 0;
146  for (int w = w0; w <= w1; ++w)
147  {
148  auto const * col = fWireDriftData[w].data();
149  for (int d = d0; d <= d1; ++d)
150  {
151  adc = col[d]; if (adc > max_adc) { max_adc = adc; }
152  }
153  }
154 
155  return max_adc;
156 }
157 // ------------------------------------------------------
158 
159 float img::DataProviderAlg::poolSum(int wire, int drift, size_t r) const
160 {
161  size_t rw = r, rd = r;
162  if (!fDownscaleFullView) { rd *= fDriftWindow; }
163 
164  size_t didx = getDriftIndex(drift);
165  int d0 = didx - rd; if (d0 < 0) { d0 = 0; }
166  int d1 = didx + rd; if (d1 >= (int)fNCachedDrifts) { d1 = fNCachedDrifts - 1; }
167 
168  int w0 = wire - rw; if (w0 < 0) { w0 = 0; }
169  int w1 = wire + rw; if (w1 >= (int)fNWires) { w1 = fNWires - 1; }
170 
171  float sum = 0;
172  for (int w = w0; w <= w1; ++w)
173  {
174  auto const * col = fWireDriftData[w].data();
175  for (int d = d0; d <= d1; ++d) { sum += col[d]; }
176  }
177 
178  return sum;
179 }
180 // ------------------------------------------------------
181 
182 void img::DataProviderAlg::downscaleMax(std::vector<float> & dst, std::vector<float> const & adc, size_t tick0) const
183 {
184  size_t kStop = dst.size();
185  if (adc.size() < kStop) { kStop = adc.size(); }
186  for (size_t i = 0, k0 = 0; i < kStop; ++i, k0 += fDriftWindow)
187  {
188  size_t k1 = k0 + fDriftWindow;
189 
190  float max_adc = adc[k0] * fLifetimeCorrFactors[k0 + tick0];
191  for (size_t k = k0 + 1; k < k1; ++k)
192  {
193  float ak = adc[k] * fLifetimeCorrFactors[k + tick0];
194  if (ak > max_adc) max_adc = ak;
195  }
196 
197  dst[i] = max_adc;
198  }
199  scaleAdcSamples(dst);
200 }
201 
202 void img::DataProviderAlg::downscaleMaxMean(std::vector<float> & dst, std::vector<float> const & adc, size_t tick0) const
203 {
204  size_t kStop = dst.size();
205  if (adc.size() < kStop) { kStop = adc.size(); }
206  for (size_t i = 0, k0 = 0; i < kStop; ++i, k0 += fDriftWindow)
207  {
208  size_t k1 = k0 + fDriftWindow;
209 
210  size_t max_idx = k0;
211  float max_adc = adc[k0] * fLifetimeCorrFactors[k0 + tick0];
212  for (size_t k = k0 + 1; k < k1; ++k)
213  {
214  float ak = adc[k] * fLifetimeCorrFactors[k + tick0];
215  if (ak > max_adc) { max_adc = ak; max_idx = k; }
216  }
217 
218  size_t n = 1;
219  if (max_idx > 0) { max_adc += adc[max_idx - 1] * fLifetimeCorrFactors[max_idx - 1 + tick0]; n++; }
220  if (max_idx + 1 < adc.size()) { max_adc += adc[max_idx + 1] * fLifetimeCorrFactors[max_idx + 1 + tick0]; n++; }
221 
222  dst[i] = max_adc / n;
223  }
224  scaleAdcSamples(dst);
225 }
226 
227 void img::DataProviderAlg::downscaleMean(std::vector<float> & dst, std::vector<float> const & adc, size_t tick0) const
228 {
229  size_t kStop = dst.size();
230  if (adc.size() < kStop) { kStop = adc.size(); }
231  for (size_t i = 0, k0 = 0; i < kStop; ++i, k0 += fDriftWindow)
232  {
233  size_t k1 = k0 + fDriftWindow;
234 
235  float sum_adc = 0;
236  for (size_t k = k0; k < k1; ++k)
237  {
238  sum_adc += adc[k] * fLifetimeCorrFactors[k + tick0];
239  }
240  dst[i] = sum_adc * fDriftWindowInv;
241  }
242  scaleAdcSamples(dst);
243 }
244 
245 bool img::DataProviderAlg::setWireData(std::vector<float> const & adc, size_t wireIdx)
246 {
247  if (wireIdx >= fWireDriftData.size()) return false;
248  auto & wData = fWireDriftData[wireIdx];
249 
250  if (fDownscaleFullView)
251  {
252  if (!adc.empty()) { downscale(wData, adc, 0); }
253  else { return false; }
254  }
255  else
256  {
257  if (adc.empty()) { return false; }
258  else if (adc.size() <= wData.size()) { std::copy(adc.begin(), adc.end(), wData.begin()); }
259  else { std::copy(adc.begin(), adc.begin()+wData.size(), wData.begin()); }
260  }
261  return true;
262 }
263 // ------------------------------------------------------
264 
265 bool img::DataProviderAlg::setWireDriftData(const std::vector<recob::Wire> & wires,
266  unsigned int plane, unsigned int tpc, unsigned int cryo)
267 {
268  mf::LogInfo("DataProviderAlg") << "Create image for cryo:"
269  << cryo << " tpc:" << tpc << " plane:" << plane;
270 
271  fCryo = cryo; fTPC = tpc; fPlane = plane;
272 
273  fAdcSumOverThr = 0;
274  fAdcAreaOverThr = 0;
275 
276  size_t nwires = fGeometry->Nwires(plane, tpc, cryo);
277  size_t ndrifts = fDetProp->NumberTimeSamples();
278 
279  resizeView(nwires, ndrifts);
280 
281  auto const & channelStatus = art::ServiceHandle< lariov::ChannelStatusService >()->GetProvider();
282 
283  bool allWrong = true;
284  for (auto const & wire : wires)
285  {
286  auto wireChannelNumber = wire.Channel();
287  if (!channelStatus.IsGood(wireChannelNumber)) { continue; }
288 
289  size_t w_idx = 0;
290  for (auto const& id : fGeometry->ChannelToWire(wireChannelNumber))
291  {
292  if ((id.Plane == plane) && (id.TPC == tpc) && (id.Cryostat == cryo))
293  {
294  w_idx = id.Wire;
295 
296  auto adc = wire.Signal();
297  if (adc.size() < ndrifts)
298  {
299  mf::LogWarning("DataProviderAlg") << "Wire ADC vector size lower than NumberTimeSamples.";
300  continue; // not critical, maybe other wires are OK, so continue
301  }
302 
303  if (!setWireData(adc, w_idx))
304  {
305  mf::LogWarning("DataProviderAlg") << "Wire data not set.";
306  continue; // also not critical, try to set other wires
307  }
308 
309  for (auto v : adc) { if (v >= fAdcSumThr) { fAdcSumOverThr += v; fAdcAreaOverThr++; } }
310 
311  fWireChannels[w_idx] = wireChannelNumber;
312  allWrong = false;
313  }
314  }
315  }
316  if (allWrong)
317  {
318  mf::LogError("DataProviderAlg") << "Wires data not set in the cryo:"
319  << cryo << " tpc:" << tpc << " plane:" << plane;
320  return false;
321  }
322 
323  applyBlur();
324  addWhiteNoise();
326 
327  return true;
328 }
329 // ------------------------------------------------------
330 
332 {
333  val *= fAmplCalibConst[fPlane]; // prescale by plane-to-plane calibration factors
334 
335  if (val < fAdcMin) { val = fAdcMin; } // saturate
336  else if (val > fAdcMax) { val = fAdcMax; }
337 
338  return fAdcOffset + fAdcScale * (val - fAdcMin); // shift and scale to the output range, shift to the output min
339 }
340 // ------------------------------------------------------
341 void img::DataProviderAlg::scaleAdcSamples(std::vector< float > & values) const
342 {
343  float calib = fAmplCalibConst[fPlane];
344  auto * data = values.data();
345 
346  size_t k = 0, size4 = values.size() >> 2, size = values.size();
347  for (size_t i = 0; i < size4; ++i) // vectorize if you can
348  {
349  data[k] *= calib; // prescale by plane-to-plane calibration factors
350  data[k+1] *= calib;
351  data[k+2] *= calib;
352  data[k+3] *= calib;
353 
354  if (data[k] < fAdcMin) { data[k] = fAdcMin; } // saturate min
355  if (data[k+1] < fAdcMin) { data[k+1] = fAdcMin; }
356  if (data[k+2] < fAdcMin) { data[k+2] = fAdcMin; }
357  if (data[k+3] < fAdcMin) { data[k+3] = fAdcMin; }
358 
359  if (data[k] > fAdcMax) { data[k] = fAdcMax; } // saturate max
360  if (data[k+1] > fAdcMax) { data[k+1] = fAdcMax; }
361  if (data[k+2] > fAdcMax) { data[k+2] = fAdcMax; }
362  if (data[k+3] > fAdcMax) { data[k+3] = fAdcMax; }
363 
364  data[k] = fAdcOffset + fAdcScale * (data[k] - fAdcMin); // shift and scale to the output range, shift to the output min
365  data[k+1] = fAdcOffset + fAdcScale * (data[k+1] - fAdcMin);
366  data[k+2] = fAdcOffset + fAdcScale * (data[k+2] - fAdcMin);
367  data[k+3] = fAdcOffset + fAdcScale * (data[k+3] - fAdcMin);
368 
369  k += 4;
370  }
371  while (k < size) { data[k] = scaleAdcSample(data[k]); ++k; } // do the tail
372 }
373 // ------------------------------------------------------
374 
376 {
377  if (fBlurKernel.size() < 2) return;
378 
379  size_t margin_left = (fBlurKernel.size()-1) >> 1, margin_right = fBlurKernel.size() - margin_left - 1;
380 
381  std::vector< std::vector<float> > src(fWireDriftData.size());
382  for (size_t w = 0; w < fWireDriftData.size(); ++w) { src[w] = fWireDriftData[w]; }
383 
384  for (size_t w = margin_left; w < fWireDriftData.size() - margin_right; ++w)
385  {
386  for (size_t d = 0; d < fWireDriftData[w].size(); ++d)
387  {
388  float sum = 0;
389  for (size_t i = 0; i < fBlurKernel.size(); ++i)
390  {
391  sum += fBlurKernel[i] * src[w + i - margin_left][d];
392  }
393  fWireDriftData[w][d] = sum;
394  }
395  }
396 }
397 // ------------------------------------------------------
398 
399 // MUST give the same result as get_patch() in scripts/utils.py
400 bool img::DataProviderAlg::patchFromDownsampledView(size_t wire, float drift, size_t size_w, size_t size_d,
401  std::vector< std::vector<float> > & patch) const
402 {
403  int halfSizeW = size_w / 2;
404  int halfSizeD = size_d / 2;
405 
406  int w0 = wire - halfSizeW;
407  int w1 = wire + halfSizeW;
408 
409  size_t sd = (size_t)(drift / fDriftWindow);
410  int d0 = sd - halfSizeD;
411  int d1 = sd + halfSizeD;
412 
413  int wsize = fWireDriftData.size();
414  for (int w = w0, wpatch = 0; w < w1; ++w, ++wpatch)
415  {
416  auto & dst = patch[wpatch];
417  if ((w >= 0) && (w < wsize))
418  {
419  auto & src = fWireDriftData[w];
420  int dsize = src.size();
421  for (int d = d0, dpatch = 0; d < d1; ++d, ++dpatch)
422  {
423  if ((d >= 0) && (d < dsize))
424  {
425  dst[dpatch] = src[d];
426  }
427  else
428  {
429  dst[dpatch] = fAdcZero;
430  }
431  }
432  }
433  else
434  {
435  std::fill(dst.begin(), dst.end(), fAdcZero);
436  }
437  }
438 
439  return true;
440 }
441 
442 bool img::DataProviderAlg::patchFromOriginalView(size_t wire, float drift, size_t size_w, size_t size_d,
443  std::vector< std::vector<float> > & patch) const
444 {
445  int dsize = fDriftWindow * size_d;
446  int halfSizeW = size_w / 2;
447  int halfSizeD = dsize / 2;
448 
449  int w0 = wire - halfSizeW;
450  int w1 = wire + halfSizeW;
451 
452  int d0 = drift - halfSizeD;
453  int d1 = drift + halfSizeD;
454 
455  std::vector<float> tmp(dsize);
456  int wsize = fWireDriftData.size();
457  for (int w = w0, wpatch = 0; w < w1; ++w, ++wpatch)
458  {
459  if ((w >= 0) && (w < wsize))
460  {
461  auto & src = fWireDriftData[w];
462  int src_size = src.size();
463  for (int d = d0, dpatch = 0; d < d1; ++d, ++dpatch)
464  {
465  if ((d >= 0) && (d < src_size))
466  {
467  tmp[dpatch] = src[d];
468  }
469  else
470  {
471  tmp[dpatch] = fAdcZero;
472  }
473  }
474  }
475  else
476  {
477  std::fill(tmp.begin(), tmp.end(), fAdcZero);
478  }
479 
480  downscale(patch[wpatch], tmp, d0);
481  }
482 
483  return true;
484 }
485 // ------------------------------------------------------
486 
488 {
489  if (fNoiseSigma == 0) return;
490 
491  double effectiveSigma = scaleAdcSample(fNoiseSigma);
492  if (fDownscaleFullView) effectiveSigma /= fDriftWindow;
493 
494  CLHEP::RandGauss gauss(fRndEngine);
495  std::vector<double> noise(fNCachedDrifts);
496  for (auto & wire : fWireDriftData)
497  {
498  gauss.fireArray(fNCachedDrifts, noise.data(), 0., effectiveSigma);
499  for (size_t d = 0; d < wire.size(); ++d)
500  {
501  wire[d] += noise[d];
502  }
503  }
504 }
505 // ------------------------------------------------------
506 
508 {
509  if (fCoherentSigma == 0) return;
510 
511  double effectiveSigma = scaleAdcSample(fCoherentSigma);
512  if (fDownscaleFullView) effectiveSigma /= fDriftWindow;
513 
514  CLHEP::RandGauss gauss(fRndEngine);
515  std::vector<double> amps1(fWireDriftData.size());
516  std::vector<double> amps2(1 + (fWireDriftData.size() / 32));
517  gauss.fireArray(amps1.size(), amps1.data(), 1., 0.1); // 10% wire-wire ampl. variation
518  gauss.fireArray(amps2.size(), amps2.data(), 1., 0.1); // 10% group-group ampl. variation
519 
520  double group_amp = 1.0;
521  std::vector<double> noise(fNCachedDrifts);
522  for (size_t w = 0; w < fWireDriftData.size(); ++w)
523  {
524  if ((w & 31) == 0)
525  {
526  group_amp = amps2[w >> 5]; // div by 32
527  gauss.fireArray(fNCachedDrifts, noise.data(), 0., effectiveSigma);
528  } // every 32 wires
529 
530  auto & wire = fWireDriftData[w];
531  for (size_t d = 0; d < wire.size(); ++d)
532  {
533  wire[d] += group_amp * amps1[w] * noise[d];
534  }
535  }
536 }
537 // ------------------------------------------------------
538 
virtual void resizeView(size_t wires, size_t drifts)
std::vector< float > fLifetimeCorrFactors
geo::GeometryCore const * fGeometry
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
fhicl::Atom< float > AdcMax
std::vector< raw::ChannelID_t > fWireChannels
Utilities related to art service access.
fhicl::Atom< float > CoherentSigma
float poolSum(int wire, int drift, size_t r=0) const
Pool sum of pixels in a patch around the wire/drift pixel.
void downscaleMaxMean(std::vector< float > &dst, std::vector< float > const &adc, size_t tick0) const
std::vector< std::vector< float > > fWireDriftData
T::provider_type const * providerFrom()
Returns a constant pointer to the provider of specified service.
Definition: ServiceUtil.h:77
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
bool patchFromDownsampledView(size_t wire, float drift, size_t size_w, size_t size_d, std::vector< std::vector< float > > &patch) const
fhicl::Atom< unsigned int > DriftWindow
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
void reconfigure(const Config &config)
DataProviderAlg(const fhicl::ParameterSet &pset)
Float_t tmp
Definition: plot.C:37
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
bool setWireDriftData(const std::vector< recob::Wire > &wires, unsigned int plane, unsigned int tpc, unsigned int cryo)
unsigned int noise()
Definition: chem4.cc:265
bool setWireData(std::vector< float > const &adc, size_t wireIdx)
std::vector< float > fBlurKernel
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
double ElectronsFromADCPeak(double adc, unsigned short plane) const
fhicl::Sequence< float > BlurKernel
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:31
unsigned int MaxPlanes() const
Returns the largest number of planes among all TPCs in this detector.
detinfo::DetectorProperties const * fDetProp
fhicl::Atom< bool > DownscaleFullView
void downscaleMax(std::vector< float > &dst, std::vector< float > const &adc, size_t tick0) const
unsigned int fNCachedDrifts
void scaleAdcSamples(std::vector< float > &values) const
Int_t col[ntarg]
Definition: Style.C:29
Float_t d
Definition: plot.C:237
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
General LArSoft Utilities.
virtual unsigned int NumberTimeSamples() const =0
unsigned int Plane(void) const
float scaleAdcSample(float val) const
fhicl::Atom< float > AdcMin
calo::CalorimetryAlg fCalorimetryAlg
fhicl::Atom< bool > CalibrateLifetime
LArSoft-specific namespace.
unsigned int fNScaledDrifts
fhicl::Table< calo::CalorimetryAlg::Config > CalorimetryAlg
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::vector< float > fAmplCalibConst
HLT enums.
fhicl::Atom< std::string > DownscaleFn
Char_t n[5]
fhicl::Atom< bool > CalibrateAmpl
EDownscaleMode fDownscaleMode
fhicl::Atom< float > OutMin
fhicl::Atom< float > OutMax
CLHEP::HepJamesRandom fRndEngine
float poolMax(int wire, int drift, size_t r=0) const
Pool max value in a patch around the wire/drift pixel.
bool patchFromOriginalView(size_t wire, float drift, size_t size_w, size_t size_d, std::vector< std::vector< float > > &patch) const
void downscale(std::vector< float > &dst, std::vector< float > const &adc, size_t tick0) const
Namespace collecting geometry-related classes utilities.
double LifetimeCorrection(double time, double T0=0) const
Float_t w
Definition: plot.C:23
size_t getDriftIndex(float drift) const
void downscaleMean(std::vector< float > &dst, std::vector< float > const &adc, size_t tick0) const
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
virtual ~DataProviderAlg(void)
fhicl::Atom< float > NoiseSigma