FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairTrackParP.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // Class for the representation of a track as parabola (SD system)
9 //
10 // Authors: M. Al-Turany, A. Fontana, L. Lavezzi and A. Rotondi
11 //
12 //
13 // GEANE parameters (q/p, v', w', v, w) of Helix track
14 // The Helix can be constructed using the Helix parameter (1/p, v', w', v, w) in SC reference
15 // and the covariance matrix. Or using position and momentum in LAB referance.
16 
17 #ifndef FAIRSTSTRACKPARP
18 #define FAIRSTSTRACKPARP 1
19 
20 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
21 #include <RtypesCore.h> // for Double_t, Int_t, Option_t
22 #include <TVector3.h> // for TVector3
23 #include "FairTrackPar.h" // for FairTrackPar
24 class FairTrackParH; // lines 25-25
25 class TBuffer;
26 class TClass;
27 class TMemberInspector;
28 
29 
31 {
32 
33  public:
35  FairTrackParP();
36 
38  // spu = the sign of u-component of particle momentum
39  // constructor without spu, to be used when spu is calculated as output
40  // DJ(3) UNIT VECTOR IN V-DIRECTION
41  // DK(3) UNIT VECTOR IN W-DIRECTION OF DETECTOR SYSTEM
42 
43  FairTrackParP(Double_t v,
44  Double_t w,
45  Double_t Tv,
46  Double_t Tw,
47  Double_t qp,
48  Double_t CovMatrix[15],
49  TVector3 o,
50  TVector3 dj,
51  TVector3 dk);
52  // constructor with spu, to be used when spu is needed as input
53  FairTrackParP(Double_t v,
54  Double_t w,
55  Double_t Tv,
56  Double_t Tw,
57  Double_t qp,
58  Double_t CovMatrix[15],
59  TVector3 o,
60  TVector3 dj,
61  TVector3 dk,
62  Double_t spu);
63 
65  // DIAGONAL MARS covariance matrix
66  FairTrackParP(TVector3 pos,
67  TVector3 Mom,
68  TVector3 posErr,
69  TVector3 MomErr,
70  Int_t q,
71  TVector3 o,
72  TVector3 dj,
73  TVector3 dk);
74  // NON DIAGONAL MARS covariance matrix
75  FairTrackParP(TVector3 pos, TVector3 Mom, Double_t covMARS[6][6], Int_t q, TVector3 o, TVector3 dj, TVector3 dk);
76  // constructor from helix
77  FairTrackParP(FairTrackParH* helix, TVector3 dj, TVector3 dk, Int_t& ierr);
78 
80  virtual ~FairTrackParP();
81 
83  // to be implemented
84 
86  virtual void Print(Option_t* option = "") const;
87 
88  // define track parameters in LAB
89  void SetTrackPar(Double_t X,
90  Double_t Y,
91  Double_t Z,
92  Double_t Px,
93  Double_t Py,
94  Double_t Pz,
95  Int_t Q,
96  Double_t CovMatrix[15],
97  TVector3 o,
98  TVector3 di,
99  TVector3 dj,
100  TVector3 dk);
101  // 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
102  // CovMatrix[15]); define track parameters in SD
103  void SetTrackPar(Double_t v,
104  Double_t w,
105  Double_t Tv,
106  Double_t Tw,
107  Double_t qp,
108  Double_t CovMatrix[15],
109  TVector3 o,
110  TVector3 di,
111  TVector3 dj,
112  TVector3 dk,
113  Double_t spu);
114  // void SetTrackPar(Double_t v, Double_t w, Double_t Tv, Double_t Tw, Double_t qp,Double_t CovMatrix[15]);
115 
117  void SetTV(Double_t tv) { fTV = tv; };
118  void SetTW(Double_t tw) { fTW = tw; };
119 
120  void Reset();
122 
125  // MARS
126  /* Double_t GetDX();
127  Double_t GetDY();
128  Double_t GetDZ();
129  Double_t GetDPx();
130  Double_t GetDPy();
131  Double_t GetDPz();
132  Double_t GetDQp();
133  Double_t GetX();
134  Double_t GetY();
135  Double_t GetZ();
136  */
137  // MARS
138  void GetMARSCov(Double_t Cov66[6][6])
139  {
140  for (Int_t i = 0; i < 6; i++)
141  for (Int_t j = 0; j < 6; j++) {
142  Cov66[i][j] = fCovMatrix66[i][j];
143  }
144  }
145 
146  // SD
147  Double_t* GetCov() { return fCovMatrix; };
148  void GetCov(Double_t* Cov)
149  {
150  for (Int_t i = 0; i < 15; i++) {
151  Cov[i] = fCovMatrix[i];
152  }
153  }
154  void GetCovQ(Double_t* CovQ);
155  Double_t GetV();
156  Double_t GetW();
157  Double_t GetTV();
158  Double_t GetTW();
159  Double_t GetDV();
160  Double_t GetDW();
161  Double_t GetDTV();
162  Double_t GetDTW();
163 
164  // SD MOMENTUM
165  TVector3 GetSDMomentum() { return TVector3(fPx_sd, fPy_sd, fPz_sd); }
166 
167  // plane
168  TVector3 GetOrigin();
169  TVector3 GetIVer();
170  TVector3 GetJVer();
171  TVector3 GetKVer();
172  void SetPlane(TVector3 o, TVector3 dj, TVector3 dk);
173 
174  // spu
175  Double_t GetSPU() { return fSPU; };
176 
177  // set/get transport matrix
178  void SetTransportMatrix(Double_t mat[5][5]);
179  void GetTransportMatrix(Double_t mat[5][5]);
180 
181  private:
183  Double_t fU, fV, fW, fTV, fTW;
185  Double_t fPx_sd, fPy_sd, fPz_sd;
187  Double_t fDU, fDV, fDW, fDTV, fDTW;
189  // in SD
190  Double_t fCovMatrix[15];
191  // in MARS
192  Double_t fCovMatrix66[6][6];
193 
195  void CalCov();
196 
197  // plane
198  TVector3 forigin;
199  TVector3 fiver;
200  TVector3 fjver;
201  TVector3 fkver;
202  Double_t fDI[3];
203  Double_t fDJ[3];
204  Double_t fDK[3];
205  // spu
206  Double_t fSPU;
207  // transport matrix
208  Double_t ftrmat[5][5];
209 };
210 
211 #endif
void SetTW(Double_t tw)
virtual void Print(Option_t *option="") const
void SetTV(Double_t tv)
void SetPlane(TVector3 o, TVector3 dj, TVector3 dk)
Double_t GetDTW()
void GetCov(Double_t *Cov)
virtual ~FairTrackParP()
void GetMARSCov(Double_t Cov66[6][6])
Double_t GetDTV()
Double_t * GetCov()
ClassDef(FairTrackParP, 1)
Double_t GetW()
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)
Double_t GetV()
Double_t GetTW()
TVector3 GetJVer()
void GetTransportMatrix(Double_t mat[5][5])
Double_t GetSPU()
Double_t GetDV()
TVector3 GetSDMomentum()
TVector3 GetIVer()
Double_t GetTV()
void SetTransportMatrix(Double_t mat[5][5])
Double_t GetDW()
TVector3 GetKVer()
TVector3 GetOrigin()
void GetCovQ(Double_t *CovQ)