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

#include "PixelMapProducer.h"

Public Member Functions

 SimChannelHelper (sim::SimChannel simchan, double thresh=0.)
 
virtual Waveform GetWaveform ()
 
virtual geo::WireID GetID ()
 

Protected Attributes

sim::SimChannel fSimchan
 
double fThreshold
 
geo::GeometryCore const * fGeometry
 

Detailed Description

Definition at line 67 of file PixelMapProducer.h.

Constructor & Destructor Documentation

lcvn::SimChannelHelper::SimChannelHelper ( sim::SimChannel  simchan,
double  thresh = 0. 
)
inline

Member Function Documentation

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

Definition at line 97 of file PixelMapProducer.cxx.

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

98  {
99  geo::WireID ret;
100  std::vector<geo::WireID> wireids = fGeometry->ChannelToWire(fSimchan.Channel());
101  if (!wireids.size()) return ret;
102  ret = wireids[0];
103  return ret;
104  }
std::vector< WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
geo::GeometryCore const * fGeometry
sim::SimChannel fSimchan
raw::ChannelID_t Channel() const
Returns the readout channel this object describes.
Definition: SimChannel.h:323
Waveform lcvn::SimChannelHelper::GetWaveform ( )
virtual

Definition at line 79 of file PixelMapProducer.cxx.

References lcvn::HitHelper::fThreshold.

80  {
81 
82  Waveform ret;
83  auto& ROIs = fSimchan.TDCIDEMap();
84  if (!(ROIs.size())) return ret;
85 
86  for (auto iROI = ROIs.begin(); iROI != ROIs.end(); ++iROI) {
87  auto& ROI = *iROI;
88  auto tick = ROI.first;
89  double charge = 0.005 * fSimchan.Charge(tick);
90 
91  if (!(charge > fThreshold)) continue;
92  ret.push_back(std::map<double, double>({{(double)tick, charge}}));
93  }
94  return ret;
95  }
double Charge(TDC_t tdc) const
Returns the total number of ionization electrons on this channel in the specified TDC...
Definition: SimChannel.cxx:110
sim::SimChannel fSimchan
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Definition: electronics.h:73
TDCIDEs_t const & TDCIDEMap() const
Returns all the deposited energy information as stored.
Definition: SimChannel.h:319
std::vector< std::map< double, double > > Waveform

Member Data Documentation

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

Definition at line 81 of file PixelMapProducer.h.

sim::SimChannel lcvn::SimChannelHelper::fSimchan
protected

Definition at line 79 of file PixelMapProducer.h.

double lcvn::SimChannelHelper::fThreshold
protected

Definition at line 80 of file PixelMapProducer.h.


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