LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 "lardata/Utilities/PxUtils.h" // util::PxPoint, util::PxLine
14 namespace detinfo {
15  class DetectorClocksData;
16  class DetectorPropertiesData;
17 }
18 
19 #include "RQ_OBJECT.h"
20 
21 #include <deque>
22 #include <map>
23 #include <vector>
24 
25 // Forward declarations
26 class TGCheckButton;
27 class TGCompositeFrame;
28 class TGLabel;
29 class TGMainFrame;
30 class TGNumberEntry;
31 class TGRadioButton;
32 class TGTextButton;
33 class TGTextView;
34 
35 namespace evd {
36 
37  class HeaderPad;
38  class MCBriefPad;
39  class TQPad;
40  class TWireProjPad;
41 
42  // Helper class, to store zoom settings in each view
43 
45 
46  public:
47  ZoomOptionsMultiTPC() { OnlyPlaneChanged = -1; }
49  std::map<int, double> wmin;
50  std::map<int, double> wmax;
51  std::map<int, double> tmin;
52  std::map<int, double> tmax;
54  };
55 
57 
58  public:
59  RQ_OBJECT("evd::TWQMultiTPCProjectionView")
60 
61  public:
62  TWQMultiTPCProjectionView(TGMainFrame* mf);
64 
65  const char* Description() const { return "Time/Wire/Charge Projections"; }
66  const char* PrintTag() const { return "twq-multiTPC-proj"; }
67 
68  void Draw(const char* opt = "");
69 
70  // void RangeChanged();
71  static void MouseDispatch(int plane, void* wqpv);
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(detinfo::DetectorClocksData const& clockData,
102  detinfo::DetectorPropertiesData const& detProp);
103  void ClearEndPoints();
104  void ToggleEndPointMarkers();
105 
106  void RadioButtonsDispatch(int parameter);
107 
108  private:
112  std::vector<TQPad*> fPlaneQ;
113  std::vector<TWireProjPad*> fPlanes;
114 
115  TGCompositeFrame* fVFrame;
116  TGCompositeFrame* fMetaFrame;
117 
118  TGLabel* fWireLabel;
119  TGLabel* fDistanceLabel;
120  TGLabel* fPlaneLabel;
121  TGLabel* fThresLabel;
122  TGLabel* fGreyLabel;
123 
124  TGNumberEntry* fWireEntry;
125  TGNumberEntry* fPlaneEntry;
126  TGNumberEntry* fThresEntry;
127  TGNumberEntry* fDistance;
128  TGCheckButton* fGreyScale;
129  TGCheckButton* fMCOn;
130  TGRadioButton* fRawDraw;
131  TGRadioButton* fCalibDraw;
132  TGRadioButton* fRawCalibDraw;
133 
134  TGTextButton* fZoomInterest;
135  TGTextButton* fUnZoomInterest;
136  TGTextButton* fZoomBack;
137  TGCheckButton* fToggleAutoZoom;
138  TGRadioButton* fToggleZoom;
139  TGTextView* fAngleInfo;
140 
141  TGTextButton* fFindEndpoint;
142  TGTextButton* fClearPPoints;
143  TGCheckButton* fToggleShowMarkers;
144  TGTextView* fXYZPosition;
145 
146  TGTextButton* fCalcAngle;
147  TGTextButton* fClear;
148 
149  int DrawLine(int plane, util::PxLine& pline);
150 
151  std::deque<util::PxPoint>
153  std::deque<util::PxLine>
155 
157  std::vector<ZoomOptionsMultiTPC> fPrevZoomOpt;
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
hist1 Draw("HIST")
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.
TGTextView * fXYZPosition
Display the xyz position.
TGRadioButton * fRawDraw
Draw Raw information only.
TGTextButton * fClear
Clears the selected points in an event.
General LArSoft Utilities.
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.
Contains all timing reference information for the detector.
TGRadioButton * fToggleZoom
Use zoom setting.
std::vector< TQPad * > fPlaneQ
charge on each plane
TGCheckButton * fGreyScale
Display gray or color scale.
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.