CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 15 of file SignedDecayLength3D.h.

Constructor & Destructor Documentation

SignedDecayLength3D::SignedDecayLength3D ( )
inline

Definition at line 19 of file SignedDecayLength3D.h.

19 {};

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(), dqmiolumiharvest::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__(), 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
double y() const
y coordinate
Definition: Vertex.h:131
const CartesianTrajectoryError cartesianError() const
T y() const
Definition: PV3DBase.h:60
GlobalPoint globalPosition() const
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:99
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:148
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
double z() const
z coordinate
Definition: Vertex.h:133
const AlgebraicSymMatrix66 & matrix() const
Vector3DBase unit() const
Definition: Vector3DBase.h:54
static TrajectoryStateOnSurface closestApproachToJet(const FreeTrajectoryState &, const reco::Vertex &, const GlobalVector &, const MagneticField *)
double x() const
x coordinate
Definition: Vertex.h:129
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SVector< double, 6 > AlgebraicVector6
T x() const
Definition: PV3DBase.h:59
TrajectoryStateOnSurface SignedDecayLength3D::closestApproachToJet ( const FreeTrajectoryState aFTS,
const reco::Vertex vertex,
const GlobalVector aJetDirection,
const MagneticField field 
)
staticprivate

Definition at line 65 of file SignedDecayLength3D.cc.

References DeadROC_duringRun::dir, AnalyticalTrajectoryExtrapolatorToLine::extrapolate(), configurableAnalysis::Jet, Vector3DBase< T, FrameTag >::unit(), reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().

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:131
Base class for all types of Jets.
Definition: Jet.h:20
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double z() const
z coordinate
Definition: Vertex.h:133
Vector3DBase unit() const
Definition: Vector3DBase.h:54
double x() const
x coordinate
Definition: Vertex.h:129
constexpr char Jet[]
Definition: modules.cc:9
int SignedDecayLength3D::id ( void  ) const
inline

Definition at line 25 of file SignedDecayLength3D.h.

25 { return 3; }