CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

TrajectoryStateClosestToBeamLine Class Reference

#include <TrajectoryStateClosestToBeamLine.h>

List of all members.

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]

Definition at line 21 of file TrajectoryStateClosestToBeamLine.h.

: valid(false) {}
TrajectoryStateClosestToBeamLine::TrajectoryStateClosestToBeamLine ( const FTS stateAtPCA,
const GlobalPoint pointOnBeamLine,
const reco::BeamSpot beamSpot 
)

Definition at line 4 of file TrajectoryStateClosestToBeamLine.cc.

                                       :
          valid(true), theFTS(stateAtPCA) , thePointOnBeamLine(pointOnBeamLine),
        theBeamSpot(beamSpot)
{}
TrajectoryStateClosestToBeamLine::~TrajectoryStateClosestToBeamLine ( ) [inline]

Definition at line 27 of file TrajectoryStateClosestToBeamLine.h.

{}

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.

                                          {
    if (!isValid()) throw TrajectoryStateException(
      "TrajectoryStateClosestToBeamLine is invalid.");
    return thePointOnBeamLine;
  }
reco::BeamSpot const& TrajectoryStateClosestToBeamLine::beamSpot ( void  ) [inline]

The beamline

Definition at line 57 of file TrajectoryStateClosestToBeamLine.h.

References isValid(), and theBeamSpot.

                                  {
    if (!isValid()) throw TrajectoryStateException(
      "TrajectoryStateClosestToBeamLine is invalid.");
    return theBeamSpot;
  }
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().

{
  if (!isValid()) throw TrajectoryStateException(
    "TrajectoryStateClosestToBeamLine is invalid.");
  AlgebraicSymMatrix33 error = theBeamSpot.rotatedCovariance3D() +
        theFTS.cartesianError().matrix().Sub<AlgebraicSymMatrix33>(0,0);

  GlobalPoint impactPoint=theFTS.position();
  AlgebraicVector3 transverseFlightPath(
        impactPoint.x()-thePointOnBeamLine.x(),impactPoint.y()-thePointOnBeamLine.y(),0.);
  double length = ROOT::Math::Mag(transverseFlightPath);
  // Warning: after the transverseFlightPath.Unit() statement, the
  // transverseFlightPath vector is CHANGED to a UNIT vector.
  double ipError = sqrt( ROOT::Math::Similarity(transverseFlightPath.Unit(),error) );
  return Measurement1D (length, ipError);
}

Member Data Documentation

Definition at line 70 of file TrajectoryStateClosestToBeamLine.h.

Referenced by beamSpot(), and transverseImpactParameter().

Definition at line 69 of file TrajectoryStateClosestToBeamLine.h.

Referenced by beamLinePCA(), and transverseImpactParameter().

Definition at line 67 of file TrajectoryStateClosestToBeamLine.h.

Referenced by isValid().