CMS 3D CMS Logo

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

#include <TrajectoryStateClosestToBeamLine.h>

Public Types

typedef FreeTrajectoryState FTS
 

Public Member Functions

GlobalPoint const & beamLinePCA () const
 
reco::BeamSpot const & beamSpot ()
 
bool isValid () const
 
FTS const & trackStateAtPCA () const
 
 TrajectoryStateClosestToBeamLine ()
 
 TrajectoryStateClosestToBeamLine (const FTS &stateAtPCA, const GlobalPoint &pointOnBeamLine, const reco::BeamSpot &beamSpot)
 
Measurement1D transverseImpactParameter () const
 
 ~TrajectoryStateClosestToBeamLine ()
 

Private Attributes

reco::BeamSpot theBeamSpot
 
FTS theFTS
 
GlobalPoint thePointOnBeamLine
 
bool valid
 

Detailed Description

Trajectory state defined at the point of closest approach (PCA) of the track to the beamline. It gives also access to the point on the beamline which is the closest to the track.

Definition at line 15 of file TrajectoryStateClosestToBeamLine.h.

Member Typedef Documentation

Definition at line 19 of file TrajectoryStateClosestToBeamLine.h.

Constructor & Destructor Documentation

TrajectoryStateClosestToBeamLine::TrajectoryStateClosestToBeamLine ( )
inline
TrajectoryStateClosestToBeamLine::TrajectoryStateClosestToBeamLine ( const FTS stateAtPCA,
const GlobalPoint pointOnBeamLine,
const reco::BeamSpot beamSpot 
)
TrajectoryStateClosestToBeamLine::~TrajectoryStateClosestToBeamLine ( )
inline

Definition at line 27 of file TrajectoryStateClosestToBeamLine.h.

27 {}

Member Function Documentation

GlobalPoint const& TrajectoryStateClosestToBeamLine::beamLinePCA ( ) const
inline

Point on the beamline which is the closest to the track

Definition at line 42 of file TrajectoryStateClosestToBeamLine.h.

References isValid(), and thePointOnBeamLine.

42  {
43  if (!isValid()) throw TrajectoryStateException(
44  "TrajectoryStateClosestToBeamLine is invalid.");
45  return thePointOnBeamLine;
46  }
reco::BeamSpot const& TrajectoryStateClosestToBeamLine::beamSpot ( void  )
inline

The beamline

Definition at line 57 of file TrajectoryStateClosestToBeamLine.h.

References isValid(), and theBeamSpot.

57  {
58  if (!isValid()) throw TrajectoryStateException(
59  "TrajectoryStateClosestToBeamLine is invalid.");
60  return theBeamSpot;
61  }
bool TrajectoryStateClosestToBeamLine::isValid ( void  ) const
inline
FTS const& TrajectoryStateClosestToBeamLine::trackStateAtPCA ( ) const
inline
Measurement1D TrajectoryStateClosestToBeamLine::transverseImpactParameter ( ) const

Transverse impact parameter of the track to the beamline. It is the transverse distance of the two PCAs.

Definition at line 10 of file TrajectoryStateClosestToBeamLine.cc.

References FreeTrajectoryState::cartesianError(), error, isValid(), CartesianTrajectoryError::matrix(), FreeTrajectoryState::position(), reco::BeamSpot::rotatedCovariance3D(), mathSSE::sqrt(), theBeamSpot, theFTS, thePointOnBeamLine, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by V0Fitter::fitAll(), HLTmmkFilter::hltFilter(), HLTmmkkFilter::hltFilter(), TrackFilterForPVFinding::operator()(), and PrimaryVertexAnalyzer4PU::printRecTrks().

11 {
12  if (!isValid()) throw TrajectoryStateException(
13  "TrajectoryStateClosestToBeamLine is invalid.");
16 
17  GlobalPoint impactPoint=theFTS.position();
18  AlgebraicVector3 transverseFlightPath(
19  impactPoint.x()-thePointOnBeamLine.x(),impactPoint.y()-thePointOnBeamLine.y(),0.);
20  double length = ROOT::Math::Mag(transverseFlightPath);
21  // Warning: after the transverseFlightPath.Unit() statement, the
22  // transverseFlightPath vector is CHANGED to a UNIT vector.
23  double ipError = sqrt( ROOT::Math::Similarity(transverseFlightPath.Unit(),error) );
24  return Measurement1D (length, ipError);
25 }
CartesianTrajectoryError cartesianError() const
T y() const
Definition: PV3DBase.h:62
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
T sqrt(T t)
Definition: SSEVec.h:46
ROOT::Math::SVector< double, 3 > AlgebraicVector3
const AlgebraicSymMatrix66 & matrix() const
GlobalPoint position() const
Covariance3DMatrix rotatedCovariance3D() const
Definition: BeamSpot.cc:79
T x() const
Definition: PV3DBase.h:61

Member Data Documentation

reco::BeamSpot TrajectoryStateClosestToBeamLine::theBeamSpot
private

Definition at line 70 of file TrajectoryStateClosestToBeamLine.h.

Referenced by beamSpot(), and transverseImpactParameter().

FTS TrajectoryStateClosestToBeamLine::theFTS
private
GlobalPoint TrajectoryStateClosestToBeamLine::thePointOnBeamLine
private

Definition at line 69 of file TrajectoryStateClosestToBeamLine.h.

Referenced by beamLinePCA(), and transverseImpactParameter().

bool TrajectoryStateClosestToBeamLine::valid
private

Definition at line 67 of file TrajectoryStateClosestToBeamLine.h.

Referenced by isValid().