LArSoft  v10_04_05
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::WireReadoutGeom const * fWireReadoutGeom
 

Detailed Description

Definition at line 63 of file PixelMapProducer.h.

Constructor & Destructor Documentation

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

Definition at line 65 of file PixelMapProducer.h.

References lcvn::HitHelper::GetID(), and lcvn::HitHelper::GetWaveform().

66  : fSimchan(simchan), fThreshold(thresh)
67  {}
sim::SimChannel fSimchan

Member Function Documentation

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

Definition at line 94 of file PixelMapProducer.cxx.

95  {
96  std::vector<geo::WireID> wireids = fWireReadoutGeom->ChannelToWire(fSimchan.Channel());
97  if (wireids.empty()) return {};
98  return wireids[0];
99  }
geo::WireReadoutGeom const * fWireReadoutGeom
sim::SimChannel fSimchan
raw::ChannelID_t Channel() const
Returns the readout channel this object describes.
Definition: SimChannel.h:323
virtual std::vector< WireID > ChannelToWire(raw::ChannelID_t channel) const =0
Waveform lcvn::SimChannelHelper::GetWaveform ( )
virtual

Definition at line 77 of file PixelMapProducer.cxx.

References lcvn::HitHelper::fThreshold.

78  {
79  Waveform ret;
80  auto& ROIs = fSimchan.TDCIDEMap();
81  if (!(ROIs.size())) return ret;
82 
83  for (auto iROI = ROIs.begin(); iROI != ROIs.end(); ++iROI) {
84  auto& ROI = *iROI;
85  auto tick = ROI.first;
86  double charge = 0.005 * fSimchan.Charge(tick);
87 
88  if (!(charge > fThreshold)) continue;
89  ret.push_back(std::map<double, double>({{(double)tick, charge}}));
90  }
91  return ret;
92  }
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

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

Definition at line 73 of file PixelMapProducer.h.

double lcvn::SimChannelHelper::fThreshold
protected

Definition at line 74 of file PixelMapProducer.h.

geo::WireReadoutGeom const* lcvn::SimChannelHelper::fWireReadoutGeom
protected
Initial value:

Definition at line 75 of file PixelMapProducer.h.


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