18 #include <TMathBase.h>
19 #include <TMatrixTSym.h>
20 #include <TMatrixTUtils.h>
33 for (
int i = 0; i < 15; i++) {
44 const TMatrixFSym& covMat)
54 for (
int i = 0; i < 5; i++) {
55 for (
int j = i; j < 5; j++) {
56 fCovMatrix[index++] = covMat[i][j];
77 LOG(info) <<
"Position : (" << std::setprecision(2) <<
fX <<
", " <<
fY <<
", " <<
fZ <<
")";
78 LOG(info) <<
"Slopes : dx/dz = " << fTx <<
", dy/dz = " << fTy;
79 LOG(info) <<
"q/p = " << fQp;
84 Double_t p = (TMath::Abs(fQp) > 1.e-4) ? 1. / TMath::Abs(fQp) : 1.e4;
85 Double_t pz = TMath::Sqrt(p * p / (fTx * fTx + fTy * fTy + 1));
86 Double_t px = fTx * pz;
87 Double_t py = fTy * pz;
88 mom.SetXYZ(px, py, pz);
93 for (Int_t i = 0; i < 15; i++) {
94 cov[i] = fCovMatrix[i];
101 for (
int i = 0; i < 5; i++) {
102 for (
int j = i; j < 5; j++) {
103 covMat[i][j] = fCovMatrix[index];
104 covMat[j][i] = fCovMatrix[index];
112 if (i < 0 || j < 0 || i > 4 || j > 4) {
113 LOG(error) <<
"FairTrackParam::GetCovariance: Invalid index pair (" << i <<
"," << j <<
") !";
133 return fCovMatrix[index];
145 for (Int_t i = 0; i < 15; i++) {
146 fCovMatrix[i] = cov[i];
153 for (
int i = 0; i < 5; i++) {
154 for (
int j = i; j < 5; j++) {
155 fCovMatrix[index++] = covMat[i][j];
162 if (i < 0 || i > 4) {
163 LOG(warn) <<
"FairTrackParam::SetCovariance: "
164 <<
"First index out of range! " << i;
167 if (j < 0 || j > 4) {
168 LOG(warn) <<
"FairTrackParam::SetCovariance: "
169 <<
"Second index out of range! " << j;
189 fCovMatrix[index] = val;
void Momentum(TVector3 &mom) const
void SetCovMatrix(Double_t cov[])
void SetPosition(const TVector3 &pos)
virtual ~FairTrackParam()
ClassImp(FairEventBuilder)
void Print(Option_t *option="") const
void SetCovariance(Int_t i, Int_t j, Double_t val)
void CovMatrix(Double_t cov[]) const
FairTrackParam & operator=(const FairTrackParam &par)
FairMQExParamsParOne * par
Double_t GetCovariance(Int_t i, Int_t j) const