8 #include "art/Utilities/ToolMacros.h" 
   14 #include "nuevdb/EventDisplayBase/View3D.h" 
   15 #include "fhiclcpp/ParameterSet.h" 
   17 #include "TPolyLine3D.h" 
   44     void DrawRectangularBox(evdb::View3D* view, 
double const* coordsLo, 
double const* coordsHi, 
int color=kGray, 
int width = 1, 
int style = 1) 
const;
 
   45     void DrawGrids(evdb::View3D* view, 
double const* coordsLo, 
double const* coordsHi, 
int color=kGray, 
int width = 1, 
int style = 1) 
const;
 
   46     void DrawAxes(evdb::View3D* view, 
double const* coordsLo, 
double const* coordsHi, 
int color=kGray, 
int width = 1, 
int style = 1) 
const;
 
   50     void configure(
const fhicl::ParameterSet& pset);
 
   68     fDrawGrid        = pset.get< 
bool >(
"DrawGrid",        
true);
 
   70     fDrawAxes        = pset.get< 
bool >(
"DrawAxes",        
true);
 
   79     auto const& geom = *(lar::providerFrom<geo::Geometry>());
 
  103                 std::array<double, 3U> 
const 
  104                   tpcLow {{ 
TPC.MinX(), 
TPC.MinY(), 
TPC.MinZ() }},
 
  105                   tpcHigh {{ 
TPC.MaxX(), 
TPC.MaxY(), 
TPC.MaxZ() }}
 
  107                 DrawGrids(view, tpcLow.data(), tpcHigh.data(), kGray+2, 1, kSolid);
 
  120         std::array<double, 3U> 
const 
  124         DrawAxes(view, detLow.data(), detHigh.data(), kBlue, 1, kSolid);
 
  133     std::array<double, 3U> 
const 
  163     TPolyLine3D& 
top = view->AddPolyLine3D(5, color, width, style);
 
  164     top.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
 
  165     top.SetPoint(1, coordsHi[0], coordsHi[1], coordsLo[2]);
 
  166     top.SetPoint(2, coordsHi[0], coordsHi[1], coordsHi[2]);
 
  167     top.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
 
  168     top.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
 
  170     TPolyLine3D& side = view->AddPolyLine3D(5, color, width, style);
 
  171     side.SetPoint(0, coordsHi[0], coordsHi[1], coordsLo[2]);
 
  172     side.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
 
  173     side.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
 
  174     side.SetPoint(3, coordsHi[0], coordsHi[1], coordsHi[2]);
 
  175     side.SetPoint(4, coordsHi[0], coordsHi[1], coordsLo[2]);
 
  177     TPolyLine3D& side2 = view->AddPolyLine3D(5, color, width, style);
 
  178     side2.SetPoint(0, coordsLo[0], coordsHi[1], coordsLo[2]);
 
  179     side2.SetPoint(1, coordsLo[0], coordsLo[1], coordsLo[2]);
 
  180     side2.SetPoint(2, coordsLo[0], coordsLo[1], coordsHi[2]);
 
  181     side2.SetPoint(3, coordsLo[0], coordsHi[1], coordsHi[2]);
 
  182     side2.SetPoint(4, coordsLo[0], coordsHi[1], coordsLo[2]);
 
  184     TPolyLine3D& 
