LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TWQMultiTPCProjection.h
Go to the documentation of this file.
1 // clustering code written by ellen.klein@yale.edu
8 
9 #ifndef EVD_TWQMULTITPCPROJECTION_H
10 #define EVD_TWQMULTITPCPROJECTION_H
11 
12 #include "TGButton.h" // For TGCheckButton
13 
14 #include "lardata/Utilities/PxUtils.h" // util::PxPoint, util::PxLine
16 
17 #include "RQ_OBJECT.h"
18 
19 #include <vector>
20 #include <deque>
21 
22 // Forward declarations
23 class TGNumberEntry;
24 class TGTextView;
25 class TGLabel;
26 class TRootEmbeddedCanvas;
27 
28 
29 namespace evd {
30 
31  class MCBriefPad;
32  class TQPad;
33  class TWireProjPad;
34  class HeaderPad;
35 
36 
37  // Helper class, to store zoom settings in each view
38 
40  {
41 
42  public:
45  std::map<int, double> wmin;
46  std::map<int, double> wmax;
47  std::map<int, double> tmin;
48  std::map<int, double> tmax;
50  };
51 
52 
53 
55 
56  public:
57 
58  RQ_OBJECT("evd::TWQMultiTPCProjectionView")
59 
60  public:
61  TWQMultiTPCProjectionView(TGMainFrame* mf);
63 
64  const char* Description() const { return "Time/Wire/Charge Projections"; }
65  const char* PrintTag() const { return "twq-multiTPC-proj"; }
66 
67  void Draw(const char* opt="");
68 
69  // void RangeChanged();
70  static void MouseDispatch(int plane, void * wqpv);
71 
72 
73  void ChangeWire(int plane);
74 
75  void SetMouseZoomRegion(int plane);
76 
77  void SelectPoint(int plane);
78  // TWQMultiTPCProjectionView::SelectHit() is undefined
79  //void SelectHit(int plane);
80  void SetPlaneWire();
81  void SetPlane();
82  void SetWire();
83  void SetDistance();
84  void SetThreshold();
85  void SetGreyscale();
86  void SetMCInfo();
87  void SetRawCalib();
88  void SetUpSideBar();
89  void SetUpZoomButtons();
90  void SetUpPositionFind();
91  void SetZoom(int plane,int wirelow,int wirehi,int timelo,int timehi, bool StoreZoom=true);
92  void ZoomInterest(bool flag=true);
93 
94  void ZoomBack(); // Revert to the previous zoom setting
95 
96  void SetZoomInterest();
97  void PrintCharge();
98  void DrawPads(const char* opt="");
99 
100  void FindEndPoint();
101  double FindLineLength();
102  void ClearEndPoints();
103  void ToggleEndPointMarkers();
104 
105  void RadioButtonsDispatch(int parameter);
106 
107  private:
108 
112  std::vector<TQPad* > fPlaneQ;
113  std::vector<TWireProjPad*> fPlanes;
114 
115 
116  TGCompositeFrame* fVFrame;
117  TGCompositeFrame* fMetaFrame;
118 
119  TGLabel* fWireLabel;
120  TGLabel* fDistanceLabel;
121  TGLabel* fPlaneLabel;
122  TGLabel* fThresLabel;
123  TGLabel* fGreyLabel;
124 
125  TGNumberEntry* fWireEntry;
126  TGNumberEntry* fPlaneEntry;
127  TGNumberEntry* fThresEntry;
128  TGNumberEntry* fDistance;
129  TGCheckButton* fGreyScale;
130  TGCheckButton* fMCOn;
131  TGRadioButton* fRawDraw;
132  TGRadioButton* fCalibDraw;
133  TGRadioButton* fRawCalibDraw;
134 
135  TGTextButton* fZoomInterest;
136  TGTextButton* fUnZoomInterest;
137  TGTextButton* fZoomBack;
138  TGCheckButton* fToggleAutoZoom;
139  TGRadioButton* fToggleZoom;
140  TGTextView* fAngleInfo;
141 
142  TGTextButton* fFindEndpoint;
143  TGTextButton* fClearPPoints;
144  TGCheckButton* fToggleShowMarkers;
145  TGTextView* fXYZPosition;
146 
147  TGTextButton* fCalcAngle;
148  TGTextButton* fClear;
149 
150  int DrawLine(int plane,util::PxLine &pline);
151 
152  std::deque<util::PxPoint> ppoints;
153  std::deque<util::PxLine> pline;
154 
156  std::vector<ZoomOptionsMultiTPC> fPrevZoomOpt;
157 
158  };
159 
160 }// namespace
161 
162 #endif //EVD_TWQPROJECTION_H
TGRadioButton * fCalibDraw
Draw calibrated information only.
TQPad * fWireQ
Histogram of charge vs time on selected wire.
TGCompositeFrame * fVFrame
needed for the side frame
TGNumberEntry * fThresEntry
ADC threshold to display.
std::map< int, double > tmin
TGTextButton * fUnZoomInterest
Unzoom on iteresting region.
TGRadioButton * fRawCalibDraw
Draw raw and calibrated information.
std::vector< TWireProjPad * > fPlanes
time vs wire projection for each plane
MCBriefPad * fMC
Short summary of MC event.
Base class for define a detector display.
TGNumberEntry * fPlaneEntry
Plane number displayed.
HeaderPad * fHeaderPad
Show header information.
std::deque< util::PxPoint > ppoints
list of points in each WireProjPad used for x,y,z finding
TGTextButton * fFindEndpoint
Calculate XYZ position of two points in wire planes.
TGCheckButton * fMCOn
Display MC truth information.
TGTextButton * fZoomBack
Unzoom on iteresting region.
LArSoft includes.
TGCheckButton * fToggleAutoZoom
Toggle the autozoom setting.
TGTextButton * fClearPPoints
Clear current list of End Points.
std::vector< TQPad * > fPlaneQ
charge on each plane
TGTextView * fXYZPosition
Display the xyz position.
TGRadioButton * fRawDraw
Draw Raw information only.
TGTextButton * fClear
Clears the selected points in an event.
TGCompositeFrame * fMetaFrame
needed for the side frame
TGTextButton * fCalcAngle
Calculate the 2D & 3D angles between lines.
std::map< int, double > wmax
TGTextButton * fZoomInterest
Zoom on iteresting region.
TGRadioButton * fToggleZoom
Use zoom setting.
TGCheckButton * fGreyScale
Display gray or color scale.
hist1 Draw("HIST")
std::vector< ZoomOptionsMultiTPC > fPrevZoomOpt
std::deque< util::PxLine > pline
list of lines in each WireProjPad used for calculating 2d and 3d angles
std::map< int, double > wmin
TGNumberEntry * fWireEntry
Wire number displayed.
std::map< int, double > tmax
TGNumberEntry * fDistance
Distance from line to find hits in cluster.
TGCheckButton * fToggleShowMarkers
Toggle the ShowEndPointMarkersSetting.