LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
PixelMapProducer.h
Go to the documentation of this file.
1 
7 #ifndef LCVN_PIXELMAPPRODUCER_H
8 #define LCVN_PIXELMAPPRODUCER_H
9 
10 #include <array>
11 #include <vector>
12 
13 // Framework includes
15 #include "fhiclcpp/ParameterSet.h"
16 
23 
28 
29 // namespace recob{class Hit, class Wire};
30 // namespace sim{class SimChannel};
31 //
32 namespace lcvn {
33  typedef std::vector<std::map<double, double>> Waveform;
34 
35  class HitHelper {
36  public:
37  HitHelper(recob::Hit hit, double thresh = 0.) : fHit(hit), fThreshold(thresh)
38  {
40  }
41 
42  virtual Waveform GetWaveform();
43  virtual geo::WireID GetID();
44 
45  protected:
47  double fThreshold;
49  };
50 
51  class WireHelper {
52  public:
53  WireHelper(recob::Wire wire, double thresh = 0.) : fWire(wire), fThreshold(thresh)
54  {
56  }
57 
58  virtual Waveform GetWaveform();
59  virtual geo::WireID GetID();
60 
61  protected:
63  double fThreshold;
65  };
66 
68  public:
69  SimChannelHelper(sim::SimChannel simchan, double thresh = 0.)
70  : fSimchan(simchan), fThreshold(thresh)
71  {
73  }
74 
75  virtual Waveform GetWaveform();
76  virtual geo::WireID GetID();
77 
78  protected:
80  double fThreshold;
82  };
83 
85  template <class T, class U>
87  public:
88  PixelMapProducer(unsigned int nWire, unsigned int nTdc, double tRes, double threshold = 0.);
90 
91  // overload constructor for inputs from fcl
93 
94  void SetMultipleDrifts() { fMultipleDrifts = true; }
95  unsigned int NROI() { return fTotHits; };
96 
98  virtual Boundary DefineBoundary(detinfo::DetectorPropertiesData const& detProp,
99  const std::vector<const T*>& cluster);
100 
101  virtual void ConvertLocaltoGlobal(geo::WireID wireid,
102  unsigned int& globalWire,
103  unsigned int& globalPlane) const;
104 
105  virtual void ConvertLocaltoGlobalTDC(geo::WireID wireid,
106  double localTDC,
107  unsigned int& globalWire,
108  unsigned int& globalPlane,
109  double& globalTDC) const;
110 
111  unsigned int NWire() const { return fNWire; }
112  unsigned int NTdc() const { return fNTdc; }
113  double TRes() const { return fTRes; }
114 
115  virtual PixelMap CreateMap(detinfo::DetectorPropertiesData const& detProp,
116  const std::vector<art::Ptr<T>>& cluster);
117  virtual PixelMap CreateMap(detinfo::DetectorPropertiesData const& detProp,
118  const std::vector<const T*>& cluster);
119 
120  virtual PixelMap CreateMapGivenBoundary(detinfo::DetectorPropertiesData const& detProp,
121  const std::vector<const T*>& cluster,
122  const Boundary& bound);
123 
124  protected:
125  unsigned int fNWire;
126  unsigned int fNTdc;
127  double fTRes;
128  unsigned int fTotHits;
129  double fThreshold;
130  bool
132 
134  };
135 
139 
140 }
141 
142 #endif // CVN_PIXELMAPPRODUCER_H
PixelMapProducer< sim::SimChannel, lcvn::SimChannelHelper > PixelMapSimProducer
Energy deposited on a readout channel by simulated tracks.
Definition: SimChannel.h:136
virtual Waveform GetWaveform()
Declaration of signal hit object.
geo::GeometryCore const * fGeometry
PixelMap, basic input to CVN neural net.
Definition: PixelMap.h:20
Utility class for truth labels.
Cluster finding and building.
PixelMap for CVN.
Producer algorithm for PixelMap, input to CVN neural net.
HitHelper(recob::Hit hit, double thresh=0.)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
Access the description of detector geometry.
unsigned int NWire() const
WireHelper(recob::Wire wire, double thresh=0.)
SimChannelHelper(sim::SimChannel simchan, double thresh=0.)
PixelMapProducer< recob::Hit, lcvn::HitHelper > PixelMapHitProducer
geo::GeometryCore const * fGeometry
sim::SimChannel fSimchan
Description of geometry of one entire detector.
Definition: GeometryCore.h:119
PixelMapProducer< recob::Wire, lcvn::WireHelper > PixelMapWireProducer
virtual geo::WireID GetID()
Detector simulation of raw signals on wires.
geo::GeometryCore const * fGeometry
double fThreshold
Charge threshold to consider for hits/waveforms etc.
unsigned int NTdc() const
unsigned int fNTdc
Number of tdcs, width of pixel map.
unsigned int fNWire
Number of wires, length for pixel maps.
object containing MC truth information necessary for making RawDigits and doing back tracking ...
unsigned int fTotHits
Total hits in the pixel map.
Class holding the regions of interest of signal from a channel.
Definition: Wire.h:116
Declaration of basic channel signal object.
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:46
double fTRes
Timing resolution for pixel map.
geo::GeometryCore const * fGeometry
std::vector< std::map< double, double > > Waveform
Definition: fwd.h:26
art framework interface to geometry description
Boundary for CVN PixelMap.
bool fMultipleDrifts
True if making the pixel map requires handling for multiple drift regions.