11 #include "nuevdb/EventDisplayBase/View3D.h" 16 #include "TPolyLine3D.h" 32 void DrawRectangularBox(evdb::View3D* view,
double* coordsLo,
double* coordsHi,
int color=kGray,
int width = 1,
int style = 1);
33 void DrawGrids(evdb::View3D* view,
double* coordsLo,
double* coordsHi,
int color=kGray,
int width = 1,
int style = 1);
34 void DrawAxes(evdb::View3D* view,
double* coordsLo,
double* coordsHi,
int color=kGray,
int width = 1,
int style = 1);
94 TPolyLine3D&
top = view->AddPolyLine3D(5, color, width, style);
95 top.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
96 top.SetPoint(1, coordsHi[0], coordsHi[1], coordsLo[2]);
97 top.SetPoint(2, coordsHi[0], coordsHi[1], coordsHi[2]);
98 top.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
99 top.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
101 TPolyLine3D& side = view->AddPolyLine3D(5, color, width, style);
102 side.SetPoint(0, coordsHi[0], coordsHi[1], coordsLo[2]);
103 side.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
104 side.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
105 side.SetPoint(3, coordsHi[0], coordsHi[1], coordsHi[2]);
106 side.SetPoint(4, coordsHi[0], coordsHi[1], coordsLo[2]);
108 TPolyLine3D& side2 = view->AddPolyLine3D(5, color, width, style);
109 side2.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
110 side2.SetPoint(1, coordsLo[0], coordsLo[1], coordsLo[2]);
111 side2.SetPoint(2, coordsLo[0], coordsLo[1], coordsHi[2]);
112 side2.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
113 side2.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
115 TPolyLine3D&
bottom = view->AddPolyLine3D(5, color, width, style);
116 bottom.SetPoint(0, coordsLo[0], coordsLo[1], coordsLo[2]);
117 bottom.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
118 bottom.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
119 bottom.SetPoint(3, coordsLo[0], coordsLo[1], coordsHi[2]);
120 bottom.SetPoint(4, coordsLo[0], coordsLo[1], coordsLo[2]);
127 double z = coordsLo[2];
130 TPolyLine3D& gridt = view->AddPolyLine3D(2, color, style, width);
131 gridt.SetPoint(0, coordsLo[0], coordsLo[1], z);
132 gridt.SetPoint(1, coordsHi[0], coordsLo[1], z);
134 TPolyLine3D& grids = view->AddPolyLine3D(2, color, style, width);
135 grids.SetPoint(0, coordsHi[0], coordsLo[1], z);
136 grids.SetPoint(1, coordsHi[0], coordsHi[1], z);
139 if (z>coordsHi[2])
break;
145 TPolyLine3D& gridt = view->AddPolyLine3D(2, color, style, width);
146 gridt.SetPoint(0, x, coordsLo[1], coordsLo[2]);
147 gridt.SetPoint(1, x, coordsLo[1], coordsHi[2]);
149 if (x>coordsHi[0])
break;
155 TPolyLine3D& grids = view->AddPolyLine3D(2, color, style, width);
156 grids.SetPoint(0, coordsHi[0], y, coordsLo[2]);
157 grids.SetPoint(1, coordsHi[0], y, coordsHi[2]);
159 if (y>coordsHi[1])
break;
163 TPolyLine3D& grids = view->AddPolyLine3D(2, color, style, width);
164 grids.SetPoint(0, coordsHi[0], y, coordsLo[2]);
165 grids.SetPoint(1, coordsHi[0], y, coordsHi[2]);
167 if (y<coordsLo[1])
break;
178 double y0 = 1.10*coordsLo[1];
179 double z0 = -0.10*coordsHi[2];
180 double sz = 0.20*coordsHi[2];
182 TPolyLine3D& xaxis = view->AddPolyLine3D(2, color, style, width);
183 TPolyLine3D& yaxis = view->AddPolyLine3D(2, color, style, width);
184 TPolyLine3D& zaxis = view->AddPolyLine3D(2, color, style, width);
185 xaxis.SetPoint(0, x0, y0, z0);
186 xaxis.SetPoint(1, sz+x0, y0, z0);
188 yaxis.SetPoint(0, x0, y0, z0);
189 yaxis.SetPoint(1, x0, y0+sz, z0);
191 zaxis.SetPoint(0, x0, y0, z0);
192 zaxis.SetPoint(1, x0, y0, z0+sz);
194 TPolyLine3D& xpoint = view->AddPolyLine3D(3, color, style, width);
195 TPolyLine3D& ypoint = view->AddPolyLine3D(3, color, style, width);
196 TPolyLine3D& zpoint = view->AddPolyLine3D(3, color, style, width);
198 xpoint.SetPoint(0, 0.95*sz+x0, y0, z0-0.05*sz);
199 xpoint.SetPoint(1, 1.00*sz+x0, y0, z0);
200 xpoint.SetPoint(2, 0.95*sz+x0, y0, z0+0.05*sz);
202 ypoint.SetPoint(0, x0, 0.95*sz+y0, z0-0.05*sz);
203 ypoint.SetPoint(1, x0, 1.00*sz+y0, z0);
204 ypoint.SetPoint(2, x0, 0.95*sz+y0, z0+0.05*sz);
206 zpoint.SetPoint(0, x0-0.05*sz, y0, 0.95*sz+z0);
207 zpoint.SetPoint(1, x0+0.00*sz, y0, 1.00*sz+z0);
208 zpoint.SetPoint(2, x0+0.05*sz, y0, 0.95*sz+z0);
210 TPolyLine3D& zleg = view->AddPolyLine3D(4, color, style, width);
211 zleg.SetPoint(0, x0-0.05*sz, y0+0.05*sz, z0+1.05*sz);
212 zleg.SetPoint(1, x0+0.05*sz, y0+0.05*sz, z0+1.05*sz);
213 zleg.SetPoint(2, x0-0.05*sz, y0-0.05*sz, z0+1.05*sz);
214 zleg.SetPoint(3, x0+0.05*sz, y0-0.05*sz, z0+1.05*sz);
216 TPolyLine3D& yleg = view->AddPolyLine3D(5, color, style, width);
217 yleg.SetPoint(0, x0-0.05*sz, y0+1.15*sz, z0);
218 yleg.SetPoint(1, x0+0.00*sz, y0+1.10*sz, z0);
219 yleg.SetPoint(2, x0+0.00*sz, y0+1.05*sz, z0);
220 yleg.SetPoint(3, x0+0.00*sz, y0+1.10*sz, z0);
221 yleg.SetPoint(4, x0+0.05*sz, y0+1.15*sz, z0);
223 TPolyLine3D& xleg = view->AddPolyLine3D(7, color, style, width);
224 xleg.SetPoint(0, x0+1.05*sz, y0+0.05*sz, z0-0.05*sz);
225 xleg.SetPoint(1, x0+1.05*sz, y0+0.00*sz, z0-0.00*sz);
226 xleg.SetPoint(2, x0+1.05*sz, y0+0.05*sz, z0+0.05*sz);
227 xleg.SetPoint(3, x0+1.05*sz, y0+0.00*sz, z0-0.00*sz);
228 xleg.SetPoint(4, x0+1.05*sz, y0-0.05*sz, z0-0.05*sz);
229 xleg.SetPoint(5, x0+1.05*sz, y0+0.00*sz, z0-0.00*sz);
230 xleg.SetPoint(6, x0+1.05*sz, y0-0.05*sz, z0+0.05*sz);
244 for(
size_t viewNo = 0; viewNo < geo->
Nviews(); viewNo++)
246 for(
size_t wireNo = 0; wireNo < geo->
Nwires(viewNo); wireNo++)
252 if (channelStatus.
IsBad(channel))
262 TPolyLine3D& pl = view->AddPolyLine3D(2, color, style, width);
263 pl.SetPoint(0, coords[0]-0.5, wireStart[1], wireStart[2]);
264 pl.SetPoint(1, coords[0]-0.5, wireEnd[1], wireEnd[2]);
virtual bool IsBad(raw::ChannelID_t channel) const =0
Returns whether the specified channel is bad in the current run.
void GetStart(double *xyz) const
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
unsigned int fTPC
TPC number to draw, typically set by TWQProjectionView.
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
art framework interface to geometry description
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
unsigned int fCryostat
Cryostat number to draw, typically set by TWQProjectionView.
T get(std::string const &key) const
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
Class providing information about the quality of channels.
std::size_t color(std::string const &procname)
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
void GetEnd(double *xyz) const
Interface for experiment-specific channel quality info provider.
unsigned int Nviews() const
Returns the number of views (different wire orientations)
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Interface for experiment-specific service for channel quality info.
This is the interface class for drawing 3D detector geometries.
LArSoft geometry interface.
WireGeo const * WirePtr(geo::WireID const &wireid) const
Returns the specified wire.