RecoBaseDrawer.h
Go to the documentation of this file.
1 /// \file RecoBaseDrawer.h
2 /// \brief Class to aid in the rendering of RecoBase objects
3 /// \author messier@indiana.edu
4 /// \version $Id: RecoBaseDrawer.h,v 1.3 2010/11/11 22:47:20 p-novaart Exp $
5 #ifndef EVD_RECOBASEDRAWER_H
6 #define EVD_RECOBASEDRAWER_H
7 
8 #include <vector>
9 
11 #include "canvas/Persistency/Common/FindMany.h"
15 
21 
22 #ifdef __ROOTCLING__
23 
24 //namespace art {
25 // class Event;
26 // class ServiceHandle;
27 //}
28 
29 #else
31 #endif
32 
33 class TVector3;
34 class TH1F;
35 namespace evdb {
36  class View2D;
37  class View3D;
38 }
39 
40 namespace gar {
41 
42 namespace rec {
43  class Hit;
44  class TPCCluster;
45  class Track;
46  class Shower;
47  class VecHit;
48  class Vertex;
49  class Cluster;
50 }
51 
52 
53 namespace detinfo {
54  class GArPropertiesService;
55  class DetectorProperties;
56 }
57 
58 namespace evd {
59 
60 class ColorDrawingOptions;
61 class RawDrawingOptions;
62 class RecoDrawingOptions;
63 
64 /// Aid in the rendering of RecoBase objects
66 {
67 public:
69  ~RecoBaseDrawer();
70 
71 public:
72 
73  void Hit3D(art::Event const& evt,
74  evdb::View3D* view);
75 
76  void TPCCluster3D(art::Event const& evt,
77  evdb::View3D* view);
78 
79  void CaloCluster3D(art::Event const& evt,
80  evdb::View3D* view);
81 
82  void CaloHit3D(art::Event const& evt,
83  evdb::View3D* view);
84 
85  void Track3D(art::Event const& evt,
86  evdb::View3D* view);
87 
88  void VecHit3D(art::Event const& evt,
89  evdb::View3D* view);
90 
91  void Vertex3D(art::Event const& evt,
92  evdb::View3D* view);
93 
94  void DrawHit3D(std::vector<const rec::Hit*> const& hit,
95  evdb::View3D* view,
96  int color,
97  int marker = 2,
98  int size = 2);
99 
100  void DrawTPCCluster3D(std::vector<const gar::rec::TPCCluster*> const& TPCClusters,
101  evdb::View3D * view,
102  int color,
103  int marker = 2,
104  int size = 2);
105 
106  void DrawTrackPolyLine3D(std::vector<const gar::rec::TrackTrajectory*> const& trajectories,
107  evdb::View3D * view,
108  int color,
109  int width = 2);
110 
111  void DrawCaloCluster3D(std::vector<const gar::rec::Cluster*> const& Clusters,
112  evdb::View3D * view,
113  int color);
114 
115  void DrawCaloHit3D(std::vector<const gar::rec::CaloHit*> const& CaloHits,
116  evdb::View3D * view);
117 
118  void DrawTrack3D(rec::Track const& track,
119  evdb::View3D* view,
120  int color,
121  int marker = 1,
122  int size = 2);
123 
124  void DrawHelix3D(const float *trackpar,
125  const float xpar,
126  const float xother,
127  evdb::View3D* view,
128  int color,
129  int width);
130 
131  void DrawVecHit3D(std::vector<const rec::VecHit*> const& vechits,
132  evdb::View3D* view,
133  int color = 6,
134  int marker = 28,
135  int size = 2);
136 
137  void DrawVertex3D(const float *pos,
138  evdb::View3D* view,
139  int color = 5,
140  int marker = 20,
141  int size = 1);
142 
143 
144  void DrawArrow3D(const float *startpos,
145  const float *arrowvec,
146  evdb::View3D* view,
147  int color,
148  float lengthscale = 1.0);
149 
150  private:
151 
152  int GetHits(art::Event const& evt,
153  std::string const& which,
154  std::vector<const rec::Hit*> & hits);
155 
156  int GetTPCClusters(art::Event const& evt,
157  std::string const& which,
158  std::vector<const rec::TPCCluster*> & TPCClusters);
159 
160  int GetTracks(art::Event const& evt,
161  std::string const& which,
162  art::View<rec::Track> & track);
163 
164  int GetVecHits(art::Event const& evt,
165  std::string const& which,
166  std::vector<const rec::VecHit*> & vechits);
167 
168  int GetVertices(art::Event const& evt,
169  std::string const& which,
171 
172  int GetShowers(art::Event const& evt,
173  std::string const& which,
175 
176  int GetCaloClusters(art::Event const& evt,
177  std::string const& which,
178  std::vector<const rec::Cluster*> & Clusters);
179 
180  int GetCaloHits(art::Event const& evt,
181  std::string const& which,
182  std::vector<const rec::CaloHit*> & CaloHits);
183 
184  private:
185 
186 
187  };
188 }
189 }
190 #endif
191 ////////////////////////////////////////////////////////////////////////
rec
Definition: tracks.py:88
std::string string
Definition: nybbler.cc:12
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
LArSoft includes.
Definition: InfoTransfer.h:33
Definition: fwd.h:46
Aid in the rendering of RecoBase objects.
General LArSoft Utilities.
Detector simulation of raw signals on wires.
std::size_t color(std::string const &procname)
General GArSoft Utilities.
TCEvent evt
Definition: DataStructs.cxx:7
vertex reconstruction