TWireProjPad.h
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////////////
2 ///
3 /// \file TWireProjPad.h
4 /// \brief Drawing pad showing a single X-Z or Y-Z projection of an event
5 /// \author messier@indiana.edu
6 ///
7 /////////////////////////////////////////////////////////////////////////////
8 
9 #ifndef EVD_TWIREPROJPAD_H
10 #define EVD_TWIREPROJPAD_H
12 #include <vector>
13 
14 
15 class TH1F;
16 
17 namespace evdb { class View2D; }
18 
19 namespace util {
20  class PxLine;
21 }
22 
23 namespace evd {
24 
25  /// A drawing pad for time vs wire
26  class TWireProjPad : public DrawingPad {
27  public:
28  struct DrawOptions_t {
29  bool bZoom2DdrawToRoI = false; ///< whether to force zoom to RoI or not
30  }; // DrawOptions_t
31 
32  TWireProjPad(const char* nm, const char* ti,
33  double x1, double y1,
34  double x2, double y2,
35  unsigned int plane);
36  ~TWireProjPad();
37  void Draw(const char* opt=0);
38  void GetWireRange(int *i1, int *i2) const;
39  void SetWireRange(int i1, int i2);
40 
41  void SetZoomRange(int i1, int i2,int y1, int y2);
42 
43  /// Return the current draw options
44  DrawOptions_t const& GetDrawOptions() const { return fDrawOpts; }
45  /// Receive the full set of draw options
46  void SetDrawOptions(DrawOptions_t const& opt) { fDrawOpts = opt; }
47 
48  /// Sets the draw option about zooming to the region of interest
49  void SetZoomToRoI(bool bZoomToRoI)
50  { fDrawOpts.bZoom2DdrawToRoI = bZoomToRoI; }
51 
52  /// Sets the zoom parameters from the current histogram view
53  void SetZoomFromView();
54 
55  void SaveHitList(double i1, double i2,double y1, double y2, double distance, const char* zoom_opt,bool good_plane=true);
56 
57  double SaveSeedList(std::vector < util::PxLine > seedlines, double distance);
58 
59  void ClearHitList();
60  void SelectOneHit(double x, double y, const char* zoom_opt);
61 
62  unsigned int GetPlane() const { return fPlane; }
63 
64  void ClearandUpdatePad();
65  void UpdatePad();
66  void DrawLinesinView(std::vector< util::PxLine > lines,bool deleting=false,const char * zoom_opt=0);
67 
68  void ShowFull(int override=0);
69 
70  evdb::View2D* View() const { return fView; }
71 
72  std::vector<double> const& GetCurrentZoom() const {return fCurrentZoom;}
73 
74  private:
75  /* void AutoZoom(); */
76 
77 
78  private:
79 
80  std::vector<double> fCurrentZoom;
81  DrawOptions_t fDrawOpts; ///< set of current draw options
82 
83 
84  unsigned int fPlane; ///< Which plane in the detector
85  TH1F* fHisto; ///< Histogram to draw object on
86  evdb::View2D* fView; ///< Collection of graphics objects to render
87 
88  double fXLo; ///< Low value of x axis
89  double fXHi; ///< High value of x axis
90  double fYLo; ///< Low value of y axis
91  double fYHi; ///< High value of y axis
92  int fOri; ///< Orientation of the axes - see RawDrawingOptions for values
93  };
94 }
95 
96 #endif
97 ////////////////////////////////////////////////////////////////////////
Namespace for general, non-LArSoft-specific utilities.
unsigned int fPlane
Which plane in the detector.
Definition: TWireProjPad.h:84
opt
Definition: train.py:196
double fXLo
Low value of x axis.
Definition: TWireProjPad.h:88
unsigned int GetPlane() const
Definition: TWireProjPad.h:62
DrawOptions_t fDrawOpts
set of current draw options
Definition: TWireProjPad.h:81
std::vector< double > const & GetCurrentZoom() const
Definition: TWireProjPad.h:72
void SetZoomToRoI(bool bZoomToRoI)
Sets the draw option about zooming to the region of interest.
Definition: TWireProjPad.h:49
evdb::View2D * View() const
Definition: TWireProjPad.h:70
LArSoft includes.
Definition: InfoTransfer.h:33
A drawing pad for time vs wire.
Definition: TWireProjPad.h:26
int fOri
Orientation of the axes - see RawDrawingOptions for values.
Definition: TWireProjPad.h:92
double fXHi
High value of x axis.
Definition: TWireProjPad.h:89
DrawOptions_t const & GetDrawOptions() const
Return the current draw options.
Definition: TWireProjPad.h:44
Base class for event display drawing pads.
Definition: DrawingPad.h:29
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
double fYLo
Low value of y axis.
Definition: TWireProjPad.h:90
void Draw(const char *plot, const char *title)
Definition: gXSecComp.cxx:580
TH1F * fHisto
Histogram to draw object on.
Definition: TWireProjPad.h:85
void SetDrawOptions(DrawOptions_t const &opt)
Receive the full set of draw options.
Definition: TWireProjPad.h:46
static const char * zoom_opt
list x
Definition: train.py:276
std::vector< double > fCurrentZoom
Definition: TWireProjPad.h:80
double fYHi
High value of y axis.
Definition: TWireProjPad.h:91
evdb::View2D * fView
Collection of graphics objects to render.
Definition: TWireProjPad.h:86