10 #include "CLHEP/Vector/ThreeVector.h"
11 #include "CLHEP/Vector/LorentzVector.h"
12 #include "CLHEP/Matrix/Vector.h"
22 const Vertex& vertex)
const {
34 if (!TSOS.isValid()) {
42 double ps = DD0.dot(JetDir);
43 theValue = DD0.mag() * (ps /
abs(ps));
51 deriv_v[0] = -dd0.
x();
52 deriv_v[1] = -dd0.
y();
53 deriv_v[2] = -dd0.
z();
63 double E1 = ROOT::Math::Similarity(deriv, TSOS.cartesianError().matrix());
64 double E2 = ROOT::Math::Similarity(deriv_v, vertex.
covariance());
66 theError =
sqrt(E1 + E2);
67 LogDebug(
"BTagTools") <<
"Tk error : " << E1 <<
" , Vtx error : " << E2 <<
" tot : " << theError;
74 return pair<bool, Measurement1D>(x,
A);
79 const Vertex& vertex)
const {
83 if (!TSOS.isValid()) {
84 LogDebug(
"BTagTools") <<
"====>>>> SignedTransverseImpactParameter::zImpactParameter : TSOS not valid";
85 return pair<bool, Measurement1D>(
false,
Measurement1D(0.0, 0.0));
91 if (!statePCA.isValid()) {
92 LogDebug(
"BTagTools") <<
"====>>>> SignedTransverseImpactParameter::zImpactParameter : statePCA not valid";
93 return pair<bool, Measurement1D>(
false,
Measurement1D(0.0, 0.0));
101 double sign = PVPCA.
dot(JetDir);
105 double deltaZ = fabs(PCA.
z() - PV.z()) * sign;
111 double errTrackZ2 = statePCA.cartesianError().matrix()(2, 2);
112 double errZ =
sqrt(errPvZ2 + errTrackZ2);
118 return pair<bool, Measurement1D>(
true,
Measurement1D(deltaZ, errZ));
std::pair< bool, Measurement1D > apply(const reco::TransientTrack &, const GlobalVector &, const reco::Vertex &) const
double y() const
y coordinate
const MagneticField * field() const
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
std::pair< bool, Measurement1D > zImpactParameter(const reco::TransientTrack &, const GlobalVector &, const reco::Vertex &) const
FreeTrajectoryState const * freeState(bool withErrors=true) const
Abs< T >::type abs(const T &t)
double z() const
z coordinate
Vector3DBase unit() const
double x() const
x coordinate
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SVector< double, 6 > AlgebraicVector6
TrajectoryStateOnSurface impactPointState() const