Public Member Functions | Protected Attributes | Private Attributes | List of all members
evd::Display3DPad Class Reference

A drawing pad showing a 3D rendering of the detector. More...

#include "/cvmfs/"

Inheritance diagram for evd::Display3DPad:

Public Member Functions

 Display3DPad (const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt)
 ~Display3DPad ()
void Draw ()
TPad * Pad ()
HeaderDrawerHeaderDraw ()
GeometryDrawerGeometryDraw ()
SimulationDrawerSimulationDraw ()
RawDataDrawerRawDataDraw ()
RecoBaseDrawerRecoBaseDraw ()

Protected Attributes

TPad * fPad
 The ROOT graphics pad. More...
 Drawer for event header info. More...
 Drawer for detector geometry. More...
 Drawer for simulation objects. More...
 Drawer for raw data. More...
 Drawer for recobase objects. More...

Private Attributes

 Collection of graphics objects to render. More...

Detailed Description

A drawing pad showing a 3D rendering of the detector.

Definition at line 20 of file Display3DPad.h.

Constructor & Destructor Documentation

evd::Display3DPad::Display3DPad ( const char *  nm,
const char *  ti,
double  x1,
double  y1,
double  x2,
double  y2,
const char *  opt 

Create a pad to show a 3D rendering of the detector and events

nm: Name of the pad
ti: Title of the pad
x1: Location of left edge of pad (0-1)
x2: Location of right edge of pad (0-1)
y1: Location of bottom edge of pad (0-1)
y2: Location of top edge of pad (0-1)
optOptions. Currently just a place holder

Definition at line 38 of file Display3DPad.cxx.

References fView.

41  :
42  DrawingPad(nm, ti, x1, y1, x2, y2)
43  {
44  // this->Pad()->Draw();
45  // this->Pad()->cd();
46  fView = new evdb::View3D();
47  }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
static constexpr Double_t nm
Definition: Munits.h:133
evdb::View3D * fView
Collection of graphics objects to render.
Definition: Display3DPad.h:31
DrawingPad(const char *nm, const char *ti, double x1, double y1, double y2, double x2)
Definition: DrawingPad.cxx:34
evd::Display3DPad::~Display3DPad ( )

Definition at line 50 of file Display3DPad.cxx.

References fView.

51  {
52  if (fView) { delete fView; fView = 0; }
53  }
evdb::View3D * fView
Collection of graphics objects to render.
Definition: Display3DPad.h:31

Member Function Documentation

void evd::Display3DPad::Draw ( )

Definition at line 56 of file Display3DPad.cxx.

References evdb::View3D::Clear(), geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), evdb::View3D::Draw(), evt, evd::SimulationDrawer::FLSHit3D(), evd::DrawingPad::fPad, evd::GeometryDrawingOptions::fPhi, evd::GeometryDrawingOptions::fPsi, evd::GeometryDrawingOptions::fTheta, fView, evd::DrawingPad::GeometryDraw(), evdb::EventHolder::GetEvent(), Header(), evd::DrawingPad::HeaderDraw(), evdb::EventHolder::Instance(), evd::SimulationDrawer::MCTruthTrajectories3D(), evd::SimulationDrawer::MCTruthVectors3D(), evd::SimulationDrawer::MCTruthVertices3D(), MECModelEnuComparisons::opt, evd::DrawingPad::Pad(), evd::DrawingPad::RawDataDraw(), evd::DrawingPad::RecoBaseDraw(), evd::DrawingPad::SimulationDraw(), and registry_explorer::v.

Referenced by evd::Display3DView::Display3DView(), and evd::Display3DView::Draw().

57  {
58  fView->Clear();
60  // grab the event from the singleton
62  if (evt==0) return;
65  this->HeaderDraw()-> Header (fView);
66  this->GeometryDraw()-> DetOutline3D (*evt, fView);
67  this->RawDataDraw()-> RawDigit3D (*evt, fView);
68  this->SimulationDraw()->MCTruthVertices3D (*evt, fView);
69  this->SimulationDraw()->MCTruthVectors3D (*evt, fView);
71  this->SimulationDraw()->FLSHit3D (*evt, fView);
72  this->RecoBaseDraw()-> CellHit3D (*evt, fView);
73  this->RecoBaseDraw()-> Cluster3D (*evt, fView);
74  this->RecoBaseDraw()-> Prong3D (*evt, fView);
76  int irep;
77  this->Pad()->Clear();
78  this->Pad()->cd();
79  if (fPad->GetView()==0) {
80  double rmin[]={ -geo->DetHalfWidth(),
81  -geo->DetHalfHeight(),
82  (0.5-0.45)*geo->DetLength()
83  };
84  double rmax[]={ geo->DetHalfWidth(),
85  geo->DetHalfHeight(),
86  (0.5+0.25)*geo->DetLength()
87  };
88  TView3D* v = new TView3D(1,rmin,rmax);
89  v->SetPerspective();
90  v->SetView(-125.0,-115.0,135.0,irep);
91  fPad->SetView(v); // ROOT takes ownership of object *v
92  }
94  fPad->GetView()->SetView(opt->fTheta,opt->fPhi,opt->fPsi, irep);
95  fView->Draw();
96  fPad->Update();
97  }
const art::Event * GetEvent() const
Definition: EventHolder.cxx:45
HeaderDrawer * HeaderDraw()
Definition: DrawingPad.cxx:64
double fTheta
View angles for 3D.
double DetLength() const
GeometryDrawer * GeometryDraw()
Definition: DrawingPad.cxx:73
std::string Header(std::string label)
RawDataDrawer * RawDataDraw()
Definition: DrawingPad.cxx:91
static EventHolder * Instance()
Definition: EventHolder.cxx:15
int evt
RecoBaseDrawer * RecoBaseDraw()
Definition: DrawingPad.cxx:101
TPad * Pad()
Definition: DrawingPad.h:27
double DetHalfHeight() const
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:82
void Draw()
Definition: View3D.cxx:30
void MCTruthTrajectories3D(const art::Event &evt, evdb::View3D *view)
void Clear()
Definition: View3D.cxx:40
void MCTruthVectors3D(const art::Event &evt, evdb::View3D *view)
double DetHalfWidth() const
void MCTruthVertices3D(const art::Event &evt, evdb::View3D *view)
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:37
evdb::View3D * fView
Collection of graphics objects to render.
Definition: Display3DPad.h:31
Helper for AttenCurve.
Definition: Path.h:10
void FLSHit3D(const art::Event &evt, evdb::View3D *xzview)
GeometryDrawer * evd::DrawingPad::GeometryDraw ( )

