CbmRoot
CbmLitLineTrackExtrapolator.cxx
Go to the documentation of this file.
1 
8 
10 
12 
14 
17  CbmLitTrackParam* parOut,
18  litfloat zOut,
19  std::vector<litfloat>* F) {
20  *parOut = *parIn;
21  return Extrapolate(parOut, zOut, F);
22 }
23 
25  litfloat zOut,
26  std::vector<litfloat>* F) {
27  litfloat X[6] = {par->GetX(),
28  par->GetY(),
29  par->GetTx(),
30  par->GetTy(),
31  par->GetQp(),
32  par->GetTime()};
33 
34  litfloat dz = zOut - par->GetZ();
35 
36  //transport state vector F*X*F.T()
37  X[0] = X[0] + dz * X[2];
38  X[1] = X[1] + dz * X[3];
39 
40  par->SetX(X[0]);
41  par->SetY(X[1]);
42 
43  std::vector<litfloat> C = par->GetCovMatrix();
44  litfloat txSq = std::pow(X[2], 2);
45  litfloat tySq = std::pow(X[3], 2);
46  litfloat timeCoeff =
47  dz / std::sqrt(1 + txSq + tySq) / CbmLitTrackParam::fSpeedOfLight;
48  litfloat dttx = X[2] * timeCoeff;
49  litfloat dttxz = dttx * dz;
50  litfloat dtty = X[3] * timeCoeff;
51  litfloat dttyz = dtty * dz;
52  //transport covariance matrix F*C*F.T()
53  litfloat t3 = C[2] + dz * C[11];
54  litfloat t7 = dz * C[12];
55  litfloat t8 = C[3] + t7;
56  litfloat t19 = C[8] + dz * C[15];
57  C[0] = C[0] + dz * C[2] + t3 * dz;
58  C[1] = C[1] + dz * C[7] + t8 * dz;
59  C[2] = t3;
60  C[3] = t8;
61  C[4] = C[4] + dz * C[13];
62  C[5] = C[5] + dz * C[14] + dttx * dttxz * C[11] + dttyz * C[12] + dttx * C[2]
63  + dtty * C[3];
64  C[6] = C[6] + dz * C[8] + t19 * dz;
65  C[7] = C[7] + t7;
66  C[8] = t19;
67  C[9] = C[9] + dz * C[16];
68  C[10] = C[10] + dz * C[17] + dttxz * C[12] + dttyz * C[15] + dttx * C[7]
69  + dtty * C[8];
70  C[14] = C[14] + dttx * C[11] + dtty * C[12];
71  C[17] = C[17] + dttx * C[12] + dtty * C[15];
72  C[19] = C[19] + dttx * C[13] + dtty * C[16];
73  C[20] = C[20] + 2 * dttx * dtty * C[12] + dttx * C[14] + dtty * C[17]
74  + dttx * dttx * C[11] + dtty * dtty * C[15];
75 
76  par->SetCovMatrix(C);
77  par->SetZ(zOut);
78  par->SetTime(par->GetTime()
79  + std::sqrt(1 + std::pow(X[2], 2) + std::pow(X[3], 2)) * dz
81 
82  // Transport matrix calculation
83  if (F != NULL) {
84  F->assign(36, 0.);
85  (*F)[0] = 1.;
86  (*F)[7] = 1.;
87  (*F)[14] = 1.;
88  (*F)[21] = 1.;
89  (*F)[28] = 1.;
90  (*F)[35] = 1.;
91  (*F)[2] = dz;
92  (*F)[9] = dz;
93  (*F)[32] = dttx;
94  (*F)[33] = dtty;
95  }
96 
97  return kLITSUCCESS;
98 }
CbmLitTrackParam.h
Data class for track parameters.
litfloat
double litfloat
Definition: CbmLitFloat.h:15
CbmLitLineTrackExtrapolator.h
CbmLitTrackParam::GetX
litfloat GetX() const
Definition: CbmLitTrackParam.h:53
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
CbmLitTrackParam
Data class for track parameters.
Definition: CbmLitTrackParam.h:29
CbmLitTrackParam::GetY
litfloat GetY() const
Definition: CbmLitTrackParam.h:54
CbmLitTrackParam::GetQp
litfloat GetQp() const
Definition: CbmLitTrackParam.h:58
CbmLitTrackParam::SetZ
void SetZ(litfloat z)
Definition: CbmLitTrackParam.h:66
kLITSUCCESS
@ kLITSUCCESS
Definition: CbmLitEnums.h:24
CbmLitTrackParam::SetTime
void SetTime(litfloat t)
Definition: CbmLitTrackParam.h:70
CbmLitLineTrackExtrapolator::CbmLitLineTrackExtrapolator
CbmLitLineTrackExtrapolator()
Definition: CbmLitLineTrackExtrapolator.cxx:11
CbmLitTrackParam::GetZ
litfloat GetZ() const
Definition: CbmLitTrackParam.h:55
CbmLitTrackParam::SetY
void SetY(litfloat y)
Definition: CbmLitTrackParam.h:65
CbmLitLineTrackExtrapolator::Extrapolate
virtual LitStatus Extrapolate(const CbmLitTrackParam *parIn, CbmLitTrackParam *parOut, litfloat zOut, std::vector< litfloat > *F)
Track parameters extrapolation with calculation of transport matrix.
Definition: CbmLitLineTrackExtrapolator.cxx:16
CbmLitTrackParam::SetCovMatrix
void SetCovMatrix(const vector< litfloat > &C)
Definition: CbmLitTrackParam.h:71
CbmLitTrackParam::GetCovMatrix
const vector< litfloat > & GetCovMatrix() const
Definition: CbmLitTrackParam.h:61
CbmLitTrackParam::GetTy
litfloat GetTy() const
Definition: CbmLitTrackParam.h:57
CbmLitTrackParam::SetX
void SetX(litfloat x)
Definition: CbmLitTrackParam.h:64
CbmLitLineTrackExtrapolator::~CbmLitLineTrackExtrapolator
virtual ~CbmLitLineTrackExtrapolator()
Definition: CbmLitLineTrackExtrapolator.cxx:13
LitStatus
LitStatus
Definition: CbmLitEnums.h:23
CbmLitTrackParam::GetTime
litfloat GetTime() const
Definition: CbmLitTrackParam.h:59
CbmLitTrackParam::GetTx
litfloat GetTx() const
Definition: CbmLitTrackParam.h:56
CbmLitTrackParam::fSpeedOfLight
static litfloat fSpeedOfLight
Definition: CbmLitTrackParam.h:31