CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Private Member Functions
SignedDecayLength3D Class Reference

#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 *)
 

Detailed Description

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.

Constructor & Destructor Documentation

SignedDecayLength3D::SignedDecayLength3D ( )
inline

Definition at line 23 of file SignedDecayLength3D.h.

23 {};

Member Function Documentation

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, findQualityFiles::jj, 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().

Referenced by heavyIonTools.ConfigureHeavyIons::__call__(), editorTools.UserCodeTool::__call__(), HiCoreTools.RestrictInputToAOD::__call__(), coreTools.RunOnData::__call__(), trackTools.MakeAODTrackCandidates::__call__(), runJetUncertainties.RunJetUncertainties::__call__(), metTools.AddMETCollection::__call__(), heavyIonTools.ProductionDefaults::__call__(), editorTools.ChangeSource::__call__(), HiCoreTools.RemoveMCMatching::__call__(), coreTools.RemoveMCMatching::__call__(), trackTools.MakePATTrackCandidates::__call__(), jetTools.AddJetCollection::__call__(), trigTools.SwitchOnTrigger::__call__(), heavyIonTools.SelectionDefaults::__call__(), HiCoreTools.RemoveAllPATObjectsBut::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties::__call__(), HiCoreTools.RemoveSpecificPATObjects::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), trackTools.MakeTrackCandidates::__call__(), runMVAMEtUncertainties.RunMVAMEtUncertainties::__call__(), tauTools.AddTauCollection::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), HiCoreTools.RemoveCleaning::__call__(), runType1PFMEtUncertainties.RunType1PFMEtUncertainties::__call__(), HiCoreTools.AddCleaning::__call__(), runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.AddJetID::__call__(), and jetTools.SetTagInfos::__call__().

20  {
21 
22  double theError=0.;
23  bool theIsValid;
24 
25  //TrajectoryStateOnSurface TSOS = (aRecTrack).impactPointStateOnSurface();
26  TrajectoryStateOnSurface TSOS = transientTrack.impactPointState();
28 
29  TrajectoryStateOnSurface theTSOS = closestApproachToJet(*FTS, vertex, direction,transientTrack.field());
30  theIsValid= theTSOS.isValid();
31 
32  if(theIsValid){
33  GlobalVector J = direction.unit();
34  GlobalPoint vertexPosition(vertex.x(),vertex.y(),vertex.z());
35 
36  double theValue = J.dot(theTSOS.globalPosition()-vertexPosition);
37 
38  //error calculation
39 
41  j[0] = J.x();
42  j[1] = J.y();
43  j[2] = J.z();
45  jj[0] = J.x();
46  jj[1] = J.y();
47  jj[2] = J.z();
48  jj[3] =0.;
49  jj[4] =0.;
50  jj[5] =0.;
51  double E1 = ROOT::Math::Similarity(jj,theTSOS.cartesianError().matrix());
52  // double E2 = (aJet.vertex().positionError().matrix()).similarity(j);
53  double E2 = ROOT::Math::Similarity(j,vertex.covariance());
54 
55  theError = sqrt(E1+E2);
56 
57 
58 //cout<< "Error ="<< theError<<endl;
59  Measurement1D A(theValue, theError);
60  return pair<bool,Measurement1D>(theIsValid,A);
61  }else{
62  return pair<bool,Measurement1D>(theIsValid,Measurement1D(0.,0.));
63  }// endif (isValid)
64 }// end constructor declaration
double y() const
y coordinate
Definition: Vertex.h:110
const CartesianTrajectoryError cartesianError() const
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:107
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:123
ROOT::Math::SVector< double, 6 > AlgebraicVector6
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
T sqrt(T t)
Definition: SSEVec.h:48
T z() const
Definition: PV3DBase.h:64
ROOT::Math::SVector< double, 3 > AlgebraicVector3
int j
Definition: DBlmapReader.cc:9
double z() const
y coordinate
Definition: Vertex.h:112
const AlgebraicSymMatrix66 & matrix() const
Vector3DBase unit() const
Definition: Vector3DBase.h:57
static TrajectoryStateOnSurface closestApproachToJet(const FreeTrajectoryState &, const reco::Vertex &, const GlobalVector &, const MagneticField *)
double x() const
x coordinate
Definition: Vertex.h:108
T x() const
Definition: PV3DBase.h:62
TrajectoryStateOnSurface SignedDecayLength3D::closestApproachToJet ( const FreeTrajectoryState aFTS,
const reco::Vertex vertex,
const GlobalVector aJetDirection,
const MagneticField field 
)
staticprivate

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().

67  {
68 
69  GlobalVector J =aJetDirection.unit();
70 
71  Line::PositionType pos(GlobalPoint(vertex.x(),vertex.y(),vertex.z()));
73  Line Jet(pos,dir);
74 
76 
77  return TETL.extrapolate(aFTS, Jet);
78 }
Definition: Line.h:10
double y() const
y coordinate
Definition: Vertex.h:110
Base class for all types of Jets.
Definition: Jet.h:20
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double z() const
y coordinate
Definition: Vertex.h:112
Vector3DBase unit() const
Definition: Vector3DBase.h:57
double x() const
x coordinate
Definition: Vertex.h:108
dbl *** dir
Definition: mlp_gen.cc:35
int SignedDecayLength3D::id ( void  ) const
inline

Definition at line 29 of file SignedDecayLength3D.h.

29 {return 3;}