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