CMS 3D CMS Logo

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, Measurement1Dapply (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.

References apply(), and HiIsolationCommonParameters_cff::track.

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 patCaloMETCorrections_cff::A, TrajectoryStateOnSurface::cartesianError(), IPTools::closestApproachToJet(), reco::Vertex::covariance(), Vector3DBase< T, FrameTag >::dot(), reco::TransientTrack::field(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), TrajectoryStateOnSurface::isValid(), 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__(), trigTools.SwitchOnTrigger::__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::__call__(), heavyIonTools.SelectionDefaults::__call__(), HiCoreTools.RemoveAllPATObjectsBut::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), HiCoreTools.RemoveSpecificPATObjects::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), trackTools.MakeTrackCandidates::__call__(), tauTools.AddTauCollection::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), HiCoreTools.RemoveCleaning::__call__(), HiCoreTools.AddCleaning::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.AddJetCollection::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.UpdateJetCollection::__call__(), jetTools.AddJetID::__call__(), jetTools.SetTagInfos::__call__(), and SignedDecayLength3D().

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:113
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:130
ROOT::Math::SVector< double, 6 > AlgebraicVector6
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
ROOT::Math::SVector< double, 3 > AlgebraicVector3
double z() const
z coordinate
Definition: Vertex.h:115
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:111
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().

Referenced by id().

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:113
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Definition: Jet.py:1
double z() const
z coordinate
Definition: Vertex.h:115
Vector3DBase unit() const
Definition: Vector3DBase.h:57
double x() const
x coordinate
Definition: Vertex.h:111
dbl *** dir
Definition: mlp_gen.cc:35
int SignedDecayLength3D::id ( void  ) const
inline

Definition at line 29 of file SignedDecayLength3D.h.

References closestApproachToJet().

29 {return 3;}