#include <RecoBTag/BTagTools/interface/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 *) |
Definition at line 17 of file SignedDecayLength3D.h.
SignedDecayLength3D::SignedDecayLength3D | ( | ) | [inline] |
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(), closestApproachToJet(), reco::Vertex::covariance(), Vector3DBase< T, FrameTag >::dot(), reco::TransientTrack::field(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), TrajectoryStateOnSurface::isValid(), j, CartesianTrajectoryError::matrix(), funct::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().
00020 { 00021 00022 double theError=0.; 00023 bool theIsValid; 00024 00025 //TrajectoryStateOnSurface TSOS = (aRecTrack).impactPointStateOnSurface(); 00026 TrajectoryStateOnSurface TSOS = transientTrack.impactPointState(); 00027 FreeTrajectoryState * FTS = TSOS.freeTrajectoryState(); 00028 00029 TrajectoryStateOnSurface theTSOS = closestApproachToJet(*FTS, vertex, direction,transientTrack.field()); 00030 theIsValid= theTSOS.isValid(); 00031 00032 if(theIsValid){ 00033 GlobalVector J = direction.unit(); 00034 GlobalPoint vertexPosition(vertex.x(),vertex.y(),vertex.z()); 00035 00036 double theValue = J.dot(theTSOS.globalPosition()-vertexPosition); 00037 00038 //error calculation 00039 00040 AlgebraicVector3 j; 00041 j[0] = J.x(); 00042 j[1] = J.y(); 00043 j[2] = J.z(); 00044 AlgebraicVector6 jj; 00045 jj[0] = J.x(); 00046 jj[1] = J.y(); 00047 jj[2] = J.z(); 00048 jj[3] =0.; 00049 jj[4] =0.; 00050 jj[5] =0.; 00051 double E1 = ROOT::Math::Similarity(jj,theTSOS.cartesianError().matrix()); 00052 // double E2 = (aJet.vertex().positionError().matrix()).similarity(j); 00053 double E2 = ROOT::Math::Similarity(j,vertex.covariance()); 00054 00055 theError = sqrt(E1+E2); 00056 00057 00058 //cout<< "Error ="<< theError<<endl; 00059 Measurement1D A(theValue, theError); 00060 return pair<bool,Measurement1D>(theIsValid,A); 00061 }else{ 00062 return pair<bool,Measurement1D>(theIsValid,Measurement1D(0.,0.)); 00063 }// endif (isValid) 00064 }// 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(), configurableAnalysis::Jet, Vector3DBase< T, FrameTag >::unit(), reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().
Referenced by apply().
00067 { 00068 00069 GlobalVector J =aJetDirection.unit(); 00070 00071 Line::PositionType pos(GlobalPoint(vertex.x(),vertex.y(),vertex.z())); 00072 Line::DirectionType dir(J); 00073 Line Jet(pos,dir); 00074 00075 AnalyticalTrajectoryExtrapolatorToLine TETL(field); 00076 00077 return TETL.extrapolate(aFTS, Jet); 00078 }