#include <SignedDecayLength3D.h>
Public Member Functions | |
int | id () const |
SignedDecayLength3D () | |
Static Public Member Functions | |
static std::pair< bool, Measurement1D > | apply (const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex) |
Static Private Member Functions | |
static TrajectoryStateOnSurface | closestApproachToJet (const FreeTrajectoryState &, const reco::Vertex &, const GlobalVector &, const MagneticField *) |
Threedimensional track decay length (minimum distance of the closest approach to a jet from the primary vertex) signed according to the jet direction
Definition at line 17 of file SignedDecayLength3D.h.
SignedDecayLength3D::SignedDecayLength3D | ( | ) | [inline] |
Definition at line 23 of file SignedDecayLength3D.h.
{};
pair< bool, Measurement1D > SignedDecayLength3D::apply | ( | const reco::TransientTrack & | track, |
const GlobalVector & | direction, | ||
const reco::Vertex & | vertex | ||
) | [static] |
chech it!!!!!!!!!!!!!!!!!!!!!!!
Definition at line 19 of file SignedDecayLength3D.cc.
References funct::A, TrajectoryStateOnSurface::cartesianError(), IPTools::closestApproachToJet(), reco::Vertex::covariance(), Vector3DBase< T, FrameTag >::dot(), reco::TransientTrack::field(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), TrajectoryStateOnSurface::isValid(), j, CartesianTrajectoryError::matrix(), mathSSE::sqrt(), Vector3DBase< T, FrameTag >::unit(), PV3DBase< T, PVType, FrameType >::x(), reco::Vertex::x(), PV3DBase< T, PVType, FrameType >::y(), reco::Vertex::y(), PV3DBase< T, PVType, FrameType >::z(), and reco::Vertex::z().
{ double theError=0.; bool theIsValid; //TrajectoryStateOnSurface TSOS = (aRecTrack).impactPointStateOnSurface(); TrajectoryStateOnSurface TSOS = transientTrack.impactPointState(); FreeTrajectoryState * FTS = TSOS.freeTrajectoryState(); TrajectoryStateOnSurface theTSOS = closestApproachToJet(*FTS, vertex, direction,transientTrack.field()); theIsValid= theTSOS.isValid(); if(theIsValid){ GlobalVector J = direction.unit(); GlobalPoint vertexPosition(vertex.x(),vertex.y(),vertex.z()); double theValue = J.dot(theTSOS.globalPosition()-vertexPosition); //error calculation AlgebraicVector3 j; j[0] = J.x(); j[1] = J.y(); j[2] = J.z(); AlgebraicVector6 jj; jj[0] = J.x(); jj[1] = J.y(); jj[2] = J.z(); jj[3] =0.; jj[4] =0.; jj[5] =0.; double E1 = ROOT::Math::Similarity(jj,theTSOS.cartesianError().matrix()); // double E2 = (aJet.vertex().positionError().matrix()).similarity(j); double E2 = ROOT::Math::Similarity(j,vertex.covariance()); theError = sqrt(E1+E2); //cout<< "Error ="<< theError<<endl; Measurement1D A(theValue, theError); return pair<bool,Measurement1D>(theIsValid,A); }else{ return pair<bool,Measurement1D>(theIsValid,Measurement1D(0.,0.)); }// endif (isValid) }// end constructor declaration
TrajectoryStateOnSurface SignedDecayLength3D::closestApproachToJet | ( | const FreeTrajectoryState & | aFTS, |
const reco::Vertex & | vertex, | ||
const GlobalVector & | aJetDirection, | ||
const MagneticField * | field | ||
) | [static, private] |
Definition at line 67 of file SignedDecayLength3D.cc.
References dir, AnalyticalTrajectoryExtrapolatorToLine::extrapolate(), pos, Vector3DBase< T, FrameTag >::unit(), reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().
{ GlobalVector J =aJetDirection.unit(); Line::PositionType pos(GlobalPoint(vertex.x(),vertex.y(),vertex.z())); Line::DirectionType dir(J); Line Jet(pos,dir); AnalyticalTrajectoryExtrapolatorToLine TETL(field); return TETL.extrapolate(aFTS, Jet); }
int SignedDecayLength3D::id | ( | void | ) | const [inline] |
Definition at line 29 of file SignedDecayLength3D.h.
{return 3;}