CbmRoot
Loading...
Searching...
No Matches
CbmKFVertexInterface.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov, Denis Bertini [committer] */
4
21
22#include "CbmVertex.h"
23#include "TMatrixTSym.h"
24
26
27 static Double_t gTempD[11];
28static Int_t gTempI[2];
29
30Double_t& CbmKFVertexInterface::GetRefX() { return gTempD[0]; }
31Double_t& CbmKFVertexInterface::GetRefY() { return gTempD[1]; }
32Double_t& CbmKFVertexInterface::GetRefZ() { return gTempD[2]; }
33Double_t* CbmKFVertexInterface::GetCovMatrix() { return gTempD + 3; }
34Double_t& CbmKFVertexInterface::GetRefChi2() { return gTempD[9]; }
37
39{
40 GetRefX() = v.GetX();
41 GetRefY() = v.GetY();
42 GetRefZ() = v.GetZ();
43 GetRefChi2() = v.GetChi2();
44 GetRefNDF() = v.GetNDF();
45 GetRefNTracks() = v.GetNTracks();
46 TMatrixFSym tmp(3);
47 v.CovMatrix(tmp);
48 for (int i = 0, k = 0; i < 3; i++) {
49 for (int j = 0; j <= i; j++, k++) {
50 GetCovMatrix()[k] = tmp(i, j);
51 }
52 }
53}
54
56{
57 TMatrixFSym covMat(3);
58 for (int i = 0, k = 0; i < 3; i++) {
59 for (int j = 0; j <= i; j++, k++) {
60 covMat(i, j) = GetCovMatrix()[k];
61 }
62 }
63 v.SetVertex(GetRefX(), GetRefY(), GetRefZ(), GetRefChi2(), GetRefNDF(), GetRefNTracks(), covMat);
64}
static Int_t gTempI[10]
static Int_t gTempI[2]
ClassImp(CbmKFVertexInterface) static Double_t gTempD[11]
fscal v[fmask::Size]
Definition KfSimdPseudo.h:4
virtual Double_t & GetRefY()
virtual Double_t & GetRefX()
virtual Int_t & GetRefNTracks()
Number of Degrees of Freedom after fit.
virtual Double_t & GetRefZ()
virtual Double_t & GetRefChi2()
Array[6] of covariance matrix.
virtual Int_t & GetRefNDF()
Chi^2 after fit.
void SetVertex(CbmVertex &v)
Number of tracks used during fit.
void GetVertex(CbmVertex &v)
virtual Double_t * GetCovMatrix()