Fork me on GitHub

source: git/external/TrackCovariance/SolTrack.h@ bfc6722

Last change on this file since bfc6722 was 170a11d, checked in by michele <michele.selvaggi@…>, 4 years ago

included acceptance and hits in TrackCovariance

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