16 : TNamed(
"Vertex",
"Global"),
25 for(Int_t
i=0;
i<6;
i++) fCovMatrix[
i] = 0;
31 : TNamed(name, title),
40 for(Int_t
i=0;
i<6;
i++) fCovMatrix[
i] = 0;
48 Double_t x, Double_t y, Double_t z, Double_t chi2,
49 Int_t ndf, Int_t nTracks,
50 const TMatrixFSym& covMat)
51 : TNamed(name, title),
60 if ( (covMat.GetNrows() != 3) && (covMat.GetNcols() != 3) ) {
61 LOG(error) <<
"Wrong dimension of passed covariance matrix. Clear the covariance matrix.";
62 for(Int_t
i=0;
i<6;
i++) fCovMatrix[
i] = 0;
65 for (Int_t
i=0;
i<3;
i++) {
66 for (Int_t j=
i; j<3; j++) fCovMatrix[index++] = covMat[
i][j];
83 if (fNDF) chi2ndf = fChi2 / Double_t(fNDF);
85 LOG(info) <<
"Vertex coord. (" << fX <<
"," << fY <<
"," << fZ <<
") cm, "
86 <<
"chi2/ndf = " << chi2ndf <<
", " << fNTracks
96 for (
int i=0;
i<3;
i++) {
97 for (
int j=
i; j<3; j++) {
98 covMat[
i][j] = fCovMatrix[index];
99 covMat[j][
i] = fCovMatrix[index];
110 TMatrixFSym* mat =
new TMatrixFSym(3);
112 Double_t element = (*mat)[
i][j];
122 Int_t ndf, Int_t nTracks,
123 const TMatrixFSym& covMat)
131 if ( (covMat.GetNrows() != 3) && (covMat.GetNcols() != 3) ) {
132 LOG(error) <<
"Wrong dimension of passed covariance matrix. Clear the covariance matrix.";
133 for(Int_t
i=0;
i<6;
i++) fCovMatrix[
i] = 0;
136 for (Int_t
i=0;
i<3;
i++) {
137 for (Int_t j=
i; j<3; j++) fCovMatrix[index++] = covMat[
i][j];
147 fX = fY = fZ = fChi2 = 0.;
149 for(Int_t
i=0;
i<6;
i++) fCovMatrix[
i] = 0;
158 Double_t chi2ndf = ( fNDF ? fChi2 / Double_t(fNDF) : 0.);
160 ss <<
"Vertex: position (" << fixed << setprecision(4) << fX <<
", " << fY <<
", " << fZ
161 <<
") cm, chi2/ndf = " << chi2ndf <<
", tracks used: " << fNTracks;
virtual std::string ToString() const
void CovMatrix(TMatrixFSym &covMat) const
Double_t GetCovariance(Int_t i, Int_t j) const
void SetVertex(Double_t x, Double_t y, Double_t z, Double_t chi2, Int_t ndf, Int_t nTracks, const TMatrixFSym &covMat, Int_t flag, vector< Int_t > idxs)