36 vector<CbmStsTrack> vRTracks(1);
40 vector<float> vChiToPrimVtx;
43 vector<CbmL1PFFitter::PFFieldRegion> vField;
44 fitter.
GetChiToVertex(vRTracks, vField, vChiToPrimVtx, kfVertex, -3);
49 for (Int_t iTr = 0; iTr < 1; iTr++) {
50 const FairTrackParam* parameters;
53 parameters = vRTracks[iTr].GetParamFirst();
56 parameters = vRTracks[iTr].GetParamLast();
61 Double_t V[15] = {0.f};
63 for (Int_t i = 0, iCov = 0; i < 5; i++) {
64 for (Int_t j = 0; j <= i; j++, iCov++) {
65 V[iCov] = parameters->GetCovariance(i, j);
69 float a = parameters->GetTx(), b = parameters->GetTy(), qp = parameters->GetQp();
78 if (TMath::Abs(pdg) == 1000020030 || TMath::Abs(pdg) == 1000020040) {
82 float c2 = 1.f / (1.f + a * a + b * b);
83 float pq = 1.f / qp * TMath::Abs(q);
85 float pz =
sqrt(p2 * c2);
89 float H[3] = {-px * c2, -py * c2, -pz * pq};
91 par[0] = parameters->GetX();
92 par[1] = parameters->GetY();
93 par[2] = parameters->GetZ();
98 float cxpz = H[0] * V[3] + H[1] * V[6] + H[2] * V[10];
99 float cypz = H[0] * V[4] + H[1] * V[7] + H[2] * V[11];
100 float capz = H[0] * V[5] + H[1] * V[8] + H[2] * V[12];
101 float cbpz = H[0] * V[8] + H[1] * V[9] + H[2] * V[13];
102 float cpzpz = H[0] * H[0] * V[5] + H[1] * H[1] * V[9] + H[2] * H[2] * V[14]
103 + 2 * (H[0] * H[1] * V[8] + H[0] * H[2] * V[12] + H[1] * H[2] * V[13]);
112 cov[6] = V[3] * pz + a * cxpz;
113 cov[7] = V[4] * pz + a * cypz;
115 cov[9] = V[5] * pz * pz + 2.f * a * pz * capz + a * a * cpzpz;
116 cov[10] = V[6] * pz + b * cxpz;
117 cov[11] = V[7] * pz + b * cypz;
119 cov[13] = V[8] * pz * pz + a * pz * cbpz + b * pz * capz + a * b * cpzpz;
120 cov[14] = V[9] * pz * pz + 2.f * b * pz * cbpz + b * b * cpzpz;
124 cov[18] = capz * pz + a * cpzpz;
125 cov[19] = cbpz * pz + b * cpzpz;
128 for (Int_t iP = 0; iP < 6; iP++) {
129 tracks.SetParameter(par[iP], iP, iTr);
131 for (Int_t iC = 0; iC < 21; iC++) {
132 tracks.SetCovariance(cov[iC], iC, iTr);
134 for (Int_t iF = 0; iF < 10; iF++) {
135 tracks.SetFieldCoefficient(vField[iTr].fP[iF], iF, iTr);
140 tracks.SetPVIndex(-1, iTr);
144 unsigned int index = 0;
145 uint_v indexSIMD(index);
147 KFParticleSIMD particleSIMD(
tracks, indexSIMD, pdgSIMD);
148 particleSIMD.GetKFParticle(*particle, 0);
150 particle->NDF() = track->
GetNDF();
151 particle->Chi2() = track->
GetChiSq();
ClassImp(CbmKFParticleInterface)
static void SetKFParticleFromStsTrack(CbmStsTrack *track, KFParticle *particle, Int_t pdg=211, Bool_t firstPoint=kTRUE)
static void ExtrapolateTrackToPV(const CbmStsTrack *track, CbmVertex *pv, FairTrackParam *paramAtPV, float &chiPrim)