8 |
#include <TObject.h> |
#include <TObject.h> |
9 |
#include <TObjArray.h> |
#include <TObjArray.h> |
10 |
#include <TClonesArray.h> |
#include <TClonesArray.h> |
11 |
|
#include <TRefArray.h> |
12 |
|
#include <TRef.h> |
13 |
|
|
14 |
#include <TrkStruct.h> |
//#include <TrkStruct.h> |
15 |
|
#include <TrkParams.h> |
16 |
|
#include <TrkLevel1.h> |
17 |
|
|
18 |
// z-coordinate of track state-vector reference-plane |
// z-coordinate of track state-vector reference-plane |
19 |
#define ZINI 23.5 |
#define ZINI 23.5 |
56 |
Trajectory(); |
Trajectory(); |
57 |
Trajectory(int n); |
Trajectory(int n); |
58 |
Trajectory(int n, float* pz); |
Trajectory(int n, float* pz); |
59 |
|
~Trajectory(){Delete();}; |
60 |
void Dump(); |
void Dump(); |
61 |
|
void Delete(); |
62 |
|
|
63 |
|
int DoTrack2(float* al); |
64 |
float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;}; |
float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;}; |
65 |
float GetLength(int,int); |
float GetLength(int,int); |
66 |
|
|
67 |
ClassDef(Trajectory,1); |
ClassDef(Trajectory,2); |
68 |
|
|
69 |
}; |
}; |
70 |
/** |
/** |
82 |
int seqno; ///<stored track sequential number |
int seqno; ///<stored track sequential number |
83 |
int image; ///<sequential number of track-image |
int image; ///<sequential number of track-image |
84 |
|
|
85 |
|
|
86 |
public: |
public: |
87 |
|
|
88 |
|
TRefArray *clx; |
89 |
|
TRefArray *cly; |
90 |
|
|
91 |
float al[5]; ///<TRACK STATE VECTOR |
float al[5]; ///<TRACK STATE VECTOR |
92 |
float coval[5][5]; ///<covariance matrix |
float coval[5][5]; ///<covariance matrix |
98 |
float resx[6]; ///<spatial resolution on X view |
float resx[6]; ///<spatial resolution on X view |
99 |
float resy[6]; ///<spatial resolution on y view |
float resy[6]; ///<spatial resolution on y view |
100 |
float chi2; ///<chi2 |
float chi2; ///<chi2 |
101 |
|
int nstep; ///<n. step |
102 |
float xv[6]; ///<calculated x coordinates |
float xv[6]; ///<calculated x coordinates |
103 |
float yv[6]; ///<calculated y coordinates |
float yv[6]; ///<calculated y coordinates |
104 |
float zv[6]; ///<calculated z coordinates |
float zv[6]; ///<calculated z coordinates |
107 |
float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer) |
108 |
float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer) |
109 |
|
|
|
|
|
110 |
TrkTrack(); |
TrkTrack(); |
111 |
TrkTrack(const TrkTrack&); |
TrkTrack(const TrkTrack&); |
112 |
|
|
113 |
|
~TrkTrack(){ Delete(); }; |
114 |
|
|
115 |
void Dump(); |
void Dump(); |
116 |
|
void Clear(); |
117 |
|
void Clear(Option_t *option){Clear();}; |
118 |
|
void Delete(); |
119 |
|
void Copy(TrkTrack&); |
120 |
|
// void Set(); |
121 |
|
|
122 |
Int_t GetSeqNo(){return seqno;} ///< Returns the track sequential number |
Int_t GetSeqNo(){return seqno;} ///< Returns the track sequential number |
123 |
Int_t GetImageSeqNo(){return image;} ///< Returns the track image sequential number |
Int_t GetImageSeqNo(){return image;} ///< Returns the track image sequential number |
131 |
Float_t GetRigidity(); |
Float_t GetRigidity(); |
132 |
Float_t GetDeflection(); |
Float_t GetDeflection(); |
133 |
Float_t GetDEDX(); |
Float_t GetDEDX(); |
134 |
|
Float_t GetDEDX(Int_t ip){if( !(xgood[ip]+ygood[ip]) ) return 0; return (dedx_x[ip]+dedx_y[ip])/(xgood[ip]+ygood[ip]);}; |
135 |
|
// sono un'imbecille... assegno xm e ym anche quando si tratta di un singolo |
136 |
|
// non posso quindi usare xm e ym per dire se una vista e` inclusa nel fit o no |
137 |
|
/* Bool_t XGood(int ip){ return xm[ip] != -100.;}; |
138 |
|
Bool_t YGood(int ip){ return ym[ip] != -100.;};*/ |
139 |
|
Bool_t XGood(int ip){ return xgood[ip]==1;}; |
140 |
|
Bool_t YGood(int ip){ return ygood[ip]==1;}; |
141 |
|
|
142 |
|
void SetMeasure(double *xmeas, double *ymeas, double *zmeas); |
143 |
|
void SetResolution(double *rx, double *ry); |
144 |
|
void SetGood(int *xg, int *yg); |
145 |
|
void LoadField(TString s); |
146 |
|
void Fit(double pfixed, int& fail, int iprint); |
147 |
|
void FitReset(); |
148 |
|
void SetTrackingMode(int trackmode); |
149 |
|
|
150 |
|
void FillMiniStruct(cMini2track&); |
151 |
|
void SetFromMiniStruct(cMini2track*); |
152 |
|
|
153 |
|
TrkCluster *GetClusterX(int ip){TrkCluster *pt = (TrkCluster*)(clx->At(ip)); return pt;}; |
154 |
|
TrkCluster *GetClusterY(int ip){TrkCluster *pt = (TrkCluster*)(cly->At(ip)); return pt;}; |
155 |
|
|
156 |
TrkTrack* GetTrkTrack(){return this;}; |
TrkTrack* GetTrkTrack(){return this;}; |
157 |
|
|
158 |
friend class TrkLevel2; |
friend class TrkLevel2; |
159 |
|
|
160 |
ClassDef(TrkTrack,1); |
ClassDef(TrkTrack,2); |
161 |
|
|
162 |
}; |
}; |
163 |
/** |
/** |
168 |
class TrkSinglet : public TObject { |
class TrkSinglet : public TObject { |
169 |
|
|
170 |
private: |
private: |
171 |
|
|
172 |
|
|
173 |
public: |
public: |
174 |
|
|
175 |
|
TRef cls; |
176 |
|
|
177 |
int plane; ///<plane |
int plane; ///<plane |
178 |
float coord[2]; ///<coordinate (on sensor 1 and 2) |
float coord[2]; ///<coordinate (on sensor 1 and 2) |
180 |
|
|
181 |
TrkSinglet(); |
TrkSinglet(); |
182 |
TrkSinglet(const TrkSinglet&); |
TrkSinglet(const TrkSinglet&); |
183 |
|
~TrkSinglet(){Delete();}; |
184 |
|
|
185 |
void Dump(); |
void Dump(); |
186 |
|
void Clear(); |
187 |
|
void Clear(Option_t *option){Clear();}; |
188 |
|
void Delete(){Clear();}; |
189 |
|
|
190 |
|
TrkCluster *GetCluster(){TrkCluster *pt = (TrkCluster*)cls.GetObject(); return pt;}; |
191 |
|
|
192 |
friend class TrkLevel2; |
friend class TrkLevel2; |
193 |
|
|
194 |
ClassDef(TrkSinglet,1); |
ClassDef(TrkSinglet,2); |
195 |
|
|
196 |
}; |
}; |
197 |
|
|
209 |
class TrkLevel2 : public TObject { |
class TrkLevel2 : public TObject { |
210 |
|
|
211 |
private: |
private: |
212 |
|
|
|
// TRefArray *PhysicalTrack; ///< physical tracks (no image) - |
|
|
|
|
213 |
public: |
public: |
214 |
|
|
215 |
Int_t good2; |
Int_t good[12]; ///< event status |
|
Int_t crc[12]; |
|
216 |
|
|
217 |
TClonesArray *Track; ///< fitted tracks |
TClonesArray *Track; ///< fitted tracks |
218 |
TClonesArray *SingletX; ///< x singlets |
TClonesArray *SingletX; ///< x singlets |
220 |
|
|
221 |
TrkLevel2(); |
TrkLevel2(); |
222 |
// TrkLevel2(cTrkLevel2 *); |
// TrkLevel2(cTrkLevel2 *); |
223 |
|
~TrkLevel2(){Delete();}; |
224 |
|
|
225 |
|
void Clear(); |
226 |
|
void Clear(Option_t *option){Clear();}; |
227 |
|
void Delete(); |
228 |
|
void Set(); |
229 |
|
|
230 |
int ntrk() {return Track->GetEntries();} ///< number of stored track |
int ntrk() {return Track->GetEntries();} ///< number of stored track |
231 |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
232 |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
233 |
|
|
234 |
void Dump(); |
void Dump(); |
235 |
void FillCommonVar(cTrkLevel2 *); |
void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *); |
236 |
void Clear(); |
void SetFromLevel2Struct(cTrkLevel2 *s2){ SetFromLevel2Struct(s2, NULL); }; |
237 |
|
void SetFromLevel2Struct(TrkLevel1 *l1) { SetFromLevel2Struct(&level2event_, l1); }; |
238 |
|
void SetFromLevel2Struct() { SetFromLevel2Struct(&level2event_); }; |
239 |
|
void GetLevel2Struct(cTrkLevel2 *) const; |
240 |
void LoadField(TString); |
void LoadField(TString); |
241 |
Float_t GetZTrk(Int_t); |
float GetBX(float*); |
242 |
Float_t GetXTrkLeft(){return XTRKL;}; |
float GetBY(float*); |
243 |
Float_t GetXTrkRight(){return XTRKR;}; |
float GetBZ(float*); |
244 |
Float_t GetYTrkLeft(){return YTRKL;}; |
Float_t GetZTrk(Int_t); |
245 |
Float_t GetYTrkRight(){return YTRKR;}; |
Float_t GetXTrkLeft(){return XTRKL;}; |
246 |
|
Float_t GetXTrkRight(){return XTRKR;}; |
247 |
TrkSinglet *GetSingletX(int); |
Float_t GetYTrkLeft(){return YTRKL;}; |
248 |
TrkSinglet *GetSingletY(int); |
Float_t GetYTrkRight(){return YTRKR;}; |
249 |
|
|
250 |
TrkTrack *GetStoredTrack(int i); |
TrkSinglet *GetSingletX(int); |
251 |
|
TrkSinglet *GetSingletY(int); |
252 |
|
|
253 |
|
TrkTrack *GetStoredTrack(int i); |
254 |
Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number |
Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number |
255 |
// TClonesArray *GetTracks_Chi2Sorted(); |
// TClonesArray *GetTracks_Chi2Sorted(); |
256 |
TClonesArray *GetTracks_NFitSorted(); |
// TClonesArray *GetTracks_NFitSorted(); |
257 |
TClonesArray *GetTracks(); |
// TClonesArray *GetTracks(); |
258 |
|
TRefArray *GetTracks_NFitSorted(); |
259 |
|
TRefArray *GetTracks(){return this->GetTracks_NFitSorted();}; |
260 |
|
|
261 |
// int GetNTracks(){return this->GetTracks()->GetEntries();} |
// int GetNTracks(){return this->GetTracks()->GetEntries();} |
262 |
Int_t GetNTracks(); |
Int_t GetNTracks(); |
263 |
TrkTrack* GetTrack(int i); |
TrkTrack* GetTrack(int i); |
264 |
TrkTrack* GetTrackImage(int i); |
TrkTrack* GetTrackImage(int i); |
265 |
|
|
266 |
TrkLevel2* GetTrkLevel2(){return this;} |
TrkLevel2* GetTrkLevel2(){return this;} |
267 |
TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array |
TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array |
268 |
|
|
269 |
ClassDef(TrkLevel2,1); |
ClassDef(TrkLevel2,2); |
270 |
|
|
271 |
}; |
}; |
272 |
|
|
|
|
|
|
|
|
273 |
#endif |
#endif |