Create a pad to show an orthographic rendering of 3D objcts.
78 Pad()->SetBit(TPad::kCannotMove);
81 Pad()->SetLeftMargin(0.080);
82 Pad()->SetRightMargin(0.010);
83 Pad()->SetTopMargin(0.010);
84 Pad()->SetBottomMargin(0.10);
94 for (
size_t i = 0; i < geo->
NTPC(); ++i) {
95 double local[3] = {0., 0., 0.};
96 double world[3] = {0., 0., 0.};
103 if (minz > world[2] - geo->
DetLength(i) / 2.) minz = world[2] - geo->
DetLength(i) / 2.;
104 if (maxz < world[2] + geo->
DetLength(i) / 2.) maxz = world[2] + geo->
DetLength(i) / 2.;
127 << __func__ <<
": unwknow projection " << ((
int)proj) <<
"\n";
129 TPCBox.back().SetFillStyle(0);
130 TPCBox.back().SetLineStyle(2);
131 TPCBox.back().SetLineWidth(2);
132 TPCBox.back().SetLineColor(16);
156 << __func__ <<
": unwknow projection " << ((
int)proj) <<
"\n";
162 fHisto->SetBit(kCannotPick);
163 fHisto->SetBit(TPad::kCannotMove);
164 fHisto->SetTitleOffset(1.,
"Y");
165 fHisto->SetTitleOffset(1.,
"X");
166 fHisto->GetXaxis()->SetLabelSize(0.04);
167 fHisto->GetXaxis()->SetTitleSize(0.04);
170 fHisto->GetXaxis()->SetTitle(
"x (cm)");
171 fHisto->GetYaxis()->SetTitle(
"y (cm)");
174 fHisto->GetXaxis()->SetTitle(
"z (cm)");
175 fHisto->GetYaxis()->SetTitle(
"x (cm)");
178 fHisto->GetXaxis()->SetTitle(
"z (cm)");
179 fHisto->GetYaxis()->SetTitle(
"y (cm)");
183 << __func__ <<
": unexpected flow (projection: " << ((
int)proj) <<
")\n";
186 fHisto->GetXaxis()->CenterTitle();
187 fHisto->GetYaxis()->SetLabelSize(0.04);
188 fHisto->GetYaxis()->SetTitleSize(0.04);
189 fHisto->GetYaxis()->CenterTitle();
193 fView =
new evdb::View2D();
196 Pad()->SetFillColor(18);
197 Pad()->SetFrameFillColor(18);
198 Pad()->GetPainter()->SetFillColor(18);
204 std::ostringstream ostr;
205 ostr <<
"evd::Ortho3DPad::MouseEvent((evd::Ortho3DPad*)" <<
this <<
")";
206 fPad->AddExec(
"getmousezoom", ostr.str().c_str());
int fPressPy
Poxel location where button 1 was pressed.
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
double fReleaseX
User location where button 1 was released.
Geometry information for a single TPC.
int fCurrentPy
Current pixel location of mouse.
int fPressPx
Pixel location where button 1 was pressed.
TH1F * DrawFrame(TGraph *gr0, TGraph *gr1, TPad *p, const char *xt, const char *yt, double yminsc, double ymaxsc)
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
double fReleaseY
User location where button 1 was released.
evd::OrthoProj_t fProj
Projection.
bool fBoxDrawn
Is selection box drawn?
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
double fPressX
User location where button 1 was pressed.
double fPressY
User location where button 1 was pressed.
int fCurrentPx
Current pixel location of mouse.
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
std::vector< TBox > TPCBox
TPC box.
TH1F * fHisto
Enclosing histogram.
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
TPad * fPad
The ROOT graphics pad.
bool fPress
Is button 1 pressed?
LArSoft geometry interface.
TGNumberEntry * fMSizeEntry
For changing marker size.
void LocalToWorld(const double *tpc, double *world) const
Transform point from local TPC frame to world frame.
DrawingPad(const char *nm, const char *ti, double x1, double y1, double y2, double x2)
evdb::View2D * fView
Collection of graphics objects to render.
double fMSize
Marker size.
cet::coded_exception< error, detail::translate > exception