EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairTrackParP.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairTrackParP.h
1 // Class for the representation of a track as parabola (SD system)
2 //
3 // Authors: M. Al-Turany, A. Fontana, L. Lavezzi and A. Rotondi
4 //
5 //
6 // GEANE parameters (q/p, v', w', v, w) of Helix track
7 // The Helix can be constructed using the Helix parameter (1/p, v', w', v, w) in SC reference
8 // and the covariance matrix. Or using position and momentum in LAB referance.
9 
10 #ifndef FAIRSTSTRACKPARP
11 #define FAIRSTSTRACKPARP 1
12 #include "TVector3.h"
13 #include "FairTrackPar.h"
14 #include "FairTrackParH.h"
15 
16 class FairTrackParH;
17 
19 {
20 
21  public:
22 
24  FairTrackParP();
25 
27  // spu = the sign of u-component of particle momentum
28  // constructor without spu, to be used when spu is calculated as output
29  // DJ(3) UNIT VECTOR IN V-DIRECTION
30  // DK(3) UNIT VECTOR IN W-DIRECTION OF DETECTOR SYSTEM
31 
32 
33  FairTrackParP(Double_t v, Double_t w,
34  Double_t Tv, Double_t Tw, Double_t qp,
35  Double_t CovMatrix[15],
36  TVector3 o, TVector3 dj, TVector3 dk);
37  // constructor with spu, to be used when spu is needed as input
38  FairTrackParP(Double_t v, Double_t w,
39  Double_t Tv, Double_t Tw, Double_t qp,
40  Double_t CovMatrix[15],
41  TVector3 o, TVector3 dj, TVector3 dk, Double_t spu);
42 
44  // DIAGONAL MARS covariance matrix
45  FairTrackParP(TVector3 pos, TVector3 Mom,
46  TVector3 posErr, TVector3 MomErr, Int_t q,
47  TVector3 o, TVector3 dj, TVector3 dk);
48  // NON DIAGONAL MARS covariance matrix
49  FairTrackParP(TVector3 pos, TVector3 Mom,
50  Double_t covMARS[6][6], Int_t q,
51  TVector3 o, TVector3 dj, TVector3 dk);
52  // constructor from helix
53  FairTrackParP(FairTrackParH* helix, TVector3 dj, TVector3 dk, Int_t& ierr);
54 
56  virtual ~FairTrackParP();
57 
59  //to be implemented
60 
61 
63  virtual void Print(Option_t* option = "") const;
64 
65  //define track parameters in LAB
66  void SetTrackPar(Double_t X, Double_t Y, Double_t Z, Double_t Px, Double_t Py, Double_t Pz, Int_t Q, Double_t CovMatrix[15], TVector3 o, TVector3 di, TVector3 dj, TVector3 dk);
67  //void SetTrackPar(Double_t X, Double_t Y, Double_t Z, Double_t Px, Double_t Py, Double_t Pz, Int_t Q, Double_t CovMatrix[15]);
68  //define track parameters in SD
69  void SetTrackPar(Double_t v, Double_t w, Double_t Tv, Double_t Tw, Double_t qp,Double_t CovMatrix[15], TVector3 o, TVector3 di, TVector3 dj, TVector3 dk, Double_t spu);
70  //void SetTrackPar(Double_t v, Double_t w, Double_t Tv, Double_t Tw, Double_t qp,Double_t CovMatrix[15]);
71 
73  void SetTV(Double_t tv) { fTV = tv; };
74  void SetTW(Double_t tw) { fTW = tw; };
75 
76  void Reset();
78 
81  // MARS
82  /* Double_t GetDX();
83  Double_t GetDY();
84  Double_t GetDZ();
85  Double_t GetDPx();
86  Double_t GetDPy();
87  Double_t GetDPz();
88  Double_t GetDQp();
89  Double_t GetX();
90  Double_t GetY();
91  Double_t GetZ();
92  */
93  // MARS
94  void GetMARSCov(Double_t Cov66[6][6]) {for(Int_t i=0; i<6; i++) for(Int_t j=0; j<6; j++) { Cov66[i][j] = fCovMatrix66[i][j]; } }
95 
96  // SD
97  Double_t* GetCov() {return fCovMatrix;};
98  void GetCov(Double_t* Cov) {for(Int_t i=0; i<15; i++) { Cov[i]=fCovMatrix[i]; }}
99  void GetCovQ(Double_t* CovQ);
100  Double_t GetV();
101  Double_t GetW();
102  Double_t GetTV();
103  Double_t GetTW();
104  Double_t GetDV();
105  Double_t GetDW();
106  Double_t GetDTV();
107  Double_t GetDTW();
108 
109  // SD MOMENTUM
110  TVector3 GetSDMomentum() {return TVector3(fPx_sd, fPy_sd, fPz_sd);}
111 
112  // plane
113  TVector3 GetOrigin();
114  TVector3 GetIVer();
115  TVector3 GetJVer();
116  TVector3 GetKVer();
117  void SetPlane(TVector3 o, TVector3 dj, TVector3 dk);
118 
119  // spu
120  Double_t GetSPU() {return fSPU;};
121 
122  // set/get transport matrix
123  void SetTransportMatrix(Double_t mat[5][5]);
124  void GetTransportMatrix(Double_t mat[5][5]);
125 
126  private:
127 
129  Double_t fU, fV, fW, fTV, fTW;
131  Double_t fPx_sd, fPy_sd, fPz_sd;
133  Double_t fDU, fDV, fDW, fDTV, fDTW;
135  // in SD
136  Double_t fCovMatrix[15];
137  // in MARS
138  Double_t fCovMatrix66[6][6];
139 
141  void CalCov();
142 
143  // plane
144  TVector3 forigin;
145  TVector3 fiver;
146  TVector3 fjver;
147  TVector3 fkver;
148  Double_t fDI[3];
149  Double_t fDJ[3];
150  Double_t fDK[3];
151  // spu
152  Double_t fSPU;
153  // transport matrix
154  Double_t ftrmat[5][5];
155 
156 };
157 
158 
159 #endif