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 15 of file SignedDecayLength3D.h.

Constructor & Destructor Documentation

◆ SignedDecayLength3D()

SignedDecayLength3D::SignedDecayLength3D ( )
inline

Definition at line 19 of file SignedDecayLength3D.h.

19 {};

Member Function Documentation

◆ apply()

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 A, TrajectoryStateOnSurface::cartesianError(), IPTools::closestApproachToJet(), Vector3DBase< T, FrameTag >::dot(), reco::TransientTrack::field(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), TrajectoryStateOnSurface::isValid(), dqmiolumiharvest::j, findQualityFiles::jj, CartesianTrajectoryError::matrix(), mathSSE::sqrt(), Vector3DBase< T, FrameTag >::unit(), bphysicsOniaDQM_cfi::vertex, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by heavyIonTools.ConfigureHeavyIons::__call__(), coreTools.RunOnData::__call__(), trackTools.MakeAODTrackCandidates::__call__(), runJetUncertainties.RunJetUncertainties::__call__(), metTools.AddMETCollection::__call__(), heavyIonTools.ProductionDefaults::__call__(), coreTools.RemoveMCMatching::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::__call__(), heavyIonTools.SelectionDefaults::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), tauTools.AddTauCollection::__call__(), trackTools.MakeTrackCandidates::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.AddJetCollection::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.UpdateJetCollection::__call__(), jetTools.AddJetID::__call__(), and jetTools.SetTagInfos::__call__().

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  //cout<< "Error ="<< theError<<endl;
58  Measurement1D A(theValue, theError);
59  return pair<bool, Measurement1D>(theIsValid, A);
60  } else {
61  return pair<bool, Measurement1D>(theIsValid, Measurement1D(0., 0.));
62  } // endif (isValid)
63 } // end constructor declaration
T z() const
Definition: PV3DBase.h:61
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:99
const CartesianTrajectoryError cartesianError() const
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:19
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
static TrajectoryStateOnSurface closestApproachToJet(const FreeTrajectoryState &, const reco::Vertex &, const GlobalVector &, const MagneticField *)
ROOT::Math::SVector< double, 3 > AlgebraicVector3
const AlgebraicSymMatrix66 & matrix() const
ROOT::Math::SVector< double, 6 > AlgebraicVector6
Definition: APVGainStruct.h:7
Vector3DBase unit() const
Definition: Vector3DBase.h:54

◆ closestApproachToJet()

TrajectoryStateOnSurface SignedDecayLength3D::closestApproachToJet ( const FreeTrajectoryState aFTS,
const reco::Vertex vertex,
const GlobalVector aJetDirection,
const MagneticField field 
)
staticprivate

◆ id()

int SignedDecayLength3D::id ( void  ) const
inline

Definition at line 25 of file SignedDecayLength3D.h.

25 { return 3; }