22 #include "TRootEmbeddedCanvas.h" 64 "evd::XZYZProjectionsView",
68 "evd::XZYZProjectionsView",
77 new TGLayoutHints(kLHintsTop | kLHintsExpandX,
82 fCanvas->Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
"evd::XZYZProjectionsView",
83 this,
"AspectRatioHandler(int, int, int, TObject*)");
109 static double lastnx = 0.0;
110 static double lastny = 0.0;
122 if (lastnx == nx && lastny==ny)
return;
123 static const double tol = 0.001;
124 if (
fabs(lastnx-nx)<tol &&
fabs(lastny-ny)<tol)
return;
148 xvx->SetTickLength(0.01);
149 xvy->SetTickLength(0.01);
151 xvx->SetTitleSize(0.15*sfx);
152 xvy->SetTitleSize(0.15*sfx);
154 xvx->SetTitleOffset(0.8);
155 xvy->SetTitleOffset(0.65*sfy);
156 xvx->SetLabelSize(0.12*sfx);
157 xvy->SetLabelSize(0.12*sfx);
158 xvx->SetLabelOffset(0.025*sfx);
163 yvx->SetTickLength(0.01);
164 yvy->SetTickLength(0.01);
165 yvx->SetTitleSize(0.15*sfy);
166 yvy->SetTitleSize(0.15*sfy);
167 yvx->SetTitleOffset(0.8);
168 yvy->SetTitleOffset(0.65*sfx);
170 yvx->SetLabelSize(0.12*sfy);
171 yvy->SetLabelSize(0.12*sfy);
172 yvx->SetLabelOffset(0.025*sfy);
221 static int ilolast = -1;
222 static int ihilast = -1;
230 bool axis1changed = (i1lo!=ilolast)||(i1hi!=ihilast);
231 bool axis2changed = (i2lo!=ilolast)||(i2hi!=ihilast);
233 if (axis1changed==
true) {
240 if (axis2changed==
true) {
248 if(axis1changed || axis2changed){
265 if (event != kKeyPress || key !=
'=' )
280 float xcm = xmax -
xmin;
281 float ycm = ymax -
ymin;
282 float zcm = zmax - zmin;
288 float xpixcm = xpix/xcm;
289 float ypixcm = ypix/ycm;
290 float zpixcm = zpix/zcm;
292 float xboundmin, xboundmax, yboundmin, yboundmax, zboundmin, zboundmax;
298 if( xpixcm < ypixcm && xpixcm < zpixcm ){
302 zboundmin, zboundmax,
306 yboundmin, yboundmax,
315 else if( ypixcm < xpixcm && ypixcm < zpixcm ){
320 zboundmin, zboundmax,
324 xboundmin, xboundmax,
334 else if( zpixcm < ypixcm && zpixcm < xpixcm ){
339 xboundmin, xboundmax,
343 yboundmin, yboundmax,
352 else if( ypixcm == xpixcm && ypixcm < zpixcm ){
356 zboundmin, zboundmax,
365 else if( zpixcm == xpixcm && zpixcm < ypixcm ){
369 yboundmin, yboundmax,
376 else if( zpixcm == ypixcm && zpixcm < xpixcm ){
380 xboundmin, xboundmax,
392 float max,
float boundmin,
393 float boundmax,
int tpix,
float tcm)
395 std::vector<float>
range;
397 float zoom = (tcm * pix / tpix ) -cm;
398 float lo = min - (zoom/2);
399 float hi = max + (zoom/2);
402 float shift = boundmin -
lo;
408 float shift = hi - boundmax;
412 range.push_back( lo );
413 range.push_back( hi );
void SetZrange(int i1, int i2)
TSpline3 lo("lo", xlo, ylo, 12,"0")
void GetWBoundCm(float *i1, float *i2) const
HeaderPad * fHeaderPad
Show header information.
A view showing XZ and YZ readout planes.
std::map< std::string, double > xmax
fvar< T > fabs(const fvar< T > &x)
Drawing pad for short summary of an MC event.
TZProjPad * fYview
Y - Z projection of the event.
MCBriefPad * fMC
Short summary of MC event.
Drawing pad for time or charge histograms.
void Draw(const char *opt=0, bool *rezoom=0)
void GetZBoundCm(float *i1, float *i2) const
TCanvas * fCanvas
The ROOT drawing canvas.
TGLayoutHints * fLayout
Layout hints for frame.
Manage all things related to colors for the event display.
void GetWrangeCm(float *i1, float *i2) const
void SetWrangeCm(float i1, float i2)
TSpline3 hi("hi", xhi, yhi, 18,"0")
std::vector< float > GetRightAxesRange(int pix, float cm, float min, float max, float boundmin, float boundmax, int tpix, float tcm)
A drawing pad for an XZ or ZY.
void SetZrangeCm(float i1, float i2)
static float min(const float a, const float b, const float c)
TH2F * fHisto
Histogram to draw objects on.
XZYZProjectionsView(TGMainFrame *mf)
void AspectRatioHandler(int event, int key, int py, TObject *sel)
evd::Refresher gRefresher
SliceButtonBar * fSliceButtonBar
Bar with slice controls.
void GetZrangeCm(float *i1, float *i2) const
void GetZrange(int *i1, int *i2) const
void Draw(const char *opt="")
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
TZProjPad * fXview
X - Z projection of the event.
TRootEmbeddedCanvas * fEmbCanvas
Embedded canvas.
static constexpr Double_t cm
TQPad * fRawT
Histogram of raw times.
TQPad * fRawQ
Histogram of raw charges.