LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
HitCreator.cxx
Go to the documentation of this file.
1 
10 // declaration header
12 
13 // C/C++ standard library
14 #include <algorithm> // std::accumulate(), std::max()
15 #include <cassert>
16 #include <limits> // std::numeric_limits<>
17 #include <utility> // std::move()
18 
19 // art libraries
24 
25 // LArSoft libraries
30 
31 namespace {
32 
34  template <typename Left, typename Right, typename Metadata>
35  void ClearAssociations(art::Assns<Left, Right, Metadata>& assns)
36  {
38  assns.swap(empty);
39  } // ClearAssociations()
40 
41 } // local namespace
42 
44 namespace recob {
45 
46  //****************************************************************************
47  //*** HitCreator
48  //----------------------------------------------------------------------
50  geo::WireID const& wireID,
51  raw::TDCtick_t start_tick,
52  raw::TDCtick_t end_tick,
53  float rms,
54  float peak_time,
55  float sigma_peak_time,
56  float peak_amplitude,
57  float sigma_peak_amplitude,
58  float hit_integral,
59  float hit_sigma_integral,
60  float summedADC,
61  short int multiplicity,
62  short int local_index,
63  float goodness_of_fit,
64  int dof)
65  : hit(digits.Channel(),
66  start_tick,
67  end_tick,
68  peak_time,
69  sigma_peak_time,
70  rms,
71  peak_amplitude,
72  sigma_peak_amplitude,
73  summedADC,
74  hit_integral,
75  hit_sigma_integral,
76  multiplicity,
77  local_index,
78  goodness_of_fit,
79  dof,
80  art::ServiceHandle<geo::Geometry const>()->View(digits.Channel()),
81  art::ServiceHandle<geo::Geometry const>()->SignalType(digits.Channel()),
82  wireID)
83  {} // HitCreator::HitCreator(RawDigit)
84 
85  //----------------------------------------------------------------------
87  geo::WireID const& wireID,
88  raw::TDCtick_t start_tick,
89  raw::TDCtick_t end_tick,
90  float rms,
91  float peak_time,
92  float sigma_peak_time,
93  float peak_amplitude,
94  float sigma_peak_amplitude,
95  float hit_integral,
96  float hit_sigma_integral,
97  float summedADC,
98  short int multiplicity,
99  short int local_index,
100  float goodness_of_fit,
101  int dof)
102  : hit(wire.Channel(),
103  start_tick,
104  end_tick,
105  peak_time,
106  sigma_peak_time,
107  rms,
108  peak_amplitude,
109  sigma_peak_amplitude,
110  summedADC,
111  hit_integral,
112  hit_sigma_integral,
113  multiplicity,
114  local_index,
115  goodness_of_fit,
116  dof,
117  wire.View(),
118  art::ServiceHandle<geo::Geometry const>()->SignalType(wire.Channel()),
119  wireID)
120  {} // HitCreator::HitCreator(Wire)
121 
122  //----------------------------------------------------------------------
124  geo::WireID const& wireID,
125  raw::TDCtick_t start_tick,
126  raw::TDCtick_t end_tick,
127  float rms,
128  float peak_time,
129  float sigma_peak_time,
130  float peak_amplitude,
131  float sigma_peak_amplitude,
132  float hit_integral,
133  float hit_sigma_integral,
134  short int multiplicity,
135  short int local_index,
136  float goodness_of_fit,
137  int dof)
138  : HitCreator(wire,
139  wireID,
140  start_tick,
141  end_tick,
142  rms,
143  peak_time,
144  sigma_peak_time,
145  peak_amplitude,
146  sigma_peak_amplitude,
147  hit_integral,
148  hit_sigma_integral,
149  std::accumulate(wire.SignalROI().begin() + start_tick,
150  wire.SignalROI().begin() + end_tick,
151  0.), // sum of ADC counts between start_tick and end_tick
152  multiplicity,
153  local_index,
154  goodness_of_fit,
155  dof)
156  {} // HitCreator::HitCreator(Wire; no summed ADC)
157 
158  //----------------------------------------------------------------------
160  geo::WireID const& wireID,
161  float rms,
162  float peak_time,
163  float sigma_peak_time,
164  float peak_amplitude,
165  float sigma_peak_amplitude,
166  float hit_integral,
167  float hit_sigma_integral,
168  float summedADC,
169  short int multiplicity,
170  short int local_index,
171  float goodness_of_fit,
172  int dof,
173  RegionOfInterest_t const& signal)
174  : HitCreator(wire,
175  wireID,
176  signal.begin_index(),
177  signal.end_index(),
178  rms,
179  peak_time,
180  sigma_peak_time,
181  peak_amplitude,
182  sigma_peak_amplitude,
183  hit_integral,
184  hit_sigma_integral,
185  summedADC,
186  multiplicity,
187  local_index,
188  goodness_of_fit,
189  dof)
190  {} // HitCreator::HitCreator(Wire; RoI)
191 
192  //----------------------------------------------------------------------
194  geo::WireID const& wireID,
195  float rms,
196  float peak_time,
197  float sigma_peak_time,
198  float peak_amplitude,
199  float sigma_peak_amplitude,
200  float hit_integral,
201  float hit_sigma_integral,
202  float summedADC,
203  short int multiplicity,
204  short int local_index,
205  float goodness_of_fit,
206  int dof,
207  size_t iSignalRoI)
208  : HitCreator(wire,
209  wireID,
210  rms,
211  peak_time,
212  sigma_peak_time,
213  peak_amplitude,
214  sigma_peak_amplitude,
215  hit_integral,
216  hit_sigma_integral,
217  summedADC,
218  multiplicity,
219  local_index,
220  goodness_of_fit,
221  dof,
222  wire.SignalROI().range(iSignalRoI))
223  {} // HitCreator::HitCreator(Wire; RoI index)
224 
225  HitCreator::HitCreator(recob::Hit const& from) : hit(from) {}
226 
227  HitCreator::HitCreator(recob::Hit const& from, geo::WireID const& wireID) : hit(from)
228  {
229  hit.fWireID = wireID;
230  } // HitCreator::HitCreator(new wire ID)
231 
232  //****************************************************************************
233  //*** HitAndAssociationsWriterBase
234  //----------------------------------------------------------------------
236  std::string instance_name,
237  bool doWireAssns,
238  bool doRawDigitAssns)
239  : prod_instance(instance_name)
240  , hits()
241  , WireAssns(doWireAssns ? new art::Assns<recob::Wire, recob::Hit> : nullptr)
242  , RawDigitAssns(doRawDigitAssns ? new art::Assns<raw::RawDigit, recob::Hit> : nullptr)
243  , event(&event)
244  , hitPtrMaker(*(this->event), prod_instance)
245  {} // HitAndAssociationsWriterBase::HitAndAssociationsWriterBase()
246 
247  //------------------------------------------------------------------------------
249  std::string instance_name /* = "" */,
250  bool doWireAssns /* = true */,
251  bool doRawDigitAssns /* = true */
252  )
253  {
254  collector.produces<std::vector<recob::Hit>>(instance_name);
255 
256  // declare the other products we are creating (if any)
257  if (doWireAssns) { collector.produces<art::Assns<recob::Wire, recob::Hit>>(instance_name); }
258  if (doRawDigitAssns) {
259  collector.produces<art::Assns<raw::RawDigit, recob::Hit>>(instance_name);
260  }
261  } // HitAndAssociationsWriterBase::declare_products()
262 
263  //------------------------------------------------------------------------------
265  {
266  assert(event);
267  if (hits) event->put(std::move(hits), prod_instance);
268  if (WireAssns) event->put(std::move(WireAssns), prod_instance);
269  if (RawDigitAssns) event->put(std::move(RawDigitAssns), prod_instance);
270  } // HitAndAssociationsWriterBase::put_into()
271 
272  //****************************************************************************
273  //*** HitCollectionCreator
274  //----------------------------------------------------------------------
276  std::string instance_name /* = "" */,
277  bool doWireAssns /* = true */,
278  bool doRawDigitAssns /* = true */
279  )
280  : HitAndAssociationsWriterBase(event, instance_name, doWireAssns, doRawDigitAssns)
281  {
282  hits.reset(new std::vector<recob::Hit>);
283  } // HitCollectionCreator::HitCollectionCreator()
284 
285  //----------------------------------------------------------------------
287  art::Ptr<recob::Wire> const& wire,
288  art::Ptr<raw::RawDigit> const& digits)
289  {
290 
291  // add the hit to the collection
292  hits->emplace_back(std::move(hit));
293 
294  CreateAssociationsToLastHit(wire, digits);
295  } // HitCollectionCreator::emplace_back(Hit&&)
296 
297  //----------------------------------------------------------------------
299  art::Ptr<recob::Wire> const& wire,
300  art::Ptr<raw::RawDigit> const& digits)
301  {
302 
303  // add the hit to the collection
304  hits->push_back(hit);
305 
306  CreateAssociationsToLastHit(wire, digits);
307  } // HitCollectionCreator::emplace_back(Hit)
308 
309  //----------------------------------------------------------------------
311  {
312  if (!hits) {
314  << "HitCollectionCreator is trying to put into the event"
315  " a hit collection that was never created!\n";
316  }
318  } // HitCollectionCreator::put_into()
319 
320  //----------------------------------------------------------------------
322  art::Ptr<raw::RawDigit> const& digits)
323  {
324  // if no association is required, we are done
325  if (!WireAssns && !RawDigitAssns) return;
326 
327  // art pointer to the hit we just created
328  HitPtr_t hit_ptr(CreatePtrToLastHit());
329 
330  // association with wires
331  if (WireAssns && wire.isNonnull())
332  WireAssns->addSingle(wire, hit_ptr); // if it fails, it throws
333 
334  // association with wires
335  if (RawDigitAssns && digits.isNonnull())
336  RawDigitAssns->addSingle(digits, hit_ptr); // if it fails, it throws
337 
338  } // HitCollectionCreator::CreateAssociationsToLastHit()
339 
340  //****************************************************************************
341  //*** HitCollectionAssociator
342  //----------------------------------------------------------------------
344  std::string instance_name,
345  art::InputTag const& WireModuleLabel,
346  art::InputTag const& RawDigitModuleLabel)
348  instance_name,
349  WireModuleLabel != "",
350  RawDigitModuleLabel != "")
351  , wires_label(WireModuleLabel)
352  , digits_label(RawDigitModuleLabel)
353  {
354  hits.reset(new std::vector<recob::Hit>);
355  } // HitCollectionAssociator::HitCollectionAssociator()
356 
357  //----------------------------------------------------------------------
359  std::string instance_name,
360  art::InputTag const& WireModuleLabel,
361  bool doRawDigitAssns /* = false */
362  )
363  : HitAndAssociationsWriterBase(event, instance_name, WireModuleLabel != "", doRawDigitAssns)
364  , wires_label(WireModuleLabel)
365  , digits_label()
366  {
367  if (RawDigitAssns && !WireAssns) {
369  << "HitCollectionAssociator can't create hit <--> raw digit"
370  " associations through wires, without wires!\n";
371  }
372  hits.reset(new std::vector<recob::Hit>);
373  } // HitCollectionAssociator::HitCollectionAssociator()
374 
375  //----------------------------------------------------------------------
376  void HitCollectionAssociator::use_hits(std::unique_ptr<std::vector<recob::Hit>>&& srchits)
377  {
378  hits = std::move(srchits);
379  } // HitCollectionAssociator::use_hits()
380 
381  //----------------------------------------------------------------------
383  {
386  } // HitCollectionAssociator::put_into()
387 
388  //----------------------------------------------------------------------
389  void HitCollectionAssociator::prepare_associations(std::vector<recob::Hit> const& srchits)
390  {
391  if (!RawDigitAssns && !WireAssns) return; // no associations needed
392  assert(event);
393 
394  // we make the associations anew
395  if (RawDigitAssns) ClearAssociations(*RawDigitAssns);
396  if (WireAssns) ClearAssociations(*WireAssns);
397 
398  // the following is true is we want associations with digits
399  // but we don't know where digits are; in that case, we try to use wires
400  const bool bUseWiresForDigits = RawDigitAssns && (digits_label == "");
401 
402  if (WireAssns || bUseWiresForDigits) {
403  // do we use wires for digit associations too?
404 
405  // get the wire collection
407  event->getValidHandle<std::vector<recob::Wire>>(wires_label);
408 
409  // fill a map of wire index vs. channel number
410  std::vector<size_t> WireMap = util::MakeIndex(*hWires, std::mem_fn(&recob::Wire::Channel));
411 
412  // use raw rigit - wire association, assuming they have been produced
413  // by the same producer as the wire and with the same instance name;
414  // we don't check whether the data product is found, but the following
415  // code will have FindOneP throw if that was not the case
416  // (that's what we would do here anyway, maybe with a better message...)
417  std::unique_ptr<art::FindOneP<raw::RawDigit>> WireToDigit;
418  if (bUseWiresForDigits) {
419  WireToDigit.reset(new art::FindOneP<raw::RawDigit>(hWires, *event, wires_label));
420  }
421 
422  // add associations, hit by hit:
423  for (size_t iHit = 0; iHit < srchits.size(); ++iHit) {
424 
425  // find the channel
426  size_t iChannel = size_t(srchits[iHit].Channel()); // forcibly converted
427 
428  // find the wire associated to that channel
429  size_t iWire = std::numeric_limits<size_t>::max();
430  if (iChannel < WireMap.size()) iWire = WireMap[iChannel];
431  if (iWire == std::numeric_limits<size_t>::max()) {
433  << "No wire associated to channel #" << iChannel << " whence hit #" << iHit
434  << " comes!\n";
435  } // if no channel
436 
437  // make the association with wires
438  if (WireAssns) {
439  art::Ptr<recob::Wire> wire(hWires, iWire);
440  WireAssns->addSingle(wire, CreatePtr(iHit));
441  }
442 
443  if (bUseWiresForDigits) {
444  // find the digit associated to that channel
445  art::Ptr<raw::RawDigit> const& digit = WireToDigit->at(iWire);
446  if (digit.isNull()) {
448  << "No raw digit associated to channel #" << iChannel << " whence hit #" << iHit
449  << " comes!\n";
450  } // if no channel
451 
452  // make the association
453  RawDigitAssns->addSingle(digit, CreatePtr(iHit));
454  } // if create digit associations through wires
455  } // for hit
456 
457  } // if wire associations
458 
459  if (RawDigitAssns && !bUseWiresForDigits) {
460  // get the digit collection
462  event->getValidHandle<std::vector<raw::RawDigit>>(digits_label);
463 
464  // fill a map of wire index vs. channel number
465  std::vector<size_t> DigitMap =
466  util::MakeIndex(*hDigits, std::mem_fn(&raw::RawDigit::Channel));
467 
468  // add associations, hit by hit:
469  for (size_t iHit = 0; iHit < srchits.size(); ++iHit) {
470 
471  // find the channel
472  size_t iChannel = size_t(srchits[iHit].Channel()); // forcibly converted
473 
474  // find the digit associated to that channel
475  size_t iDigit = std::numeric_limits<size_t>::max();
476  if (iChannel < DigitMap.size()) iDigit = DigitMap[iChannel];
477  if (iDigit == std::numeric_limits<size_t>::max()) {
479  << "No raw digit associated to channel #" << iChannel << " whence hit #" << iHit
480  << " comes!\n";
481  } // if no channel
482 
483  // make the association
484  art::Ptr<raw::RawDigit> digit(hDigits, iDigit);
485  RawDigitAssns->addSingle(digit, CreatePtr(iHit));
486 
487  } // for hit
488  } // if we have rawdigit label
489 
490  } // HitCollectionAssociator::put_into()
491 
492  //****************************************************************************
493  //*** HitRefinerAssociator
494  //----------------------------------------------------------------------
496  art::InputTag const& HitModuleLabel,
497  std::string instance_name /* = "" */,
498  bool doWireAssns /* = true */,
499  bool doRawDigitAssns /* = true */
500  )
501  : HitAndAssociationsWriterBase(event, instance_name, doWireAssns, doRawDigitAssns)
502  , hits_label(HitModuleLabel)
503  {
504  hits.reset(new std::vector<recob::Hit>);
505  } // HitRefinerAssociator::HitRefinerAssociator()
506 
507  //----------------------------------------------------------------------
508  void HitRefinerAssociator::use_hits(std::unique_ptr<std::vector<recob::Hit>>&& srchits)
509  {
510  hits = std::move(srchits);
511  } // HitRefinerAssociator::use_hits()
512 
513  //----------------------------------------------------------------------
515  {
518  } // HitRefinerAssociator::put_into()
519 
520  //----------------------------------------------------------------------
521  void HitRefinerAssociator::prepare_associations(std::vector<recob::Hit> const& srchits)
522  {
523  if (!RawDigitAssns && !WireAssns) return; // no associations needed
524  assert(event);
525 
526  // we make the associations anew
527  if (RawDigitAssns) ClearAssociations(*RawDigitAssns);
528 
529  // read the hits; this is going to hurt performances...
530  // no solution to that until there is a way to have a lazy read
532  event->getValidHandle<std::vector<recob::Hit>>(hits_label);
533 
534  // now get the associations
535  if (WireAssns) {
536  // we make the associations anew
537  ClearAssociations(*WireAssns);
538 
539  // find the associations between the hits and the wires
541  if (!HitToWire.isValid()) {
543  << "Can't find the associations between hits and wires produced by '" << hits_label
544  << "'!\n";
545  } // if no association
546 
547  // fill a map of wire vs. channel number
548  std::vector<art::Ptr<recob::Wire>> WireMap;
549  for (size_t iAssn = 0; iAssn < HitToWire.size(); ++iAssn) {
550  art::Ptr<recob::Wire> wire = HitToWire.at(iAssn);
551  if (wire.isNull()) continue;
552  size_t channelID = (size_t)wire->Channel();
553  if (WireMap.size() <= channelID) // expand the map of necessary
554  WireMap.resize(std::max(channelID + 1, 2 * WireMap.size()), {});
555  WireMap[channelID] = std::move(wire);
556  } // for
557 
558  // now go through all the hits...
559  for (size_t iHit = 0; iHit < srchits.size(); ++iHit) {
560  recob::Hit const& hit = srchits[iHit];
561  size_t channelID = (size_t)hit.Channel();
562 
563  // no association if there is no wire to associate with
564  if ((channelID >= WireMap.size()) || !WireMap[channelID]) continue;
565 
566  // create an association using the same wire pointer
567  WireAssns->addSingle(WireMap[channelID], CreatePtr(iHit));
568  } // for hits
569  } // if wire associations
570 
571  // now get the associations
572  if (RawDigitAssns) {
573  // we make the associations anew
574  ClearAssociations(*RawDigitAssns);
575 
576  // find the associations between the hits and the raw digits
577  art::FindOneP<raw::RawDigit> HitToDigits(hHits, *event, hits_label);
578  if (!HitToDigits.isValid()) {
580  << "Can't find the associations between hits and raw digits"
581  << " produced by '" << hits_label << "'!\n";
582  } // if no association
583 
584  // fill a map of digits vs. channel number
585  std::vector<art::Ptr<raw::RawDigit>> DigitMap;
586  for (size_t iAssn = 0; iAssn < HitToDigits.size(); ++iAssn) {
587  art::Ptr<raw::RawDigit> digits = HitToDigits.at(iAssn);
588  if (digits.isNull()) continue;
589  size_t channelID = (size_t)digits->Channel();
590  if (DigitMap.size() <= channelID) // expand the map of necessary
591  DigitMap.resize(std::max(channelID + 1, 2 * DigitMap.size()), {});
592  DigitMap[channelID] = std::move(digits);
593  } // for
594 
595  // now go through all the hits...
596  for (size_t iHit = 0; iHit < srchits.size(); ++iHit) {
597  recob::Hit const& hit = srchits[iHit];
598  size_t channelID = (size_t)hit.Channel();
599 
600  // no association if there is no digits to associate with
601  if ((channelID >= DigitMap.size()) || !DigitMap[channelID]) continue;
602 
603  // create an association using the same digits pointer
604  RawDigitAssns->addSingle(DigitMap[channelID], CreatePtr(iHit));
605  } // for hits
606  } // if digit associations
607 
608  } // HitRefinerAssociator::put_into()
609 
610 } // namespace recob
HitPtr_t CreatePtrToLastHit() const
Creates an art pointer to the hit with the last index.
Definition: HitCreator.h:632
Collection of charge vs time digitized from a single readout channel.
Definition: RawDigit.h:68
Reconstruction base classes.
void prepare_associations()
Finds out the associations for the current hits.
Definition: HitCreator.h:769
HitAndAssociationsWriterBase(art::Event &event, std::string instance_name, bool doWireAssns, bool doRawDigitAssns)
Constructor: sets instance name and whether to build associations.
Definition: HitCreator.cxx:235
std::string prod_instance
Tame of the instance for data products.
Definition: HitCreator.h:441
art::InputTag wires_label
Label of the collection of wires to associate.
Definition: HitCreator.h:761
Declaration of signal hit object.
Procedures to create maps of object locations.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
Definition: RawDigit.h:213
std::unique_ptr< art::Assns< recob::Wire, recob::Hit > > WireAssns
Associations with wires.
Definition: HitCreator.h:446
STL namespace.
Raw data description.
Definition: RawTypes.h:6
void use_hits(std::unique_ptr< std::vector< recob::Hit >> &&srchits)
Uses the specified collection as data product.
Definition: HitCreator.cxx:376
std::vector< size_t > MakeIndex(Coll const &data, KeyOf key_of=KeyOf())
Creates a map of indices from an existing collection.
Definition: MakeIndex.h:43
void swap(art::Assns< L, R, D > &other)
Definition: Assns.h:591
static void declare_products(art::ProducesCollector &collector, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Declares the hit products we are going to fill.
Definition: HitCreator.cxx:248
int TDCtick_t
Type representing a TDC tick.
Definition: RawTypes.h:25
Class managing the creation of a new recob::Hit object.
Definition: HitCreator.h:87
Helper functions to create a hit.
void hits()
Definition: readHits.C:15
void produces(std::string const &instanceName={}, Persistable const persistable=Persistable::Yes)
void use_hits(std::unique_ptr< std::vector< recob::Hit >> &&srchits)
Uses the specified collection as data product.
Definition: HitCreator.cxx:508
void prepare_associations()
Finds out the associations for the current hits.
Definition: HitCreator.h:868
void put_into()
Moves the data into the event.
Definition: HitCreator.cxx:514
raw::ChannelID_t Channel() const
Returns the ID of the channel (or InvalidChannelID)
Definition: Wire.h:223
void put_into()
Moves the data into the event.
Definition: HitCreator.cxx:382
HitPtr_t CreatePtr(size_t index) const
Creates an art pointer to the hit with the specified index.
Definition: HitCreator.h:470
details::FindAllP< recob::Hit, recob::Wire > HitToWire
Query object connecting a hit to a wire.
Definition: HitUtils.h:54
void CreateAssociationsToLastHit(art::Ptr< recob::Wire > const &wire, art::Ptr< raw::RawDigit > const &digits)
Creates associations between the last hit and the specified pointers.
Definition: HitCreator.cxx:321
bool isNull() const noexcept
Definition: Ptr.h:211
void emplace_back(recob::Hit &&hit, art::Ptr< recob::Wire > const &wire=art::Ptr< recob::Wire >(), art::Ptr< raw::RawDigit > const &digits=art::Ptr< raw::RawDigit >())
Adds the specified hit to the data collection.
Definition: HitCreator.cxx:286
Detector simulation of raw signals on wires.
HitRefinerAssociator(art::Event &event, art::InputTag const &HitModuleLabel, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Constructor: sets instance name and whether to build associations.
Definition: HitCreator.cxx:495
art::InputTag hits_label
Label of the collection of hits.
Definition: HitCreator.h:862
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
HitCollectionAssociator(art::Event &event, std::string instance_name, art::InputTag const &WireModuleLabel, art::InputTag const &RawDigitModuleLabel)
Constructor: sets instance name and whether to build associations.
Definition: HitCreator.cxx:343
bool isNonnull() const noexcept
Definition: Ptr.h:204
void put_into()
Moves the data into the event.
Definition: HitCreator.cxx:264
HitCollectionCreator(art::Event &event, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Constructor: sets instance name and whether to build associations.
Definition: HitCreator.cxx:275
Class holding the regions of interest of signal from a channel.
Definition: Wire.h:116
HitCreator(raw::RawDigit const &digits, geo::WireID const &wireID, raw::TDCtick_t start_tick, raw::TDCtick_t end_tick, float rms, float peak_time, float sigma_peak_time, float peak_amplitude, float sigma_peak_amplitude, float hit_integral, float hit_sigma_integral, float summedADC, short int multiplicity, short int local_index, float goodness_of_fit, int dof)
Constructor: extracts some information from raw digit.
Definition: HitCreator.cxx:49
art::InputTag digits_label
Label of raw digits collection to associate.
Definition: HitCreator.h:763
Definition: MVAAlg.h:12
Declaration of basic channel signal object.
std::unique_ptr< art::Assns< raw::RawDigit, recob::Hit > > RawDigitAssns
Associations with raw digits.
Definition: HitCreator.h:448
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69
void put_into()
Moves the data into the event.
Definition: HitCreator.cxx:310
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:46
recob::Wire::RegionsOfInterest_t::datarange_t RegionOfInterest_t
Type of one region of interest.
Definition: HitCreator.h:90
std::unique_ptr< std::vector< recob::Hit > > hits
Collection of hits.
Definition: HitCreator.h:444
Namespace collecting geometry-related classes utilities.
raw::ChannelID_t Channel() const
ID of the readout channel the hit was extracted from.
Definition: Hit.h:268
Definition: fwd.h:26
Base class handling a collection of hits and its associations.
Definition: HitCreator.h:383
art framework interface to geometry description
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109
Event finding and building.