1 |
pam-fi |
1.1 |
/** |
2 |
|
|
* \file TrkViewer.h |
3 |
|
|
* \author Elena Vannuccini |
4 |
|
|
*/ |
5 |
|
|
#ifndef trkviewer_h |
6 |
|
|
#define trkviewer_h |
7 |
|
|
|
8 |
|
|
#if !defined(__CINT__) || defined(__MAKECINT__) |
9 |
|
|
|
10 |
|
|
#include <TrkHough.h> |
11 |
|
|
#include <PamLevel2.h> |
12 |
|
|
|
13 |
|
|
/* #include <TrkLevel2.h> */ |
14 |
|
|
/* #include <TrkLevel1.h> */ |
15 |
|
|
|
16 |
|
|
#include <TObject.h> |
17 |
|
|
#include <TObjArray.h> |
18 |
|
|
#include <TBox.h> |
19 |
|
|
#include <TLine.h> |
20 |
|
|
#include <TPolyLine.h> |
21 |
|
|
#include <TPolyMarker.h> |
22 |
|
|
#include <TMarker.h> |
23 |
|
|
#include <TEllipse.h> |
24 |
|
|
#include <TColor.h> |
25 |
|
|
#include <TMultiGraph.h> |
26 |
|
|
#include <TGraph.h> |
27 |
|
|
|
28 |
|
|
#include <TROOT.h> |
29 |
|
|
#include <TVirtualX.h> |
30 |
|
|
#include <Buttons.h> |
31 |
|
|
#include <TVirtualPad.h> |
32 |
|
|
|
33 |
|
|
#include <TPad.h> |
34 |
|
|
#include <TCanvas.h> |
35 |
|
|
#include <TH1F.h> |
36 |
|
|
|
37 |
|
|
#include <iostream> |
38 |
|
|
using namespace std; |
39 |
|
|
#endif |
40 |
|
|
|
41 |
|
|
|
42 |
|
|
/* |
43 |
|
|
* Class to draw the tracker volume (2-D projections) |
44 |
|
|
*/ |
45 |
|
|
class GTrkVolume : public TObject{ |
46 |
|
|
|
47 |
|
|
private: |
48 |
|
|
|
49 |
|
|
TBox* cavity_l; |
50 |
|
|
TLine* plane_l[6]; |
51 |
|
|
|
52 |
|
|
TBox* cavity_r; |
53 |
|
|
TLine* plane_r[6]; |
54 |
|
|
|
55 |
|
|
TBox* cavity_c; |
56 |
|
|
|
57 |
|
|
TLine* column_l[2]; |
58 |
|
|
TLine* column_r[1]; |
59 |
|
|
TLine* column_c[3]; |
60 |
|
|
|
61 |
|
|
public: |
62 |
|
|
|
63 |
|
|
GTrkVolume(); |
64 |
|
|
void DrawProjectionX(); |
65 |
|
|
void DrawProjectionY(); |
66 |
|
|
void DrawProjectionT(); |
67 |
|
|
void Delete(); |
68 |
|
|
|
69 |
|
|
ClassDef(GTrkVolume,1); |
70 |
|
|
|
71 |
|
|
}; |
72 |
|
|
// |
73 |
|
|
/* |
74 |
|
|
* Class to draw the tracker signals |
75 |
|
|
*/ |
76 |
|
|
class GTrkLevel2 : public TObject{ |
77 |
|
|
|
78 |
|
|
private: |
79 |
|
|
|
80 |
|
|
TClonesArray *Track; ///< fitted tracks |
81 |
|
|
TClonesArray *SingletX; ///< x singlets |
82 |
|
|
TClonesArray *SingletY; ///< y singlets |
83 |
|
|
TClonesArray *Image; ///< fitted tracks (images) |
84 |
|
|
|
85 |
|
|
Bool_t DRAWIMAGE; |
86 |
|
|
|
87 |
|
|
public: |
88 |
|
|
|
89 |
|
|
GTrkLevel2(); |
90 |
|
|
GTrkLevel2(TrkLevel2*); |
91 |
|
|
GTrkLevel2(PamLevel2*); |
92 |
|
|
// Int_t Set(TrkLevel2*); |
93 |
|
|
|
94 |
|
|
void SetTracks(TrkLevel2*); |
95 |
|
|
void SetTracks(PamLevel2*); |
96 |
|
|
void SetSinglets(TrkLevel2*); |
97 |
|
|
|
98 |
|
|
|
99 |
|
|
void SetDrawImage(Bool_t doit){ DRAWIMAGE=doit; }; |
100 |
|
|
|
101 |
|
|
void DrawProjectionX(); |
102 |
|
|
void DrawProjectionY(); |
103 |
|
|
void DrawProjectionT(); |
104 |
|
|
|
105 |
|
|
void Delete(); |
106 |
|
|
void Clear(); |
107 |
|
|
|
108 |
|
|
ClassDef(GTrkLevel2,1); |
109 |
|
|
|
110 |
|
|
}; |
111 |
|
|
// |
112 |
|
|
/* |
113 |
|
|
* Class to draw the tracker clusters |
114 |
|
|
*/ |
115 |
|
|
class GTrkCluster : public TObject{ |
116 |
|
|
|
117 |
|
|
private: |
118 |
|
|
TH1F *sgnl; |
119 |
|
|
TH1F *cut; |
120 |
|
|
TH1F *seed; |
121 |
|
|
TH1F *sat; |
122 |
|
|
|
123 |
|
|
TLine *maxs; |
124 |
|
|
TLine *zero; |
125 |
|
|
|
126 |
|
|
public: |
127 |
|
|
GTrkCluster(); |
128 |
|
|
~GTrkCluster(); |
129 |
|
|
GTrkCluster(GTrkCluster*); |
130 |
|
|
GTrkCluster(TrkCluster*); |
131 |
|
|
void Draw(); |
132 |
|
|
void Delete(); |
133 |
|
|
|
134 |
|
|
ClassDef(GTrkCluster,1); |
135 |
|
|
}; |
136 |
|
|
class GTrkHit : public TObject{ |
137 |
|
|
|
138 |
|
|
private: |
139 |
|
|
|
140 |
|
|
GTrkCluster *cl; |
141 |
|
|
TMarker *m1; |
142 |
|
|
TEllipse *m2; |
143 |
|
|
|
144 |
|
|
public: |
145 |
|
|
GTrkHit(); |
146 |
|
|
GTrkHit(Float_t,Float_t,Float_t); |
147 |
|
|
GTrkHit(GTrkHit*); |
148 |
|
|
void SetColor(Int_t col){m1->SetMarkerColor(col);}; |
149 |
|
|
void SetSize(Float_t size){m1->SetMarkerSize(size);}; |
150 |
|
|
void Delete(); |
151 |
|
|
void Draw(); |
152 |
|
|
void SetCluster(TrkCluster* pt){cl = new GTrkCluster(pt);}; |
153 |
|
|
void ExecuteEvent(Int_t,Int_t,Int_t,TObject*); |
154 |
|
|
|
155 |
|
|
~GTrkHit() {Delete();}; |
156 |
|
|
|
157 |
|
|
ClassDef(GTrkHit,1); |
158 |
|
|
}; |
159 |
|
|
|
160 |
|
|
// |
161 |
|
|
/* |
162 |
|
|
* Class to draw the tracker fitted tracks |
163 |
|
|
*/ |
164 |
|
|
class GTrkTrack : public TObject{ |
165 |
|
|
|
166 |
|
|
private: |
167 |
|
|
TPolyLine *tr_l; |
168 |
|
|
TPolyLine *tr_r; |
169 |
|
|
TPolyLine *tr_c; |
170 |
|
|
|
171 |
|
|
TMarker *mt_l[6]; |
172 |
|
|
TMarker *mt_r[6]; |
173 |
|
|
TMarker *mt_c[6]; |
174 |
|
|
|
175 |
|
|
public: |
176 |
|
|
GTrkTrack(); |
177 |
|
|
~GTrkTrack(); |
178 |
|
|
GTrkTrack(TrkTrack*); |
179 |
|
|
GTrkTrack(GTrkTrack*); |
180 |
|
|
|
181 |
|
|
TPolyLine *GetProjectionX(){ return tr_l; }; |
182 |
|
|
TPolyLine *GetProjectionY(){ return tr_r; }; |
183 |
|
|
TPolyLine *GetProjectionT(){ return tr_c; }; |
184 |
|
|
TMarker *GetProjectionX_Points(int ip){ return mt_l[ip]; }; |
185 |
|
|
TMarker *GetProjectionY_Points(int ip){ return mt_r[ip]; }; |
186 |
|
|
TMarker *GetProjectionT_Points(int ip){ return mt_c[ip]; }; |
187 |
|
|
|
188 |
|
|
void DrawProjectionX(); |
189 |
|
|
void DrawProjectionY(); |
190 |
|
|
void DrawProjectionT(); |
191 |
|
|
|
192 |
|
|
void Delete(); |
193 |
|
|
void Clear(); |
194 |
|
|
|
195 |
|
|
ClassDef(GTrkTrack,1); |
196 |
|
|
}; |
197 |
|
|
|
198 |
|
|
|
199 |
|
|
/* |
200 |
|
|
* Class to draw hough transform |
201 |
|
|
*/ |
202 |
|
|
class GTrkHough : public TObject{ |
203 |
|
|
|
204 |
|
|
private: |
205 |
|
|
|
206 |
|
|
TMultiGraph *trip; |
207 |
|
|
TMultiGraph *doub; |
208 |
|
|
|
209 |
|
|
TGraph *gtrip[100]; |
210 |
|
|
TGraph *gdoub[100]; |
211 |
|
|
|
212 |
|
|
TClonesArray *TrackCandidates; ///< track candidates |
213 |
|
|
|
214 |
|
|
public: |
215 |
|
|
|
216 |
|
|
GTrkHough(); |
217 |
|
|
|
218 |
|
|
GTrkHough(TrkHough*); |
219 |
|
|
|
220 |
|
|
void Delete(); |
221 |
|
|
void Clear(); |
222 |
|
|
|
223 |
|
|
~GTrkHough(); |
224 |
|
|
|
225 |
|
|
void SetCandidates(TrkHough*); |
226 |
|
|
void SetHough(TrkHough*); |
227 |
|
|
|
228 |
|
|
TMultiGraph *GetProjectionX_Hough(){return trip;}; |
229 |
|
|
TMultiGraph *GetProjectionY_Hough(){return doub;}; |
230 |
|
|
|
231 |
|
|
void DrawProjectionX(); |
232 |
|
|
void DrawProjectionY(); |
233 |
|
|
void DrawProjectionT(); |
234 |
|
|
|
235 |
|
|
ClassDef(GTrkHough,1); |
236 |
|
|
|
237 |
|
|
}; |
238 |
|
|
|
239 |
|
|
|
240 |
|
|
#endif |
241 |
|
|
|
242 |
|
|
|