LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TWireProjPad.h
Go to the documentation of this file.
1 
9 #ifndef EVD_TWIREPROJPAD_H
10 #define EVD_TWIREPROJPAD_H
12 #include <vector>
13 
14 class TH1F;
15 
16 namespace evdb {
17  class View2D;
18 }
19 
20 namespace util {
21  class PxLine;
22 }
23 
24 namespace evd {
25 
27  class TWireProjPad : public DrawingPad {
28  public:
29  struct DrawOptions_t {
30  bool bZoom2DdrawToRoI = false;
31  }; // DrawOptions_t
32 
33  TWireProjPad(const char* nm,
34  const char* ti,
35  double x1,
36  double y1,
37  double x2,
38  double y2,
39  unsigned int plane);
40  ~TWireProjPad();
41  void Draw(const char* opt = 0);
42  void GetWireRange(int* i1, int* i2) const;
43  void SetWireRange(int i1, int i2);
44 
45  void SetZoomRange(int i1, int i2, int y1, int y2);
46 
48  DrawOptions_t const& GetDrawOptions() const { return fDrawOpts; }
50  void SetDrawOptions(DrawOptions_t const& opt) { fDrawOpts = opt; }
51 
53  void SetZoomToRoI(bool bZoomToRoI) { fDrawOpts.bZoom2DdrawToRoI = bZoomToRoI; }
54 
56  void SetZoomFromView();
57 
58  void SaveHitList(double i1,
59  double i2,
60  double y1,
61  double y2,
62  double distance,
63  const char* zoom_opt,
64  bool good_plane = true);
65 
66  double SaveSeedList(std::vector<util::PxLine> seedlines, double distance);
67 
68  void ClearHitList();
69  void SelectOneHit(double x, double y, const char* zoom_opt);
70 
71  unsigned int GetPlane() const { return fPlane; }
72 
73  void ClearandUpdatePad();
74  void UpdatePad();
75  void DrawLinesinView(std::vector<util::PxLine> lines,
76  bool deleting = false,
77  const char* zoom_opt = 0);
78 
79  void ShowFull(int override = 0);
80 
81  evdb::View2D* View() const { return fView; }
82 
83  std::vector<double> const& GetCurrentZoom() const { return fCurrentZoom; }
84 
85  private:
86  /* void AutoZoom(); */
87 
88  private:
89  std::vector<double> fCurrentZoom;
91 
92  unsigned int fPlane;
93  TH1F* fHisto;
95 
96  double fXLo;
97  double fXHi;
98  double fYLo;
99  double fYHi;
100  int fOri;
101  };
102 }
103 
104 #endif
105 
Float_t x
Definition: compare.C:6
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:26
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
hist1 Draw("HIST")
unsigned int fPlane
Which plane in the detector.
Definition: TWireProjPad.h:92
Float_t y
Definition: compare.C:6
double fXLo
Low value of x axis.
Definition: TWireProjPad.h:96
unsigned int GetPlane() const
Definition: TWireProjPad.h:71
Manage all things related to colors for the event display.
DrawOptions_t fDrawOpts
set of current draw options
Definition: TWireProjPad.h:90
Float_t y2[n_points_geant4]
Definition: compare.C:26
std::vector< double > const & GetCurrentZoom() const
Definition: TWireProjPad.h:83
Base class for all event display drawing pads.
void SetZoomToRoI(bool bZoomToRoI)
Sets the draw option about zooming to the region of interest.
Definition: TWireProjPad.h:53
evdb::View2D * View() const
Definition: TWireProjPad.h:81
LArSoft includes.
A drawing pad for time vs wire.
Definition: TWireProjPad.h:27
int fOri
Orientation of the axes - see RawDrawingOptions for values.
Definition: TWireProjPad.h:100
double fXHi
High value of x axis.
Definition: TWireProjPad.h:97
DrawOptions_t const & GetDrawOptions() const
Return the current draw options.
Definition: TWireProjPad.h:48
Base class for event display drawing pads.
Definition: DrawingPad.h:27
double fYLo
Low value of y axis.
Definition: TWireProjPad.h:98
TH1F * fHisto
Histogram to draw object on.
Definition: TWireProjPad.h:93
void SetDrawOptions(DrawOptions_t const &opt)
Receive the full set of draw options.
Definition: TWireProjPad.h:50
static const char * zoom_opt
Float_t x2[n_points_geant4]
Definition: compare.C:26
std::vector< double > fCurrentZoom
Definition: TWireProjPad.h:89
double fYHi
High value of y axis.
Definition: TWireProjPad.h:99
evdb::View2D * fView
Collection of graphics objects to render.
Definition: TWireProjPad.h:94