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