LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
RecoBaseDrawer.h
Go to the documentation of this file.
1 #ifndef EVD_RECOBASEDRAWER_H
5 #define EVD_RECOBASEDRAWER_H
6 
7 #include <vector>
8 
13 
16 
17 class TVector3;
18 class TH1F;
19 namespace evdb {
20  class View2D;
21  class View3D;
22 }
23 
24 namespace geo { class Geometry; }
25 
26 namespace recob {
27  class Edge;
28  class Hit;
29  class Cluster;
30  class PCAxis;
31  class PFParticle;
32  class EndPoint2D;
33  class Prong;
34  class Track;
35  class Shower;
36  class Wire;
37  class Vertex;
38  class Seed;
39  class Event;
40  class OpFlash;
41 }
42 
43 namespace anab {
44  class CosmicTag;
45 }
46 
47 namespace util {
48  class LArPropertiesService;
49  class DetectorProperties;
50 }
51 
52 namespace evd {
53 
54 class ColorDrawingOptions;
55 class RawDrawingOptions;
56 class RecoDrawingOptions;
57 
60 {
61 public:
63  ~RecoBaseDrawer();
64 
65 public:
66 
67  void Wire2D(const art::Event& evt,
68  evdb::View2D* view,
69  unsigned int plane);
70  int Hit2D(const art::Event& evt,
71  evdb::View2D* view,
72  unsigned int plane);
73  int Hit2D(std::vector<const recob::Hit*> hits,
74  int color,
75  evdb::View2D* view,
76  bool drawConnectingLines = false,
77  int lineWidth = 1);
78  int Hit2D(std::vector<const recob::Hit*> hits,
79  evdb::View2D* view,
80  float cosmicscore);
81 
82  void EndPoint2D(const art::Event& evt,
83  evdb::View2D* view,
84  unsigned int plane);
85  void OpFlash2D(const art::Event& evt,
86  evdb::View2D* view,
87  unsigned int plane);
88 
89  void Seed2D(const art::Event& evt,
90  evdb::View2D* view,
91  unsigned int plane);
92 
93  void BezierTrack2D(const art::Event& evt,
94  evdb::View2D* view,
95  unsigned int plane);
96 
97 
98  void Draw2DSlopeEndPoints(double xStart,
99  double yStart,
100  double xEnd,
101  double yEnd,
102  double slope,
103  int color,
104  evdb::View2D* view);
105  void Draw2DSlopeEndPoints(double x,
106  double y,
107  double slope,
108  int color,
109  evdb::View2D* view);
110  void Draw2DSlopeEndPoints(double x,
111  double y,
112  double cosx,
113  double cosy,
114  int color,
115  evdb::View2D* view);
116  void Cluster2D(const art::Event& evt,
117  evdb::View2D* view,
118  unsigned int plane);
119  void Prong2D(const art::Event& evt,
120  evdb::View2D* view,
121  unsigned int plane);
122  void DrawTrackVertexAssns2D(const art::Event& evt,
123  evdb::View2D* view,
124  unsigned int plane);
125  void DrawProng2D(std::vector<const recob::Hit*>& hits,
126  evdb::View2D* view,
127  unsigned int plane,
128  TVector3 const& startPos,
129  TVector3 const& startDir,
130  int id,
131  float cscore = -5);
132  void DrawTrack2D(std::vector<const recob::Hit*>& hits,
133  evdb::View2D* view,
134  unsigned int plane,
135  const recob::Track* track,
136  int color,
137  int lineWidth);
138  void Vertex2D(const art::Event& evt,
139  evdb::View2D* view,
140  unsigned int plane);
141 
142  void Event2D(const art::Event& evt,
143  evdb::View2D* view,
144  unsigned int plane);
145 
146  void SpacePoint3D(const art::Event& evt,
147  evdb::View3D* view);
148  void PFParticle3D(const art::Event& evt,
149  evdb::View3D* view);
150  void DrawPFParticle3D(const art::Ptr<recob::PFParticle>& pfPart,
151  const art::PtrVector<recob::PFParticle>& pfParticleVec,
152  const std::vector<art::Ptr<recob::SpacePoint>>& spacePointVec,
153  const art::FindManyP<recob::Edge>& edgeAssnsVec,
154  const art::FindManyP<recob::SpacePoint>& spacePointAssnsVec,
155  const art::FindManyP<recob::Hit>& spHitAssnVec,
156  const art::FindMany<recob::Track>& trackAssnVec,
157  const art::FindMany<recob::PCAxis>& pcAxisAssnVec,
158  const art::FindMany<anab::CosmicTag>& cosmicTagAssnVec,
159  int depth,
160  evdb::View3D* view);
161  void Prong3D(const art::Event& evt,
162  evdb::View3D* view);
163  void DrawSpacePoint3D(std::vector<art::Ptr<recob::SpacePoint>>& spts,
164  evdb::View3D* view,
165  int color,
166  int marker = 3,
167  float size = 1.);
168  void DrawTrack3D(const recob::Track& track,
169  evdb::View3D* view,
170  int color,
171  int marker = 1,
172  float size = 2.);
173  void DrawShower3D(const recob::Shower& shower,
174  int color,
175  evdb::View3D* view);
176  void Seed3D(const art::Event& evt,
177  evdb::View3D* view);
178  void BezierTrack3D(const art::Event& evt,
179  evdb::View3D* view);
180  void Vertex3D(const art::Event& evt,
181  evdb::View3D* view);
182  void Event3D(const art::Event& evt,
183  evdb::View3D* view);
184  void OpFlashOrtho(const art::Event& evt,
186  evdb::View2D* view);
187  void VertexOrtho(const art::PtrVector<recob::Vertex>& vertex,
188  evd::OrthoProj_t proj,
189  evdb::View2D* view,
190  int marker);
191  void VertexOrtho(const art::Event& evt,
192  evd::OrthoProj_t proj,
193  evdb::View2D* view);
194  void SpacePointOrtho(const art::Event& evt,
195  evd::OrthoProj_t proj,
196  double msize,
197  evdb::View2D* view);
198  void PFParticleOrtho(const art::Event& evt,
199  evd::OrthoProj_t proj,
200  double msize,
201  evdb::View2D* view);
202  void DrawPFParticleOrtho(const art::Ptr<recob::PFParticle>& pfPart,
203  const art::PtrVector<recob::PFParticle>& pfParticleVec,
204  const art::FindMany<recob::SpacePoint>& spacePointAssnsVec,
205  const art::FindMany<recob::PCAxis>& pcAxisAssnVec,
206  int depth,
207  evd::OrthoProj_t proj,
208  evdb::View2D* view);
209  void ProngOrtho(const art::Event& evt,
210  evd::OrthoProj_t proj,
211  double msize,
212  evdb::View2D* view);
213  void DrawSpacePointOrtho(std::vector<art::Ptr<recob::SpacePoint>>& spts,
214  int color,
215  evd::OrthoProj_t proj,
216  double msize,
217  evdb::View2D* view,
218  int mode = 0);
219  void DrawProngOrtho(const recob::Prong& prong,
220  int color,
221  evd::OrthoProj_t proj,
222  double msize,
223  evdb::View2D* view);
224  void DrawTrackOrtho(const recob::Track& track,
225  int color,
226  evd::OrthoProj_t proj,
227  double msize,
228  evdb::View2D* view);
229  void DrawShowerOrtho(const recob::Shower& shower,
230  int color,
231  evd::OrthoProj_t proj,
232  double msize,
233  evdb::View2D* view);
234  void SeedOrtho(const art::Event& evt,
235  evd::OrthoProj_t proj,
236  evdb::View2D* view);
237 
238  using HitParams_t = struct HitParams_t
239  {
240  float hitCenter;
241  float hitSigma;
242  float hitHeight;
243  float hitStart;
244  float hitEnd;
245  };
246 
247  using ROIHitParamsVec = std::vector<HitParams_t>;
248  using HitParamsVec = std::vector<ROIHitParamsVec>;
249 
250  void FillTQHisto(const art::Event& evt,
251  unsigned int plane,
252  unsigned int wire,
253  TH1F* histo,
254  HitParamsVec& hitParamsVec);
255 
256  void FillQHisto(const art::Event& evt,
257  unsigned int plane,
258  TH1F* histo);
259 
260  void FillTQHistoDP(const art::Event& evt,
261  unsigned int plane,
262  unsigned int wire,
263  TH1F* histo,
264  std::vector<double>& htau1,
265  std::vector<double>& htau2,
266  std::vector<double>& hitamplitudes,
267  std::vector<double>& hpeaktimes,
268  std::vector<int>& hstartT,
269  std::vector<int>& hendT,
270  std::vector<int>& hNMultiHit);
271 
272  int GetRegionOfInterest(int plane,
273  int& minw,
274  int& maxw,
275  int& mint,
276  int& maxt);
277 
278  void GetChargeSum(int plane,
279  double& charge,
280  double& convcharge);
281 
282  double EvalExpoFit(double x,
283  double tau1,
284  double tau2,
285  double amplitude,
286  double peaktime);
287 
288  double EvalMultiExpoFit(double x,
289  int HitNumber,
290  int NHits,
291  std::vector<double> tau1,
292  std::vector<double> tau2,
293  std::vector<double> amplitude,
294  std::vector<double> peaktime);
295 
296  private:
297  void GetClusterOutlines(std::vector<const recob::Hit*>& hits,
298  std::vector<double>& tpts,
299  std::vector<double>& wpts,
300  unsigned int plane);
301  int GetWires(const art::Event& evt,
302  const art::InputTag& which,
304  int GetHits(const art::Event& evt,
305  const art::InputTag& which,
306  std::vector<const recob::Hit*>& hits,
307  unsigned int plane);
308  int GetClusters(const art::Event& evt,
309  const art::InputTag& which,
311  int GetPFParticles(const art::Event& evt,
312  const art::InputTag& which,
314  int GetEndPoint2D(const art::Event& evt,
315  const art::InputTag& which,
317  int GetSpacePoints(const art::Event& evt,
318  const art::InputTag& which,
320  int GetEdges(const art::Event& evt,
321  const art::InputTag& which,
323 
324  int GetTracks(const art::Event& evt,
325  const art::InputTag& which,
326  art::View<recob::Track>& track);
327 
328  int GetShowers(const art::Event& evt,
329  const art::InputTag& which,
330  art::View<recob::Shower>& shower);
331 
332  int GetVertices(const art::Event& evt,
333  const art::InputTag& which,
335 
336  int GetSeeds(const art::Event& evt,
337  const art::InputTag& which,
339 
340  int GetBezierTracks(const art::Event& evt,
341  const art::InputTag& which,
343 
344 
345  int GetOpFlashes(const art::Event& evt,
346  const art::InputTag& which,
348 
349  int GetEvents(const art::Event& evt,
350  const art::InputTag& which,
352 
353  std::vector<std::array<double, 3>> Circle3D(const TVector3& pos, const TVector3& axisDir, const double& radius);
354 
355  int CountHits(const art::Event& evt,
356  const art::InputTag& which,
357  unsigned int cryostat,
358  unsigned int tpc,
359  unsigned int plane);
360 
361 
362  private:
363 
364  std::vector<int> fWireMin;
365  std::vector<int> fWireMax;
366  std::vector<int> fTimeMin;
367  std::vector<int> fTimeMax;
368 
369  std::vector<double> fRawCharge;
370  std::vector<double> fConvertedCharge;
371 
372  };
373 }
374 
375 #endif
376 
Float_t x
Definition: compare.C:6
std::vector< double > fRawCharge
Sum of Raw Charge.
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:17
std::vector< HitParams_t > ROIHitParamsVec
Reconstruction base classes.
Define OrthoProj_t enum for selecting orthographic view.
Aid in the rendering of RecoBase objects.
Float_t y
Definition: compare.C:6
OrthoProj_t
Definition: OrthoProj.h:12
Manage all things related to colors for the event display.
std::vector< ROIHitParamsVec > HitParamsVec
std::vector< double > fConvertedCharge
Sum of Charge Converted using Birks&#39; formula.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
void hits()
Definition: readHits.C:15
LArSoft includes.
long seed
Definition: chem4.cc:68
std::vector< int > fWireMax
highest wire in interesting region for each plane
Definition: fwd.h:47
Double_t radius
std::vector< int > fWireMin
lowest wire in interesting region for each plane
std::size_t color(std::string const &procname)
Float_t proj
Definition: plot.C:34
Namespace collecting geometry-related classes utilities.
Float_t track
Definition: plot.C:34
Definition: Track.hh:43
std::vector< int > fTimeMax
highest time in interesting region for each plane
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:51
Event finding and building.
std::vector< int > fTimeMin
lowest time in interesting region for each plane
struct HitParams_t{float hitCenter HitParams_t
vertex reconstruction