Belle II Software development
DistanceTools.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11
12#include <vector>
13#include <string>
14#include <framework/geometry/B2Vector3.h>
15#include "TMatrixDSym.h"
16
17namespace Belle2 {
29 namespace DistanceTools {
30
34 ROOT::Math::XYZVector poca(ROOT::Math::XYZVector const& trackPos, ROOT::Math::XYZVector const& trackP,
35 ROOT::Math::XYZVector const& vtxPos);
36
40 B2Vector3D trackToVtxVec(B2Vector3D const& trackPos, B2Vector3D const& trackP, B2Vector3D const& vtxPos);
41
45 double trackToVtxDist(B2Vector3D const& trackPos, B2Vector3D const& trackP, B2Vector3D const& vtxPos);
46
51 TMatrixDSym trackToVtxCovmat(B2Vector3D const& trackP,
52 TMatrixDSym const& trackPosCovMat, TMatrixDSym const& vtxPosCovMat);
53
58 double trackToVtxDistErr(B2Vector3D const& trackPos, B2Vector3D const& trackP, B2Vector3D const& vtxPos,
59 TMatrixDSym const& trackPosCovMat, TMatrixDSym const& vtxPosCovMat);
60
61
65 B2Vector3D vtxToVtxVec(B2Vector3D const& vtx1Pos, B2Vector3D const& vtx2Pos);
66
70 double vtxToVtxDist(B2Vector3D const& vtx1Pos, B2Vector3D const& vtx2Pos);
71
75 TMatrixDSym vtxToVtxCovMat(TMatrixDSym const& vtx1CovMat, TMatrixDSym const& vtx2CovMat);
76
80 double vtxToVtxDistErr(B2Vector3D const& vtx1Pos, B2Vector3D const& vtx2Pos,
81 TMatrixDSym const& vtx1CovMat, TMatrixDSym const& vtx2CovMat);
82 }
84}
TMatrixDSym vtxToVtxCovMat(TMatrixDSym const &vtx1CovMat, TMatrixDSym const &vtx2CovMat)
Returns the covariance (error) matrix related to the vector linking two vertices.
ROOT::Math::XYZVector poca(ROOT::Math::XYZVector const &trackPos, ROOT::Math::XYZVector const &trackP, ROOT::Math::XYZVector const &vtxPos)
Returns the Point Of Closest Approach of a track to a vertex.
double trackToVtxDistErr(B2Vector3D const &trackPos, B2Vector3D const &trackP, B2Vector3D const &vtxPos, TMatrixDSym const &trackPosCovMat, TMatrixDSym const &vtxPosCovMat)
Returns the estimated uncertainty between a vertex and a track's point of closest approach to that ve...
double trackToVtxDist(B2Vector3D const &trackPos, B2Vector3D const &trackP, B2Vector3D const &vtxPos)
Returns the distance between a vertex and a track's point of closest approach to that vertex.
TMatrixDSym trackToVtxCovmat(B2Vector3D const &trackP, TMatrixDSym const &trackPosCovMat, TMatrixDSym const &vtxPosCovMat)
Returns the covariance (error) matrix of the 3D vector between a vertex and a track's point of closes...
double vtxToVtxDist(B2Vector3D const &vtx1Pos, B2Vector3D const &vtx2Pos)
Returns the distance between two vertices.
B2Vector3D trackToVtxVec(B2Vector3D const &trackPos, B2Vector3D const &trackP, B2Vector3D const &vtxPos)
Returns the 3D vector between a vertex and a track's point of closest approach to that vertex.
B2Vector3D vtxToVtxVec(B2Vector3D const &vtx1Pos, B2Vector3D const &vtx2Pos)
Returns the 3D vector between two vertices, ie vtxPos2 - vtxPos1.
double vtxToVtxDistErr(B2Vector3D const &vtx1Pos, B2Vector3D const &vtx2Pos, TMatrixDSym const &vtx1CovMat, TMatrixDSym const &vtx2CovMat)
Returns the estimated uncertainty on the distance between two vertices.
Abstract base class for different kinds of events.