LArSoft  v07_13_02
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 
17 
18 class TVector3;
19 class TH1F;
20 namespace evdb {
21  class View2D;
22  class View3D;
23 }
24 
25 namespace geo { class Geometry; }
26 
27 namespace recob {
28  class Edge;
29  class Hit;
30  class Cluster;
31  class PCAxis;
32  class PFParticle;
33  class EndPoint2D;
34  class Prong;
35  class Track;
36  class Shower;
37  class Wire;
38  class Vertex;
39  class Seed;
40  class Event;
41  class OpFlash;
42 }
43 
44 namespace anab {
45  class CosmicTag;
46 }
47 
48 namespace util {
49  class LArPropertiesService;
50  class DetectorProperties;
51 }
52 
53 namespace evd {
54 
55 class ColorDrawingOptions;
56 class RawDrawingOptions;
57 class RecoDrawingOptions;
58 
61 {
62 public:
64  ~RecoBaseDrawer();
65 
66 public:
67 
68  void Wire2D(const art::Event& evt,
69  evdb::View2D* view,
70  unsigned int plane);
71  int Hit2D(const art::Event& evt,
72  evdb::View2D* view,
73  unsigned int plane);
74  int Hit2D(std::vector<const recob::Hit*> hits,
75  int color,
76  evdb::View2D* view,
77  bool drawConnectingLines = false,
78  int lineWidth = 1);
79  int Hit2D(std::vector<const recob::Hit*> hits,
80  evdb::View2D* view,
81  float cosmicscore);
82 
83  void EndPoint2D(const art::Event& evt,
84  evdb::View2D* view,
85  unsigned int plane);
86  void OpFlash2D(const art::Event& evt,
87  evdb::View2D* view,
88  unsigned int plane);
89 
90  void Seed2D(const art::Event& evt,
91  evdb::View2D* view,
92  unsigned int plane);
93 
94  void BezierTrack2D(const art::Event& evt,
95  evdb::View2D* view,
96  unsigned int plane);
97 
98 
99  void Draw2DSlopeEndPoints(double xStart,
100  double yStart,
101  double xEnd,
102  double yEnd,
103  double slope,
104  int color,
105  evdb::View2D* view);
106  void Draw2DSlopeEndPoints(double x,
107  double y,
108  double slope,
109  int color,
110  evdb::View2D* view);
111  void Draw2DSlopeEndPoints(double x,
112  double y,
113  double cosx,
114  double cosy,
115  int color,
116  evdb::View2D* view);
117  void Slice2D(const art::Event& evt, evdb::View2D* view, unsigned int plane);
118  void Cluster2D(const art::Event& evt,
119  evdb::View2D* view,
120  unsigned int plane);
121  void Prong2D(const art::Event& evt,
122  evdb::View2D* view,
123  unsigned int plane);
124  void DrawTrackVertexAssns2D(const art::Event& evt,
125  evdb::View2D* view,
126  unsigned int plane);
127  void DrawProng2D(std::vector<const recob::Hit*>& hits,
128  evdb::View2D* view,
129  unsigned int plane,
130  TVector3 const& startPos,
131  TVector3 const& startDir,
132  int id,
133  float cscore = -5);
134  void DrawTrack2D(std::vector<const recob::Hit*>& hits,
135  evdb::View2D* view,
136  unsigned int plane,
137  const recob::Track* track,
138  int color,
139  int lineWidth);
140  void Vertex2D(const art::Event& evt,
141  evdb::View2D* view,
142  unsigned int plane);
143 
144  void Event2D(const art::Event& evt,
145  evdb::View2D* view,
146  unsigned int plane);
147 
148  void SpacePoint3D(const art::Event& evt,
149  evdb::View3D* view);
150  void PFParticle3D(const art::Event& evt,
151  evdb::View3D* view);
152  void DrawPFParticle3D(const art::Ptr<recob::PFParticle>& pfPart,
153  const art::PtrVector<recob::PFParticle>& pfParticleVec,
154  const std::vector<art::Ptr<recob::SpacePoint>>& spacePointVec,
155  const art::FindManyP<recob::Edge>& edgeAssnsVec,
156  const art::FindManyP<recob::SpacePoint>& spacePointAssnsVec,
157  const art::FindManyP<recob::Hit>& spHitAssnVec,
158  const art::FindMany<recob::Track>& trackAssnVec,
159  const art::FindMany<recob::PCAxis>& pcAxisAssnVec,
160  const art::FindMany<anab::CosmicTag>& cosmicTagAssnVec,
161  int depth,
162  evdb::View3D* view);
163  void Prong3D(const art::Event& evt,
164  evdb::View3D* view);
165  void DrawSpacePoint3D(std::vector<art::Ptr<recob::SpacePoint>>& spts,
166  evdb::View3D* view,
167  int color,
168  int marker = 3,
169  float size = 1.);
170  void DrawTrack3D(const recob::Track& track,
171  evdb::View3D* view,
172  int color,
173  int marker = 1,
174  float size = 2.);
175  void DrawShower3D(const recob::Shower& shower,
176  int color,
177  evdb::View3D* view);
178  void Seed3D(const art::Event& evt,
179  evdb::View3D* view);
180  void BezierTrack3D(const art::Event& evt,
181  evdb::View3D* view);
182  void Vertex3D(const art::Event& evt,
183  evdb::View3D* view);
184  void Event3D(const art::Event& evt,
185  evdb::View3D* view);
186  void Slice3D(const art::Event& evt,
187  evdb::View3D* view);
188  void OpFlashOrtho(const art::Event& evt,
190  evdb::View2D* view);
191  void VertexOrtho(const art::PtrVector<recob::Vertex>& vertex,
192  evd::OrthoProj_t proj,
193  evdb::View2D* view,
194  int marker);
195  void VertexOrtho(const art::Event& evt,
196  evd::OrthoProj_t proj,
197  evdb::View2D* view);
198  void SpacePointOrtho(const art::Event& evt,
199  evd::OrthoProj_t proj,
200  double msize,
201  evdb::View2D* view);
202  void PFParticleOrtho(const art::Event& evt,
203  evd::OrthoProj_t proj,
204  double msize,
205  evdb::View2D* view);
206  void DrawPFParticleOrtho(const art::Ptr<recob::PFParticle>& pfPart,
207  const art::PtrVector<recob::PFParticle>& pfParticleVec,
208  const art::FindMany<recob::SpacePoint>& spacePointAssnsVec,
209  const art::FindMany<recob::PCAxis>& pcAxisAssnVec,
210  int depth,
211  evd::OrthoProj_t proj,
212  evdb::View2D* view);
213  void ProngOrtho(const art::Event& evt,
214  evd::OrthoProj_t proj,
215  double msize,
216  evdb::View2D* view);
217  void DrawSpacePointOrtho(std::vector<art::Ptr<recob::SpacePoint>>& spts,
218  int color,
219  evd::OrthoProj_t proj,
220  double msize,
221  evdb::View2D* view,
222  int mode = 0);
223  void DrawProngOrtho(const recob::Prong& prong,
224  int color,
225  evd::OrthoProj_t proj,
226  double msize,
227  evdb::View2D* view);
228  void DrawTrackOrtho(const recob::Track& track,
229  int color,
230  evd::OrthoProj_t proj,
231  double msize,
232  evdb::View2D* view);
233  void DrawShowerOrtho(const recob::Shower& shower,
234  int color,
235  evd::OrthoProj_t proj,
236  double msize,
237  evdb::View2D* view);
238  void SeedOrtho(const art::Event& evt,
239  evd::OrthoProj_t proj,
240  evdb::View2D* view);
241 
242  using HitParams_t = struct HitParams_t
243  {
244  float hitCenter;
245  float hitSigma;
246  float hitHeight;
247  float hitStart;
248  float hitEnd;
249  };
250 
251  using ROIHitParamsVec = std::vector<HitParams_t>;
252  using HitParamsVec = std::vector<ROIHitParamsVec>;
253 
254  void FillTQHisto(const art::Event& evt,
255  unsigned int plane,
256  unsigned int wire,
257  TH1F* histo,
258  HitParamsVec& hitParamsVec);
259 
260  void FillQHisto(const art::Event& evt,
261  unsigned int plane,
262  TH1F* histo);
263 
264  void FillTQHistoDP(const art::Event& evt,
265  unsigned int plane,
266  unsigned int wire,
267  TH1F* histo,
268  std::vector<double>& htau1,
269  std::vector<double>& htau2,
270  std::vector<double>& hitamplitudes,
271  std::vector<double>& hpeaktimes,
272  std::vector<int>& hstartT,
273  std::vector<int>& hendT,
274  std::vector<int>& hNMultiHit,
275  std::vector<int>& hLocalHitIndex);
276 
277  int GetRegionOfInterest(int plane,
278  int& minw,
279  int& maxw,
280  int& mint,
281  int& maxt);
282 
283  void GetChargeSum(int plane,
284  double& charge,
285  double& convcharge);
286 
287  double EvalExpoFit(double x,
288  double tau1,
289  double tau2,
290  double amplitude,
291  double peaktime);
292 
293  double EvalMultiExpoFit(double x,
294  int HitNumber,
295  int NHits,
296  std::vector<double> tau1,
297  std::vector<double> tau2,
298  std::vector<double> amplitude,
299  std::vector<double> peaktime);
300 
301  private:
302  void GetClusterOutlines(std::vector<const recob::Hit*>& hits,
303  std::vector<double>& tpts,
304  std::vector<double>& wpts,
305  unsigned int plane);
306  int GetWires(const art::Event& evt,
307  const art::InputTag& which,
309  int GetHits(const art::Event& evt,
310  const art::InputTag& which,
311  std::vector<const recob::Hit*>& hits,
312  unsigned int plane);
313  int GetSlices(const art::Event& evt, const art::InputTag& which, art::PtrVector<recob::Slice>& slices);
314  int GetClusters(const art::Event& evt,
315  const art::InputTag& which,
317  int GetPFParticles(const art::Event& evt,
318  const art::InputTag& which,
320  int GetEndPoint2D(const art::Event& evt,
321  const art::InputTag& which,
323  int GetSpacePoints(const art::Event& evt,
324  const art::InputTag& which,
326  int GetEdges(const art::Event& evt,
327  const art::InputTag& which,
329 
330  int GetTracks(const art::Event& evt,
331  const art::InputTag& which,
332  art::View<recob::Track>& track);
333 
334  int GetShowers(const art::Event& evt,
335  const art::InputTag& which,
336  art::View<recob::Shower>& shower);
337 
338  int GetVertices(const art::Event& evt,
339  const art::InputTag& which,
341 
342  int GetSeeds(const art::Event& evt,
343  const art::InputTag& which,
345 
346  int GetBezierTracks(const art::Event& evt,
347  const art::InputTag& which,
349 
350 
351  int GetOpFlashes(const art::Event& evt,
352  const art::InputTag& which,
354 
355  int GetEvents(const art::Event& evt,
356  const art::InputTag& which,
358 
359  std::vector<std::array<double, 3>> Circle3D(const TVector3& pos, const TVector3& axisDir, const double& radius);
360 
361  int CountHits(const art::Event& evt,
362  const art::InputTag& which,
363  unsigned int cryostat,
364  unsigned int tpc,
365  unsigned int plane);
366 
367 
368  private:
369 
370  std::vector<int> fWireMin;
371  std::vector<int> fWireMax;
372  std::vector<int> fTimeMin;
373  std::vector<int> fTimeMax;
374 
375  std::vector<double> fRawCharge;
376  std::vector<double> fConvertedCharge;
377 
378  };
379 }
380 
381 #endif
382 
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::vector< TCSlice > slices
Definition: DataStructs.cxx:10
std::size_t color(std::string const &procname)
Float_t proj
Definition: plot.C:34
TCEvent evt
Definition: DataStructs.cxx:5
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:52
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