| 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 <TrkLevel1.h> |
| 16 |
|
|
| 17 |
|
// z-coordinate of track state-vector reference-plane |
| 18 |
|
#define ZINI 23.5 |
| 19 |
|
// upper and lower (mechanical) z-coordinate of the tracker |
| 20 |
|
//#define ZTRKUP 22.29 |
| 21 |
|
//#define ZTRKDW -22.22 |
| 22 |
|
// (mechanical) z-coordinate of the tracker planes |
| 23 |
|
#define ZTRK6 -22.23 |
| 24 |
|
#define ZTRK5 -13.32 |
| 25 |
|
#define ZTRK4 -4.42 |
| 26 |
|
#define ZTRK3 4.48 |
| 27 |
|
#define ZTRK2 13.38 |
| 28 |
|
#define ZTRK1 22.28 |
| 29 |
|
// (mechanical) x/y-coordinates of magnet cavity |
| 30 |
|
#define XTRKL -8.1 |
| 31 |
|
#define XTRKR 8.1 |
| 32 |
|
#define YTRKL -6.6 |
| 33 |
|
#define YTRKR 6.6 |
| 34 |
|
|
| 35 |
/** |
/** |
| 36 |
* \brief Class to describe, by points, a particle trajectory in the apparatus. |
* \brief Class to describe, by points, a particle trajectory in the apparatus. |
| 48 |
float* x; ///< x coordinates |
float* x; ///< x coordinates |
| 49 |
float* y; ///< y coordinates |
float* y; ///< y coordinates |
| 50 |
float* z; ///< z coordinates |
float* z; ///< z coordinates |
| 51 |
|
float* thx; ///< x projected angle |
| 52 |
|
float* thy; ///< y projected angle |
| 53 |
|
float* tl; ///< track length |
| 54 |
|
|
| 55 |
Trajectory(){npoint=1; x = new float; y = new float; z = new float; return;}; |
Trajectory(); |
| 56 |
Trajectory(int n); |
Trajectory(int n); |
| 57 |
Trajectory(int n, float* pz); |
Trajectory(int n, float* pz); |
| 58 |
void Dump(); |
void Dump(); |
| 59 |
|
|
| 60 |
|
float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;}; |
| 61 |
|
float GetLength(int,int); |
| 62 |
|
|
| 63 |
ClassDef(Trajectory,1); |
ClassDef(Trajectory,1); |
| 64 |
|
|
| 65 |
}; |
}; |
| 75 |
|
|
| 76 |
private: |
private: |
| 77 |
|
|
| 78 |
|
int seqno; ///<stored track sequential number |
| 79 |
|
int image; ///<sequential number of track-image |
| 80 |
|
|
| 81 |
|
|
| 82 |
public: |
public: |
| 83 |
|
|
| 84 |
|
// TRef clx[6]; |
| 85 |
|
// TRef cly[6]; |
| 86 |
|
TRefArray *clx; |
| 87 |
|
TRefArray *cly; |
| 88 |
|
|
| 89 |
float al[5]; ///<TRACK STATE VECTOR |
float al[5]; ///<TRACK STATE VECTOR |
| 90 |
float coval[5][5]; ///<covariance matrix |
float coval[5][5]; ///<covariance matrix |
| 91 |
int xgood[6]; ///<mask of included x planes |
int xgood[6]; ///<mask of included x planes |
| 103 |
float ayv[6]; ///<calculated angles (deg) on y view |
float ayv[6]; ///<calculated angles (deg) on y view |
| 104 |
float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_x[6]; ///<signal in MIP (scaled to 300 micrometer) |
| 105 |
float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer) |
float dedx_y[6]; ///<signal in MIP (scaled to 300 micrometer) |
| 106 |
int image; ///<flag to tag track-images |
|
| 107 |
|
|
| 108 |
TrkTrack(); |
TrkTrack(); |
| 109 |
TrkTrack(const TrkTrack&); |
TrkTrack(const TrkTrack&); |
| 110 |
|
|
| 111 |
void Dump(); |
void Dump(); |
| 112 |
|
|
| 113 |
|
Int_t GetSeqNo(){return seqno;} ///< Returns the track sequential number |
| 114 |
|
Int_t GetImageSeqNo(){return image;} ///< Returns the track image sequential number |
| 115 |
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 |
| 116 |
int DoTrack(Trajectory* t); ///< Evaluates the trajectory in the apparatus. |
int DoTrack(Trajectory* t); ///< Evaluates the trajectory in the apparatus. |
| 117 |
float BdL(){return 0;}; ///< Evaluates the integral of B*dL along the track. |
int DoTrack2(Trajectory* t); ///< Evaluates the trajectory in the apparatus. |
| 118 |
|
float BdL(){return 0;}; ///< Evaluates the integral of B*dL along the track. |
| 119 |
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;}; |
| 120 |
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;}; |
| 121 |
|
Int_t GetNtot(){return GetNX()+GetNY();}; |
| 122 |
Float_t GetRigidity(); |
Float_t GetRigidity(); |
| 123 |
Float_t GetDeflection(); |
Float_t GetDeflection(); |
| 124 |
Float_t GetDEDX(); |
Float_t GetDEDX(); |
| 125 |
|
|
| 126 |
|
TrkCluster *GetClusterX(int ip){TrkCluster *pt = (TrkCluster*)(clx->At(ip)); return pt;}; |
| 127 |
|
TrkCluster *GetClusterY(int ip){TrkCluster *pt = (TrkCluster*)(cly->At(ip)); return pt;}; |
| 128 |
|
|
| 129 |
TrkTrack* GetTrkTrack(){return this;}; |
TrkTrack* GetTrkTrack(){return this;}; |
| 130 |
|
|
| 131 |
|
friend class TrkLevel2; |
| 132 |
|
|
| 133 |
ClassDef(TrkTrack,1); |
ClassDef(TrkTrack,1); |
| 134 |
|
|
| 135 |
}; |
}; |
| 141 |
class TrkSinglet : public TObject { |
class TrkSinglet : public TObject { |
| 142 |
|
|
| 143 |
private: |
private: |
| 144 |
|
|
| 145 |
|
|
| 146 |
public: |
public: |
| 147 |
|
|
| 148 |
|
TRef cls; |
| 149 |
|
|
| 150 |
int plane; ///<plane |
int plane; ///<plane |
| 151 |
float coord[2]; ///<coordinate (on sensor 1 and 2) |
float coord[2]; ///<coordinate (on sensor 1 and 2) |
| 155 |
TrkSinglet(const TrkSinglet&); |
TrkSinglet(const TrkSinglet&); |
| 156 |
|
|
| 157 |
void Dump(); |
void Dump(); |
| 158 |
|
|
| 159 |
|
TrkCluster *GetCluster(){TrkCluster *pt = (TrkCluster*)cls.GetObject(); return pt;}; |
| 160 |
|
|
| 161 |
|
friend class TrkLevel2; |
| 162 |
|
|
| 163 |
ClassDef(TrkSinglet,1); |
ClassDef(TrkSinglet,1); |
| 164 |
|
|
| 178 |
class TrkLevel2 : public TObject { |
class TrkLevel2 : public TObject { |
| 179 |
|
|
| 180 |
private: |
private: |
| 181 |
|
|
| 182 |
|
// TRefArray *PhysicalTrack; ///< physical tracks (no image) - |
| 183 |
|
|
| 184 |
public: |
public: |
| 185 |
|
|
|
|
|
|
|
|
| 186 |
Int_t good2; |
Int_t good2; |
| 187 |
Int_t crc[12]; |
Int_t crc[12]; |
| 188 |
|
|
| 193 |
TrkLevel2(); |
TrkLevel2(); |
| 194 |
// TrkLevel2(cTrkLevel2 *); |
// TrkLevel2(cTrkLevel2 *); |
| 195 |
|
|
| 196 |
int ntrk(){return Track->GetEntries();} ///< number of stored track |
int ntrk() {return Track->GetEntries();} ///< number of stored track |
| 197 |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
int nclsx(){return SingletX->GetEntries();} ///< number of x singlets |
| 198 |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
int nclsy(){return SingletY->GetEntries();} ///< number of y singlets |
| 199 |
|
|
| 200 |
void Dump(); |
void Dump(); |
| 201 |
void FillCommonVar(cTrkLevel2 *); |
void SetFromLevel2Struct(cTrkLevel2 *); |
| 202 |
|
void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *); |
| 203 |
|
void GetLevel2Struct(cTrkLevel2 *) const; |
| 204 |
void Clear(); |
void Clear(); |
| 205 |
void LoadField(TString); |
void LoadField(TString); |
| 206 |
|
Float_t GetZTrk(Int_t); |
| 207 |
TrkTrack *GetStoredTrack(int i); |
Float_t GetXTrkLeft(){return XTRKL;}; |
| 208 |
TClonesArray *GetTracks(); |
Float_t GetXTrkRight(){return XTRKR;}; |
| 209 |
|
Float_t GetYTrkLeft(){return YTRKL;}; |
| 210 |
int GetNTracks(){return this->GetTracks()->GetEntries();} |
Float_t GetYTrkRight(){return YTRKR;}; |
| 211 |
TrkTrack* GetTrack(int i); |
|
| 212 |
|
TrkSinglet *GetSingletX(int); |
| 213 |
|
TrkSinglet *GetSingletY(int); |
| 214 |
|
|
| 215 |
|
TrkTrack *GetStoredTrack(int i); |
| 216 |
|
Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number |
| 217 |
|
// TClonesArray *GetTracks_Chi2Sorted(); |
| 218 |
|
// TClonesArray *GetTracks_NFitSorted(); |
| 219 |
|
// TClonesArray *GetTracks(); |
| 220 |
|
TRefArray *GetTracks_NFitSorted(); |
| 221 |
|
TRefArray *GetTracks(){return this->GetTracks_NFitSorted();}; |
| 222 |
|
|
| 223 |
|
// int GetNTracks(){return this->GetTracks()->GetEntries();} |
| 224 |
|
Int_t GetNTracks(); |
| 225 |
|
TrkTrack* GetTrack(int i); |
| 226 |
TrkTrack* GetTrackImage(int i); |
TrkTrack* GetTrackImage(int i); |
| 227 |
|
|
| 228 |
TrkLevel2* GetTrkLevel2(){return this;} |
TrkLevel2* GetTrkLevel2(){return this;} |
| 229 |
|
TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array |
| 230 |
|
|
| 231 |
ClassDef(TrkLevel2,1); |
ClassDef(TrkLevel2,1); |
| 232 |
|
|
| 233 |
}; |
}; |
| 234 |
|
|
|
|
|
|
|
|
|
|
|
| 235 |
#endif |
#endif |