8 |
#include <TObject.h> |
#include <TObject.h> |
9 |
#include <TObjArray.h> |
#include <TObjArray.h> |
10 |
#include <TClonesArray.h> |
#include <TClonesArray.h> |
11 |
|
|
12 |
#include <TrkStruct.h> |
#include <TrkStruct.h> |
13 |
|
|
14 |
// z-coordinate of track state-vector reference-plane |
// z-coordinate of track state-vector reference-plane |
15 |
#define ZINI 23.5 |
#define ZINI 23.5 |
16 |
// upper and lower (mechanical) z-coordinate of the tracker |
// upper and lower (mechanical) z-coordinate of the tracker |
17 |
#define ZTRKUP 22.29 |
//#define ZTRKUP 22.29 |
18 |
#define ZTRKDW -22.22 |
//#define ZTRKDW -22.22 |
19 |
|
// (mechanical) z-coordinate of the tracker planes |
20 |
|
#define ZTRK6 -22.23 |
21 |
|
#define ZTRK5 -13.32 |
22 |
|
#define ZTRK4 -4.42 |
23 |
|
#define ZTRK3 4.48 |
24 |
|
#define ZTRK2 13.38 |
25 |
|
#define ZTRK1 22.28 |
26 |
|
// (mechanical) x/y-coordinates of magnet cavity |
27 |
|
#define XTRKL -8.1 |
28 |
|
#define XTRKR 8.1 |
29 |
|
#define YTRKL -6.6 |
30 |
|
#define YTRKR 6.6 |
31 |
|
|
32 |
/** |
/** |
33 |
* \brief Class to describe, by points, a particle trajectory in the apparatus. |
* \brief Class to describe, by points, a particle trajectory in the apparatus. |
72 |
|
|
73 |
private: |
private: |
74 |
|
|
75 |
|
int seqno; ///<stored track sequential number |
76 |
|
int image; ///<sequential number of track-image |
77 |
|
|
78 |
public: |
public: |
79 |
|
|
80 |
|
|
81 |
float al[5]; ///<TRACK STATE VECTOR |
float al[5]; ///<TRACK STATE VECTOR |
82 |
float coval[5][5]; ///<covariance matrix |
float coval[5][5]; ///<covariance matrix |
83 |
int xgood[6]; ///<mask of included x planes |
int xgood[6]; ///<mask of included x planes |
95 |
float ayv[6]; ///<calculated angles (deg) on y view |
float ayv[6]; ///<calculated angles (deg) on y view |
96 |
float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer) |
97 |
float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer) |
98 |
int image; ///<flag to tag track-images |
|
99 |
|
|
100 |
TrkTrack(); |
TrkTrack(); |
101 |
TrkTrack(const TrkTrack&); |
TrkTrack(const TrkTrack&); |
102 |
|
|
103 |
void Dump(); |
void Dump(); |
104 |
|
|
105 |
|
Int_t GetSeqNo(){return seqno;} ///< Returns the track sequential number |
106 |
|
Int_t GetImageSeqNo(){return image;} ///< Returns the track image sequential number |
107 |
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 |
108 |
int DoTrack(Trajectory* t); ///< Evaluates the trajectory in the apparatus. |
int DoTrack(Trajectory* t); ///< Evaluates the trajectory in the apparatus. |
109 |
int DoTrack2(Trajectory* t); ///< Evaluates the trajectory in the apparatus. |
int DoTrack2(Trajectory* t); ///< Evaluates the trajectory in the apparatus. |
110 |
float BdL(){return 0;}; ///< Evaluates the integral of B*dL along the track. |
float BdL(){return 0;}; ///< Evaluates the integral of B*dL along the track. |
111 |
Int_t GetNX(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=xgood[i]; return n;}; |
Int_t GetNX(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=xgood[i]; return n;}; |
112 |
Int_t GetNY(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=ygood[i]; return n;}; |
Int_t GetNY(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=ygood[i]; return n;}; |
113 |
|
Int_t GetNtot(){return GetNX()+GetNY();}; |
114 |
Float_t GetRigidity(); |
Float_t GetRigidity(); |
115 |
Float_t GetDeflection(); |
Float_t GetDeflection(); |
116 |
Float_t GetDEDX(); |
Float_t GetDEDX(); |
117 |
|
|
118 |
TrkTrack* GetTrkTrack(){return this;}; |
TrkTrack* GetTrkTrack(){return this;}; |
119 |
|
|
120 |
|
friend class TrkLevel2; |
121 |
|
|
122 |
ClassDef(TrkTrack,1); |
ClassDef(TrkTrack,1); |
123 |
|
|
124 |
}; |
}; |
142 |
|
|
143 |
void Dump(); |
void Dump(); |
144 |
|
|
145 |
|
friend class TrkLevel2; |
146 |
|
|
147 |
ClassDef(TrkSinglet,1); |
ClassDef(TrkSinglet,1); |
148 |
|
|
149 |
}; |
}; |
162 |
class TrkLevel2 : public TObject { |
class TrkLevel2 : public TObject { |
163 |
|
|
164 |
private: |
private: |
165 |
|
|
166 |
|
// TRefArray *PhysicalTrack; ///< physical tracks (no image) - |
167 |
|
|
168 |
public: |
public: |
169 |
|
|
|
|
|
|
|
|
170 |
Int_t good2; |
Int_t good2; |
171 |
Int_t crc[12]; |
Int_t crc[12]; |
172 |
|
|
177 |
TrkLevel2(); |
TrkLevel2(); |
178 |
// TrkLevel2(cTrkLevel2 *); |
// TrkLevel2(cTrkLevel2 *); |
179 |
|
|
180 |
int ntrk(){return Track->GetEntries();} ///< number of stored track |
int ntrk() {return Track->GetEntries();} ///< number of stored track |
181 |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
182 |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
183 |
|
|
184 |
void Dump(); |
void Dump(); |
185 |
void FillCommonVar(cTrkLevel2 *); |
void FillCommonVar(cTrkLevel2 *); |
186 |
void Clear(); |
void Clear(); |
187 |
void LoadField(TString); |
void LoadField(TString); |
188 |
|
Float_t GetZTrk(Int_t); |
189 |
TrkTrack *GetStoredTrack(int i); |
Float_t GetXTrkLeft(){return XTRKL;}; |
190 |
TClonesArray *GetTracks(); |
Float_t GetXTrkRight(){return XTRKR;}; |
191 |
|
Float_t GetYTrkLeft(){return YTRKL;}; |
192 |
int GetNTracks(){return this->GetTracks()->GetEntries();} |
Float_t GetYTrkRight(){return YTRKR;}; |
193 |
TrkTrack* GetTrack(int i); |
|
194 |
|
TrkSinglet *GetSingletX(int); |
195 |
|
TrkSinglet *GetSingletY(int); |
196 |
|
|
197 |
|
TrkTrack *GetStoredTrack(int i); |
198 |
|
Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number |
199 |
|
// TClonesArray *GetTracks_Chi2Sorted(); |
200 |
|
TClonesArray *GetTracks_NFitSorted(); |
201 |
|
TClonesArray *GetTracks(); |
202 |
|
|
203 |
|
// int GetNTracks(){return this->GetTracks()->GetEntries();} |
204 |
|
Int_t GetNTracks(); |
205 |
|
TrkTrack* GetTrack(int i); |
206 |
TrkTrack* GetTrackImage(int i); |
TrkTrack* GetTrackImage(int i); |
207 |
|
|
208 |
TrkLevel2* GetTrkLevel2(){return this;} |
TrkLevel2* GetTrkLevel2(){return this;} |
209 |
|
TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array |
210 |
|
|
211 |
ClassDef(TrkLevel2,1); |
ClassDef(TrkLevel2,1); |
212 |
|
|
213 |
}; |
}; |
214 |
|
|
215 |
|
|
216 |
|
|
|
|
|
217 |
#endif |
#endif |