[ff9fb2d9] | 1 | #ifndef G__SOLTRK_H
|
---|
| 2 | #define G__SOLTRK_H
|
---|
| 3 |
|
---|
| 4 | #include <TMath.h>
|
---|
| 5 | #include <TMatrixDSym.h>
|
---|
| 6 |
|
---|
| 7 | class SolGeom;
|
---|
| 8 |
|
---|
| 9 | // Class to store track information
|
---|
| 10 | // Assumes that the geometry has been initialized
|
---|
| 11 | class SolTrack{
|
---|
| 12 | // Track handling class
|
---|
| 13 | // Assume tracks originate from (0,0) for the time being
|
---|
| 14 | private:
|
---|
| 15 | Int_t fNl; // Actual number of layers
|
---|
| 16 | SolGeom *fG; // Geometry
|
---|
| 17 | Double_t fp[3]; // px, py, pz momentum
|
---|
| 18 | Double_t fx[3]; // x, y, z track origin
|
---|
| 19 | Double_t fpar[5]; // D, phi0, C, z0, cot(theta)
|
---|
| 20 |
|
---|
| 21 | TMatrixDSym fCov; // Full covariance matrix
|
---|
| 22 |
|
---|
| 23 | public:
|
---|
| 24 | // Constructors
|
---|
| 25 | SolTrack(Double_t *x, Double_t *p, SolGeom *G);
|
---|
| 26 | SolTrack(Double_t D, Double_t phi0, Double_t C, Double_t z0, Double_t ct, SolGeom *G);
|
---|
| 27 | // Destructor
|
---|
| 28 | ~SolTrack();
|
---|
| 29 | // Accessors
|
---|
| 30 | // Position (at minimum approach)
|
---|
| 31 | Double_t x() { return fx[0]; }
|
---|
| 32 | Double_t y() { return fx[1]; }
|
---|
| 33 | Double_t z() { return fx[2]; }
|
---|
| 34 | // Momentum (at minimum approach)
|
---|
| 35 | Double_t px() { return fp[0]; }
|
---|
| 36 | Double_t py() { return fp[1]; }
|
---|
| 37 | Double_t pz() { return fp[2]; }
|
---|
| 38 | Double_t pt() { return TMath::Sqrt(fp[0] * fp[0] + fp[1] * fp[1]); }
|
---|
| 39 | Double_t p() { return TMath::Sqrt(fp[0] * fp[0] + fp[1] * fp[1] + fp[2] * fp[2]); }
|
---|
| 40 | // Track parameters
|
---|
| 41 | Double_t D() { return fpar[0]; }
|
---|
| 42 | Double_t phi0() { return fpar[1]; }
|
---|
| 43 | Double_t C() { return fpar[2]; }
|
---|
| 44 | Double_t z0() { return fpar[3]; }
|
---|
| 45 | Double_t ct() { return fpar[4]; }
|
---|
| 46 | // Covariance
|
---|
| 47 | TMatrixDSym Cov() { return fCov; }
|
---|
| 48 | // Track parameter covariance calculation
|
---|
| 49 | void CovCalc(Bool_t Res, Bool_t MS);
|
---|
| 50 | // Parameter errors
|
---|
| 51 | Double_t s_D() { return TMath::Sqrt(fCov(0, 0)); }
|
---|
| 52 | Double_t s_phi0() { return TMath::Sqrt(fCov(1, 1)); }
|
---|
| 53 | Double_t s_C() { return TMath::Sqrt(fCov(2, 2)); }
|
---|
| 54 | Double_t s_pt() { return 2 * s_C()*pt() / (0.2998*fG->B()); } // Dpt/pt
|
---|
| 55 | Double_t s_z0() { return TMath::Sqrt(fCov(3, 3)); }
|
---|
| 56 | Double_t s_ct() { return TMath::Sqrt(fCov(4, 4)); }
|
---|
| 57 | // Track hit management
|
---|
| 58 | Int_t nHit();
|
---|
| 59 | Bool_t HitLayer(Int_t Layer, Double_t &R, Double_t &phi, Double_t &zz);
|
---|
| 60 | Int_t HitList(Int_t *&ihh, Double_t *&rhh, Double_t *&zhh);
|
---|
| 61 | // Make normalized matrix positive definite
|
---|
| 62 | TMatrixDSym MakePosDef(TMatrixDSym NormMat);
|
---|
| 63 | };
|
---|
| 64 | #endif
|
---|