bottom = view->AddPolyLine3D(5, color, width, style);
 
  185     bottom.SetPoint(0, coordsLo[0], coordsLo[1], coordsLo[2]);
 
  186     bottom.SetPoint(1, coordsHi[0], coordsLo[1], coordsLo[2]);
 
  187     bottom.SetPoint(2, coordsHi[0], coordsLo[1], coordsHi[2]);
 
  188     bottom.SetPoint(3, coordsLo[0], coordsLo[1], coordsHi[2]);
 
  189     bottom.SetPoint(4, coordsLo[0], coordsLo[1], coordsLo[2]);
 
  201     double const gridStep = std::min(25.0, std::max(10.,std::min({
std::abs(coordsHi[0] - coordsLo[0]), 
std::abs(coordsHi[1] - coordsLo[1]), 
std::abs(coordsHi[2] - coordsLo[2])})) / 5);
 
  204     for (
double z = coordsLo[2]; 
z <= coordsHi[2]; 
z += gridStep) {
 
  207         TPolyLine3D& gridt = view->AddPolyLine3D(2, color, style, width);
 
  208         gridt.SetPoint(0, coordsLo[0], coordsLo[1], 
z);
 
  209         gridt.SetPoint(1, coordsHi[0], coordsLo[1], 
z);
 
  212         TPolyLine3D& grids = view->AddPolyLine3D(2, color, style, width);
 
  213         grids.SetPoint(0, coordsHi[0], coordsLo[1], 
z);
 
  214         grids.SetPoint(1, coordsHi[0], coordsHi[1], 
z);
 
  219     for (
double x = coordsLo[0]; 
x <= coordsHi[0]; 
x += gridStep) {
 
  221         TPolyLine3D& gridt = view->AddPolyLine3D(2, color, style, width);
 
  222         gridt.SetPoint(0, 
x, coordsLo[1], coordsLo[2]);
 
  223         gridt.SetPoint(1, 
x, coordsLo[1], coordsHi[2]);
 
  227     for (
double y = coordsLo[1]; 
y <= coordsHi[1]; 
y += gridStep) {
 
  229         TPolyLine3D& grids = view->AddPolyLine3D(2, color, style, width);
 
  230         grids.SetPoint(0, coordsHi[0], 
y, coordsLo[2]);
 
  231         grids.SetPoint(1, coordsHi[0], 
y, coordsHi[2]);
 
  243     double const vertexMargin = 0.06;
 
  244     double const axisLength = 0.40; 
 
  246     double const dx = (coordsHi[0] - coordsLo[0]);
 
  247     double const dy = (coordsHi[1] - coordsLo[1]);
 
  248     double const dz = (coordsHi[2] - coordsLo[2]);
 
  251     double const x0 = coordsLo[0] - dx * vertexMargin;
 
  252     double const y0 = coordsLo[1] - dy * vertexMargin;
 
  253     double const z0 = coordsLo[2] - dz * vertexMargin;
 
  258     TPolyLine3D& xaxis = view->AddPolyLine3D(2, color, style, width);
 
  259     TPolyLine3D& yaxis = view->AddPolyLine3D(2, color, style, width);
 
  260     TPolyLine3D& zaxis = view->AddPolyLine3D(2, color, style, width);
 
  261     xaxis.SetPoint(0, x0,    y0, z0);
 
  262     xaxis.SetPoint(1, sz+x0, y0, z0);
 
  264     yaxis.SetPoint(0, x0, y0,     z0);
 
  265     yaxis.SetPoint(1, x0, y0+sz,  z0);
 
  267     zaxis.SetPoint(0, x0, y0, z0);
 
  268     zaxis.SetPoint(1, x0, y0, z0+sz);
 
  270     TPolyLine3D& xpoint = view->AddPolyLine3D(3, color, style, width);
 
  271     TPolyLine3D& ypoint = view->AddPolyLine3D(3, color, style, width);
 
  272     TPolyLine3D& zpoint = view->AddPolyLine3D(3, color, style, width);
 
  274     xpoint.SetPoint(0, 0.95*sz+x0, y0, z0-0.05*sz);
 
  275     xpoint.SetPoint(1, 1.00*sz+x0, y0, z0);
 
  276     xpoint.SetPoint(2, 0.95*sz+x0, y0, z0+0.05*sz);
 
  278     ypoint.SetPoint(0, x0, 0.95*sz+y0, z0-0.05*sz);
 
  279     ypoint.SetPoint(1, x0, 1.00*sz+y0, z0);
 
  280     ypoint.SetPoint(2, x0, 0.95*sz+y0, z0+0.05*sz);
 
  282     zpoint.SetPoint(0, x0-0.05*sz, y0, 0.95*sz+z0);
 
  283     zpoint.SetPoint(1, x0+0.00*sz, y0, 1.00*sz+z0);
 
  284     zpoint.SetPoint(2, x0+0.05*sz, y0, 0.95*sz+z0);
 
  286     TPolyLine3D& zleg = view->AddPolyLine3D(4, color, style, width);
 
  287     zleg.SetPoint(0,  x0-0.05*sz, y0+0.05*sz, z0+1.05*sz);
 
  288     zleg.SetPoint(1,  x0+0.05*sz, y0+0.05*sz, z0+1.05*sz);
 
  289     zleg.SetPoint(2,  x0-0.05*sz, y0-0.05*sz, z0+1.05*sz);
 
  290     zleg.SetPoint(3,  x0+0.05*sz, y0-0.05*sz, z0+1.05*sz);
 
  292     TPolyLine3D& yleg = view->AddPolyLine3D(5, color, style, width);
 
  293     yleg.SetPoint(0,  x0-0.05*sz, y0+1.15*sz, z0);
 
  294     yleg.SetPoint(1,  x0+0.00*sz, y0+1.10*sz, z0);
 
  295     yleg.SetPoint(2,  x0+0.00*sz, y0+1.05*sz, z0);
 
  296     yleg.SetPoint(3,  x0+0.00*sz, y0+1.10*sz, z0);
 
  297     yleg.SetPoint(4,  x0+0.05*sz, y0+1.15*sz, z0);
 
  299     TPolyLine3D& xleg = view->AddPolyLine3D(7, color, style, width);
 
  300     xleg.SetPoint(0,  x0+1.05*sz, y0+0.05*sz, z0-0.05*sz);
 
  301     xleg.SetPoint(1,  x0+1.05*sz, y0+0.00*sz, z0-0.00*sz);
 
  302     xleg.SetPoint(2,  x0+1.05*sz, y0+0.05*sz, z0+0.05*sz);
 
  303     xleg.SetPoint(3,  x0+1.05*sz, y0+0.00*sz, z0-0.00*sz);
 
  304     xleg.SetPoint(4,  x0+1.05*sz, y0-0.05*sz, z0-0.05*sz);
 
  305     xleg.SetPoint(5,  x0+1.05*sz, y0+0.00*sz, z0-0.00*sz);
 
  306     xleg.SetPoint(6,  x0+1.05*sz, y0-0.05*sz, z0+0.05*sz);
 
process_name opflash particleana ie ie ie z
 
Point GetActiveVolumeCenter() const 
Returns the center of the TPC active volume in world coordinates [cm]. 
 
Utilities related to art service access. 
 
Encapsulate the construction of a single cyostat. 
 
process_name opflash particleana ie x
 
double ActiveHalfHeight() const 
Half height (associated with y coordinate) of active TPC volume [cm]. 
 
double MinX() const 
Returns the world x coordinate of the start of the box. 
 
Geometry information for a single TPC. 
 
double MaxX() const 
Returns the world x coordinate of the end of the box. 
 
Geometry information for a single cryostat. 
 
standard_dbscan3dalg useful for diagnostics hits not in a line will not be clustered on on only for track like only for track like on on the smaller the less shower like tracks low
 
double ActiveHalfLength() const 
Length (associated with z coordinate) of active TPC volume [cm]. 
 
process_name opflash particleana ie ie y
 
double ActiveHalfWidth() const 
Half width (associated with x coordinate) of active TPC volume [cm]. 
 
double MinZ() const 
Returns the world z coordinate of the start of the box. 
 
double MaxY() const 
Returns the world y coordinate of the end of the box. 
 
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
 
double MaxZ() const 
Returns the world z coordinate of the end of the box. 
 
This is the interface class for drawing 3D detector geometries. 
 
double MinY() const 
Returns the world y coordinate of the start of the box. 
 
art framework interface to geometry description 
 
Encapsulate the construction of a single detector plane.