CbmRoot
CbmTrackParam.cxx
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmTrackParam source file -----
3 // ----- Created 05/02/16 by T. Ablyazimov -----
4 // -------------------------------------------------------------------------
5 #include "CbmTrackParam.h"
6 
7 #include <FairTrackParam.h> // for FairTrackParam
8 
9 #include <TMath.h> // for Sqrt
10 #include <TMathBase.h> // for Abs
11 
12 void CbmTrackParam::Set(const FairTrackParam& ftp,
13  Double_t time,
14  Double_t timeError) {
15  SetX(ftp.GetX());
16  SetY(ftp.GetY());
17  SetZ(ftp.GetZ());
18  SetTx(ftp.GetTx());
19  SetTy(ftp.GetTy());
20  SetQp(ftp.GetQp());
21  fTime = time;
22  fDTime = timeError;
23  Double_t cov[15];
24  ftp.CovMatrix(cov);
25  SetCovMatrix(cov);
26  Double_t p =
27  (TMath::Abs(ftp.GetQp()) > 1.e-4) ? 1. / TMath::Abs(ftp.GetQp()) : 1.e4;
28  Double_t norma =
29  TMath::Sqrt(ftp.GetTx() * ftp.GetTx() + ftp.GetTy() * ftp.GetTy() + 1);
30  fPz = p / norma;
31  fPx = ftp.GetTx() * fPz;
32  fPy = ftp.GetTy() * fPz;
33  Double_t DpzByDqp = -p * p / norma;
34  Double_t DpzByDtx = -p * ftp.GetTx() / (norma * norma * norma);
35  Double_t DpzByDty = -p * ftp.GetTy() / (norma * norma * norma);
36  fDpz = TMath::Sqrt(
37  DpzByDqp * DpzByDqp * cov[14] + DpzByDtx * DpzByDtx * cov[9]
38  + DpzByDty * DpzByDty * cov[12] + 2 * DpzByDqp * DpzByDtx * cov[11]
39  + 2 * DpzByDqp * DpzByDty * cov[13] + 2 * DpzByDtx * DpzByDty * cov[10]);
40  Double_t DpxByDqp = ftp.GetTx() * DpzByDqp;
41  Double_t DpxByDtx =
42  p * (ftp.GetTy() * ftp.GetTy() + 1) / (norma * norma * norma);
43  Double_t DpxByDty = -p * ftp.GetTx() * ftp.GetTy() / (norma * norma * norma);
44  fDpx = TMath::Sqrt(
45  DpxByDqp * DpxByDqp * cov[14] + DpxByDtx * DpxByDtx * cov[9]
46  + DpxByDty * DpxByDty * cov[12] + 2 * DpxByDqp * DpxByDtx * cov[11]
47  + 2 * DpxByDqp * DpxByDty * cov[13] + 2 * DpxByDtx * DpxByDty * cov[10]);
48  Double_t DpyByDqp = ftp.GetTy() * DpzByDqp;
49  Double_t DpyByDtx = -p * ftp.GetTx() * ftp.GetTy() / (norma * norma * norma);
50  Double_t DpyByDty =
51  p * (ftp.GetTx() * ftp.GetTx() + 1) / (norma * norma * norma);
52  fDpy = TMath::Sqrt(
53  DpyByDqp * DpyByDqp * cov[14] + DpyByDtx * DpyByDtx * cov[9]
54  + DpyByDty * DpyByDty * cov[12] + 2 * DpyByDqp * DpyByDtx * cov[11]
55  + 2 * DpyByDqp * DpyByDty * cov[13] + 2 * DpyByDtx * DpyByDty * cov[10]);
56 }
57 
CbmTrackParam::fTime
Double_t fTime
Definition: CbmTrackParam.h:55
CbmTrackParam::fDpy
Double_t fDpy
Definition: CbmTrackParam.h:53
CbmTrackParam::fPx
Double_t fPx
Definition: CbmTrackParam.h:49
CbmTrackParam::Set
void Set(const FairTrackParam &ftp, Double_t time=0., Double_t timeError=0.)
Definition: CbmTrackParam.cxx:12
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmTrackParam::fDpz
Double_t fDpz
Definition: CbmTrackParam.h:54
CbmTrackParam::fPz
Double_t fPz
Definition: CbmTrackParam.h:51
CbmTrackParam::fDTime
Double_t fDTime
Definition: CbmTrackParam.h:56
CbmTrackParam
Definition: CbmTrackParam.h:22
CbmTrackParam::fPy
Double_t fPy
Definition: CbmTrackParam.h:50
CbmTrackParam.h
CbmTrackParam::fDpx
Double_t fDpx
Definition: CbmTrackParam.h:52