CbmRoot
Loading...
Searching...
No Matches
CbmTrackParam.cxx
Go to the documentation of this file.
1/* Copyright (C) 2016-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Timur Ablyazimov, Florian Uhlig [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmTrackParam source file -----
7// ----- Created 05/02/16 by T. Ablyazimov -----
8// -------------------------------------------------------------------------
9#include "CbmTrackParam.h"
10
11#include <FairTrackParam.h> // for FairTrackParam
12
13#include <cmath>
14
15void CbmTrackParam::Set(const FairTrackParam& ftp, double time, double timeError)
16{
17 SetX(ftp.GetX());
18 SetY(ftp.GetY());
19 SetZ(ftp.GetZ());
20 SetTx(ftp.GetTx());
21 SetTy(ftp.GetTy());
22 SetQp(ftp.GetQp());
23 fTime = time;
24 fDTime = timeError;
25 double cov[15];
26 ftp.CovMatrix(cov);
27 SetCovMatrix(cov);
28 double p = (abs(ftp.GetQp()) > 1.e-4) ? 1. / abs(ftp.GetQp()) : 1.e4;
29 double norma = 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 DpzByDqp = -p * p / norma;
34 double DpzByDtx = -p * ftp.GetTx() / (norma * norma * norma);
35 double DpzByDty = -p * ftp.GetTy() / (norma * norma * norma);
36 fDpz =
37 sqrt(DpzByDqp * DpzByDqp * cov[14] + DpzByDtx * DpzByDtx * cov[9] + DpzByDty * DpzByDty * cov[12]
38 + 2 * DpzByDqp * DpzByDtx * cov[11] + 2 * DpzByDqp * DpzByDty * cov[13] + 2 * DpzByDtx * DpzByDty * cov[10]);
39 double DpxByDqp = ftp.GetTx() * DpzByDqp;
40 double DpxByDtx = p * (ftp.GetTy() * ftp.GetTy() + 1) / (norma * norma * norma);
41 double DpxByDty = -p * ftp.GetTx() * ftp.GetTy() / (norma * norma * norma);
42 fDpx =
43 sqrt(DpxByDqp * DpxByDqp * cov[14] + DpxByDtx * DpxByDtx * cov[9] + DpxByDty * DpxByDty * cov[12]
44 + 2 * DpxByDqp * DpxByDtx * cov[11] + 2 * DpxByDqp * DpxByDty * cov[13] + 2 * DpxByDtx * DpxByDty * cov[10]);
45 double DpyByDqp = ftp.GetTy() * DpzByDqp;
46 double DpyByDtx = -p * ftp.GetTx() * ftp.GetTy() / (norma * norma * norma);
47 double DpyByDty = p * (ftp.GetTx() * ftp.GetTx() + 1) / (norma * norma * norma);
48 fDpy =
49 sqrt(DpyByDqp * DpyByDqp * cov[14] + DpyByDtx * DpyByDtx * cov[9] + DpyByDty * DpyByDty * cov[12]
50 + 2 * DpyByDqp * DpyByDtx * cov[11] + 2 * DpyByDqp * DpyByDty * cov[13] + 2 * DpyByDtx * DpyByDty * cov[10]);
51}
52
ClassImp(CbmConverterManager)
friend fvec sqrt(const fvec &a)
void Set(const FairTrackParam &ftp, double time=0., double timeError=0.)