11 |
#include <TRefArray.h> |
#include <TRefArray.h> |
12 |
#include <TRef.h> |
#include <TRef.h> |
13 |
|
|
14 |
#include <TrkStruct.h> |
//#include <TrkStruct.h> |
15 |
|
#include <TrkParams.h> |
16 |
#include <TrkLevel1.h> |
#include <TrkLevel1.h> |
17 |
|
|
18 |
// z-coordinate of track state-vector reference-plane |
// z-coordinate of track state-vector reference-plane |
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); |
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;}; |
85 |
|
|
86 |
public: |
public: |
87 |
|
|
|
// TRef clx[6]; |
|
|
// TRef cly[6]; |
|
88 |
TRefArray *clx; |
TRefArray *clx; |
89 |
TRefArray *cly; |
TRefArray *cly; |
90 |
|
|
91 |
|
/* float al[5]; ///<TRACK STATE VECTOR */ |
92 |
float al[5]; ///<TRACK STATE VECTOR |
float al[5]; ///<TRACK STATE VECTOR |
93 |
float coval[5][5]; ///<covariance matrix |
float coval[5][5]; ///<covariance matrix |
94 |
int xgood[6]; ///<mask of included x planes |
int xgood[6]; ///<mask of included x planes |
105 |
float zv[6]; ///<calculated z coordinates |
float zv[6]; ///<calculated z coordinates |
106 |
float axv[6]; ///<calculated angles (deg) on x view |
float axv[6]; ///<calculated angles (deg) on x view |
107 |
float ayv[6]; ///<calculated angles (deg) on y view |
float ayv[6]; ///<calculated angles (deg) on y view |
108 |
float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_x[6]; ///<dE/dx in MIP |
109 |
float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_y[6]; ///<dE/dx in MIP |
|
|
|
110 |
|
|
111 |
TrkTrack(); |
TrkTrack(); |
112 |
TrkTrack(const TrkTrack&); |
TrkTrack(const TrkTrack&); |
113 |
|
|
114 |
~TrkTrack(){Delete();}; |
~TrkTrack(){ Delete(); }; |
115 |
|
|
116 |
void Dump(); |
void Dump(); |
117 |
void Clear(); |
void Clear(); |
118 |
|
void Clear(Option_t *option){Clear();}; |
119 |
void Delete(); |
void Delete(); |
120 |
|
void Copy(TrkTrack&); |
121 |
|
// void Set(); |
122 |
|
|
123 |
Int_t GetSeqNo(){return seqno;} ///< Returns the track sequential number |
Int_t GetSeqNo(){return seqno;} ///< Returns the track sequential number |
124 |
Int_t GetImageSeqNo(){return image;} ///< Returns the track image sequential number |
Int_t GetImageSeqNo(){return image;} ///< Returns the track image sequential number |
125 |
Bool_t HasImage(){return !(image==-1);} ///< Returns true if the track has an image |
Bool_t HasImage(){return !(image==-1);} ///< Returns true if the track has an image |
137 |
// non posso quindi usare xm e ym per dire se una vista e` inclusa nel fit o no |
// non posso quindi usare xm e ym per dire se una vista e` inclusa nel fit o no |
138 |
/* Bool_t XGood(int ip){ return xm[ip] != -100.;}; |
/* Bool_t XGood(int ip){ return xm[ip] != -100.;}; |
139 |
Bool_t YGood(int ip){ return ym[ip] != -100.;};*/ |
Bool_t YGood(int ip){ return ym[ip] != -100.;};*/ |
140 |
Bool_t XGood(int ip){ return xgood[ip]==1;}; |
Bool_t XGood(int ip){ return xgood[ip]> 0;}; |
141 |
Bool_t YGood(int ip){ return ygood[ip]==1;}; |
Bool_t YGood(int ip){ return ygood[ip]> 0;}; |
142 |
|
|
143 |
|
|
144 |
void SetMeasure(double *xmeas, double *ymeas, double *zmeas); |
void SetMeasure(double *xmeas, double *ymeas, double *zmeas); |
145 |
void SetResolution(double *rx, double *ry); |
void SetResolution(double *rx, double *ry); |
147 |
void LoadField(TString s); |
void LoadField(TString s); |
148 |
void Fit(double pfixed, int& fail, int iprint); |
void Fit(double pfixed, int& fail, int iprint); |
149 |
void FitReset(); |
void FitReset(); |
150 |
|
void SetTrackingMode(int trackmode); |
151 |
|
void SetPrecisionFactor(double fact); |
152 |
|
void SetStepMin(int istepmin); |
153 |
|
|
154 |
|
void FillMiniStruct(cMini2track&); |
155 |
|
void SetFromMiniStruct(cMini2track*); |
156 |
|
|
157 |
TrkCluster *GetClusterX(int ip){TrkCluster *pt = (TrkCluster*)(clx->At(ip)); return pt;}; |
TrkCluster *GetClusterX(int ip); |
158 |
TrkCluster *GetClusterY(int ip){TrkCluster *pt = (TrkCluster*)(cly->At(ip)); return pt;}; |
TrkCluster *GetClusterY(int ip); |
159 |
|
|
160 |
|
Int_t GetClusterX_ID(int ip){return xgood[ip];}; |
161 |
|
Int_t GetClusterY_ID(int ip){return ygood[ip];}; |
162 |
|
|
163 |
TrkTrack* GetTrkTrack(){return this;}; |
TrkTrack* GetTrkTrack(){return this;}; |
164 |
|
|
179 |
|
|
180 |
public: |
public: |
181 |
|
|
182 |
TRef cls; |
TRef cls; |
183 |
|
|
184 |
int plane; ///<plane |
int plane; ///<plane |
185 |
float coord[2]; ///<coordinate (on sensor 1 and 2) |
float coord[2]; ///<coordinate (on sensor 1 and 2) |
187 |
|
|
188 |
TrkSinglet(); |
TrkSinglet(); |
189 |
TrkSinglet(const TrkSinglet&); |
TrkSinglet(const TrkSinglet&); |
190 |
|
~TrkSinglet(){Delete();}; |
191 |
|
|
192 |
void Dump(); |
void Dump(); |
193 |
|
void Clear(); |
194 |
|
void Clear(Option_t *option){Clear();}; |
195 |
|
void Delete(){Clear();}; |
196 |
|
|
197 |
TrkCluster *GetCluster(){TrkCluster *pt = (TrkCluster*)cls.GetObject(); return pt;}; |
TrkCluster *GetCluster(){TrkCluster *pt = (TrkCluster*)cls.GetObject(); return pt;}; |
198 |
|
|
216 |
class TrkLevel2 : public TObject { |
class TrkLevel2 : public TObject { |
217 |
|
|
218 |
private: |
private: |
219 |
|
|
|
// TRefArray *PhysicalTrack; ///< physical tracks (no image) - |
|
|
|
|
220 |
public: |
public: |
221 |
|
|
222 |
Int_t good[12]; ///< event status |
Int_t good[12]; ///< event status |
|
// Int_t good2; |
|
|
// Int_t crc[12]; |
|
223 |
|
|
224 |
TClonesArray *Track; ///< fitted tracks |
TClonesArray *Track; ///< fitted tracks |
225 |
TClonesArray *SingletX; ///< x singlets |
TClonesArray *SingletX; ///< x singlets |
230 |
~TrkLevel2(){Delete();}; |
~TrkLevel2(){Delete();}; |
231 |
|
|
232 |
void Clear(); |
void Clear(); |
233 |
|
void Clear(Option_t *option){Clear();}; |
234 |
void Delete(); |
void Delete(); |
235 |
|
void Set(); |
236 |
|
|
237 |
int ntrk() {return Track->GetEntries();} ///< number of stored track |
int ntrk() {return Track->GetEntries();} ///< number of stored track |
238 |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
239 |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
240 |
|
|
241 |
void Dump(); |
void Dump(); |
|
void SetFromLevel2Struct(cTrkLevel2 *); |
|
242 |
void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *); |
void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *); |
243 |
|
void SetFromLevel2Struct(cTrkLevel2 *s2){ SetFromLevel2Struct(s2, NULL); }; |
244 |
|
void SetFromLevel2Struct(TrkLevel1 *l1) { SetFromLevel2Struct(&level2event_, l1); }; |
245 |
|
void SetFromLevel2Struct() { SetFromLevel2Struct(&level2event_); }; |
246 |
void GetLevel2Struct(cTrkLevel2 *) const; |
void GetLevel2Struct(cTrkLevel2 *) const; |
247 |
void LoadField(TString); |
void LoadField(TString); |
248 |
|
float GetBX(float*); |
249 |
|
float GetBY(float*); |
250 |
|
float GetBZ(float*); |
251 |
Float_t GetZTrk(Int_t); |
Float_t GetZTrk(Int_t); |
252 |
Float_t GetXTrkLeft(){return XTRKL;}; |
Float_t GetXTrkLeft(){return XTRKL;}; |
253 |
Float_t GetXTrkRight(){return XTRKR;}; |
Float_t GetXTrkRight(){return XTRKR;}; |