LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lcvn::WireHelper Class Reference

#include "PixelMapProducer.h"

Public Member Functions

 WireHelper (recob::Wire wire, double thresh=0.)
 
virtual Waveform GetWaveform ()
 
virtual geo::WireID GetID ()
 

Protected Attributes

recob::Wire fWire
 
double fThreshold
 
geo::GeometryCore const * fGeometry
 

Detailed Description

Definition at line 51 of file PixelMapProducer.h.

Constructor & Destructor Documentation

lcvn::WireHelper::WireHelper ( recob::Wire  wire,
double  thresh = 0. 
)
inline

Member Function Documentation

geo::WireID lcvn::WireHelper::GetID ( )
virtual

Definition at line 65 of file PixelMapProducer.cxx.

References geo::GeometryCore::ChannelToWire(), and lcvn::HitHelper::fGeometry.

66  {
67  geo::WireID ret;
68  std::vector<geo::WireID> wireids = fGeometry->ChannelToWire(fWire.Channel());
69  if (!wireids.size()) return ret;
70  ret = wireids[0];
71 
72  if (wireids.size() > 1) {
73  for (auto iwire : wireids)
74  if (iwire.Plane == fWire.View()) ret = iwire;
75  }
76  return ret;
77  }
std::vector< WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
geo::View_t View() const
Returns the view the channel belongs to.
Definition: Wire.h:219
geo::GeometryCore const * fGeometry
raw::ChannelID_t Channel() const
Returns the ID of the channel (or InvalidChannelID)
Definition: Wire.h:223
Waveform lcvn::WireHelper::GetWaveform ( )
virtual

Definition at line 46 of file PixelMapProducer.cxx.

References lcvn::HitHelper::fThreshold.

47  {
48 
49  Waveform ret;
50  auto ROIs = fWire.SignalROI();
51  if (!(ROIs.get_ranges().size())) return ret;
52 
53  for (auto iROI = ROIs.begin_range(); iROI != ROIs.end_range(); ++iROI) {
54  auto& ROI = *iROI;
55  std::map<double, double> pulse;
56  for (int tick = ROI.begin_index(); tick < (int)ROI.end_index(); tick++) {
57  if (!(ROI[tick] > fThreshold)) continue;
58  pulse.insert(std::pair<double, double>((double)tick, (double)ROI[tick]));
59  }
60  ret.push_back(pulse);
61  }
62  return ret;
63  }
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
const RegionsOfInterest_t & SignalROI() const
Returns the list of regions of interest.
Definition: Wire.h:211
std::vector< std::map< double, double > > Waveform

Member Data Documentation

geo::GeometryCore const* lcvn::WireHelper::fGeometry
protected

Definition at line 64 of file PixelMapProducer.h.

double lcvn::WireHelper::fThreshold
protected

Definition at line 63 of file PixelMapProducer.h.

recob::Wire lcvn::WireHelper::fWire
protected

Definition at line 62 of file PixelMapProducer.h.


The documentation for this class was generated from the following files: