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