TZProjPad.h
Go to the documentation of this file.
1 ///
2 /// \file TZProjPad
3 /// \brief Drawing pad showing a single X-Z or Y-Z projection of an event
4 /// \author messier@indiana.edu
5 /// \version $Id: TZProjPad.h,v 1.7 2012-07-23 23:50:52 bckhouse Exp $
6 ///
7 #ifndef EVD_TZPROJPAD_H
8 #define EVD_TZPROJPAD_H
10 
11 #include "TH2F.h"
12 
13 namespace art {class Event;}
14 namespace evdb { class View2D; }
15 
16 namespace evd
17 {
18  class RawDataDrawer;
19  class RecoBaseDrawer;
20 
21  /// Implement an UnZoom menu item
22  class THUnZoomable: public TH2F
23  {
24  public:
25  THUnZoomable(const char* a, const char* b, int nx, double x0, double x1, int ny, double y0, double y1);
26  void UnZoom(); // *MENU*
27  protected:
28  ClassDef(THUnZoomable, 0);
29  };
30 
31  /// A drawing pad for an XZ or ZY
32  class TZProjPad : public DrawingPad {
33  public:
34  TZProjPad(const char* nm, const char* ti,
35  double x1, double y1,
36  double x2, double y2,
37  const char* opt);
38  ~TZProjPad();
39  // \a rezoom is an out-param, whether the display rezoomed this time
40  void Draw(const char* opt=0, bool* rezoom = 0);
41 
42  void GetWrange(int *i1, int *i2) const;
43  void GetZrange(int *i1, int *i2) const;
44  void GetWrangeCm(float *i1, float *i2) const;
45  void GetZrangeCm(float *i1, float *i2) const;
46  void GetZBoundCm(float *i1, float *i2) const;
47  void GetWBoundCm(float *i1, float *i2) const;
48 
49  void SetZrange(int i1, int i2);
50  void SetWrange(int i1, int i2);
51  void SetZrangeCm(float i1, float i2);
52  void SetWrangeCm(float i1, float i2);
53 
54  private:
55  void AutoZoom();
56  void AutoZoomTruth(const art::Event* evt);
57  void AutoZoomSlice(const art::Event* evt);
58  void AutoZoomBox(const art::Event* evt);
59  void AutoZoomHelper(double xmin, double xmax,
60  double ymin, double ymax,
61  double zmin, double zmax, double safety);
62  void ShowFull();
63  void ShowPartial();
64  void LayoutHisto();
65 
66  public:
67  unsigned int fLastRun; ///< Last run number shown
68  unsigned int fLastEvt; ///< Last event number shown
69  int fLastSlice;///< Last slice number shown
70  int fLastZoom; ///< Last zoom option applied
71  int fDetId; ///< Detector display is configured for
72  int fXorY; ///< Which view? 0 = X vs. Z, 1 = Y vs. Z
73  TH2F* fHisto; ///< Histogram to draw objects on
74  evdb::View2D* fView; ///< Collection of graphics objects to render
75  };
76 }
77 
78 #endif
79 ////////////////////////////////////////////////////////////////////////
tree Draw("slc.nhit")
std::map< std::string, double > xmax
Float_t y1[n_points_granero]
Definition: compare.C:5
Implement an UnZoom menu item.
Definition: TZProjPad.h:22
unsigned int fLastRun
Last run number shown.
Definition: TZProjPad.h:67
Float_t x1[n_points_granero]
Definition: compare.C:5
static constexpr Double_t nm
Definition: Munits.h:133
Manage all things related to colors for the event display.
Definition: Display3DPad.h:11
Double_t ymax
Definition: plot.C:25
int fXorY
Which view? 0 = X vs. Z, 1 = Y vs. Z.
Definition: TZProjPad.h:72
Base class for all event display drawing pads.
A drawing pad for an XZ or ZY.
Definition: TZProjPad.h:32
nova event display
const double a
int evt
Base class for event display drawing pads.
Definition: DrawingPad.h:20
unsigned int fLastEvt
Last event number shown.
Definition: TZProjPad.h:68
TH2F * fHisto
Histogram to draw objects on.
Definition: TZProjPad.h:73
int fLastSlice
Last slice number shown.
Definition: TZProjPad.h:69
int fLastZoom
Last zoom option applied.
Definition: TZProjPad.h:70
const hit & b
Definition: hits.cxx:21
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
Double_t ymin
Definition: plot.C:24
evdb::View2D * fView
Collection of graphics objects to render.
Definition: TZProjPad.h:74
int fDetId
Detector display is configured for.
Definition: TZProjPad.h:71