Provide access to the drawer for the detector geometry

Definition at line 73 of file DrawingPad.cxx.

References evd::DrawingPad::fGeometryDraw.

Referenced by Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

74  {
75  if (fGeometryDraw==0) fGeometryDraw = new GeometryDrawer();
76  return fGeometryDraw;
77  }
GeometryDrawer * fGeometryDraw
Drawer for detector geometry.
Definition: DrawingPad.h:39
HeaderDrawer * evd::DrawingPad::HeaderDraw ( )

Provide access to the drawer for the event header

Definition at line 64 of file DrawingPad.cxx.

References evd::DrawingPad::fHeaderDraw.

Referenced by evd::HeaderPad::Draw(), Draw(), and evd::DrawingPad::Pad().

65  {
66  if (fHeaderDraw==0) fHeaderDraw = new HeaderDrawer();
67  return fHeaderDraw;
68  }
HeaderDrawer * fHeaderDraw
Drawer for event header info.
Definition: DrawingPad.h:38
TPad* evd::DrawingPad::Pad ( )
RawDataDrawer * evd::DrawingPad::RawDataDraw ( )

Provide access to the drawer for the RawData classes

Definition at line 91 of file DrawingPad.cxx.

References evd::DrawingPad::fRawDataDraw.

Referenced by evd::TZProjPad::AutoZoom(), evd::TQPad::Draw(), evd::HardwarePad::Draw(), Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

92  {
93  if (fRawDataDraw==0) fRawDataDraw = new RawDataDrawer();
94  return fRawDataDraw;
95  }
RawDataDrawer * fRawDataDraw
Drawer for raw data.
Definition: DrawingPad.h:41
RecoBaseDrawer * evd::DrawingPad::RecoBaseDraw ( )

Provide access to the drawer for RecoBase classes

Definition at line 101 of file DrawingPad.cxx.

References evd::DrawingPad::fRecoBaseDraw.

Referenced by evd::TQPad::Draw(), Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

102  {
103  if (fRecoBaseDraw==0) fRecoBaseDraw = new RecoBaseDrawer();
104  return fRecoBaseDraw;
105  }
RecoBaseDrawer * fRecoBaseDraw
Drawer for recobase objects.
Definition: DrawingPad.h:42
SimulationDrawer * evd::DrawingPad::SimulationDraw ( )

Provide access to the drawer for the Simulation classes

Definition at line 82 of file DrawingPad.cxx.

References evd::DrawingPad::fSimulationDraw.

Referenced by evd::TZProjPad::AutoZoomTruth(), evd::MCBriefPad::Draw(), evd::TQPad::Draw(), Draw(), evd::TZProjPad::Draw(), and evd::DrawingPad::Pad().

83  {
84  if (fSimulationDraw==0) fSimulationDraw = new SimulationDrawer();
85  return fSimulationDraw;
86  }
SimulationDrawer * fSimulationDraw
Drawer for simulation objects.
Definition: DrawingPad.h:40

Member Data Documentation

GeometryDrawer* evd::DrawingPad::fGeometryDraw

Drawer for detector geometry.

Definition at line 39 of file DrawingPad.h.

Referenced by evd::DrawingPad::GeometryDraw(), and evd::DrawingPad::~DrawingPad().

HeaderDrawer* evd::DrawingPad::fHeaderDraw

Drawer for event header info.

Definition at line 38 of file DrawingPad.h.

Referenced by evd::DrawingPad::HeaderDraw(), and evd::DrawingPad::~DrawingPad().

TPad* evd::DrawingPad::fPad
RawDataDrawer* evd::DrawingPad::fRawDataDraw

Drawer for raw data.

Definition at line 41 of file DrawingPad.h.

Referenced by evd::DrawingPad::RawDataDraw(), and evd::DrawingPad::~DrawingPad().

RecoBaseDrawer* evd::DrawingPad::fRecoBaseDraw

Drawer for recobase objects.

Definition at line 42 of file DrawingPad.h.

Referenced by evd::DrawingPad::RecoBaseDraw(), and evd::DrawingPad::~DrawingPad().

SimulationDrawer* evd::DrawingPad::fSimulationDraw

Drawer for simulation objects.

Definition at line 40 of file DrawingPad.h.

Referenced by evd::DrawingPad::SimulationDraw(), and evd::DrawingPad::~DrawingPad().

evdb::View3D* evd::Display3DPad::fView

Collection of graphics objects to render.

Definition at line 31 of file Display3DPad.h.

Referenced by Display3DPad(), Draw(), and ~Display3DPad().

The documentation for this class was generated from the following files: