CMS 3D CMS Logo

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

#include <TrajectoryStateClosestToPoint.h>

Public Member Functions

TrackCharge charge () const
 
bool hasError () const
 
bool isValid () const
 
GlobalVector momentum () const
 
const PerigeeTrajectoryErrorperigeeError () const
 
const PerigeeTrajectoryParametersperigeeParameters () const
 
GlobalPoint position () const
 
double pt () const
 
const GlobalPointreferencePoint () const
 
const FreeTrajectoryStatetheState () const
 
 TrajectoryStateClosestToPoint ()
 parameter dimension More...
 
 TrajectoryStateClosestToPoint (const PerigeeTrajectoryParameters &perigeeParameters, double pt, const GlobalPoint &referencePoint, const MagneticField *field)
 
 TrajectoryStateClosestToPoint (const PerigeeTrajectoryParameters &perigeeParameters, double pt, const PerigeeTrajectoryError &perigeeError, const GlobalPoint &referencePoint, const MagneticField *field)
 

Private Types

typedef FreeTrajectoryState FTS
 
typedef TrajectoryStateOnSurface TSOS
 

Private Member Functions

void calculateFTS () const
 
 TrajectoryStateClosestToPoint (const FTS &originalFTS, const GlobalPoint &referencePoint)
 

Private Attributes

bool errorIsAvailable
 
PerigeeConversions perigeeConversions
 
const MagneticFieldtheField
 
FTS theFTS
 
bool theFTSavailable
 
PerigeeTrajectoryParameters theParameters
 
PerigeeTrajectoryError thePerigeeError
 
double thePt
 
GlobalPoint theRefPoint
 
bool valid
 

Friends

class PerigeeConversions
 
class TrajectoryStateClosestToPointBuilder
 

Detailed Description

Trajectory state defined at a given point on the helix, which is the point of closest approach to the reference point. In addition to the FreeTrajectoryState at that point, it also gives the perigee parameters. This state can also be invalid, e.g. in case the propagation was not successful.

Definition at line 20 of file TrajectoryStateClosestToPoint.h.

Member Typedef Documentation

Definition at line 23 of file TrajectoryStateClosestToPoint.h.

Definition at line 22 of file TrajectoryStateClosestToPoint.h.

Constructor & Destructor Documentation

TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint ( )
inline
TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint ( const PerigeeTrajectoryParameters perigeeParameters,
double  pt,
const GlobalPoint referencePoint,
const MagneticField field 
)

Public constructor, which is used to convert perigee parameters to a FreeTrajectoryState. For the case where no error is provided.

Definition at line 35 of file TrajectoryStateClosestToPoint.cc.

TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint ( const PerigeeTrajectoryParameters perigeeParameters,
double  pt,
const PerigeeTrajectoryError perigeeError,
const GlobalPoint referencePoint,
const MagneticField field 
)

Public constructor, which is used to convert perigee parameters to a FreeTrajectoryState. For the case where an error is provided.

Definition at line 48 of file TrajectoryStateClosestToPoint.cc.

TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint ( const FTS originalFTS,
const GlobalPoint referencePoint 
)
private

Use the appropriate TrajectoryStateClosestToPointBuilder to get access to this constructor

Definition at line 7 of file TrajectoryStateClosestToPoint.cc.

References cms::Exception::category(), errorIsAvailable, cms::Exception::explainSelf(), PerigeeConversions::ftsToPerigeeError(), PerigeeConversions::ftsToPerigeeParameters(), FreeTrajectoryState::hasError(), GlobalTrajectoryParameters::magneticField(), FreeTrajectoryState::parameters(), perigeeConversions, theField, theFTS, theParameters, thePerigeeError, thePt, and valid.

7  :
8  valid(true), theFTS(originalFTS), theFTSavailable(true), theRefPoint(referencePoint)
9 {
10  try {
11  theParameters = perigeeConversions.ftsToPerigeeParameters(originalFTS, referencePoint, thePt);
12  if (theFTS.hasError()) {
14  errorIsAvailable = true;
15  }
16  else {
17  errorIsAvailable = false;
18  }
19  theField = &(originalFTS.parameters().magneticField());
20  } catch (const cms::Exception &ex) {
21  if (ex.category() != "PerigeeConversions") throw;
22  edm::LogWarning("TrajectoryStateClosestToPoint_PerigeeConversions") << "Caught exception " << ex.explainSelf() << ".\n";
23  valid = false;
24  }
25 }
const GlobalTrajectoryParameters & parameters() const
virtual std::string explainSelf() const
Definition: Exception.cc:56
PerigeeTrajectoryParameters ftsToPerigeeParameters(const FTS &originalFTS, const GlobalPoint &referencePoint, double &pt) const
PerigeeTrajectoryError ftsToPerigeeError(const FTS &originalFTS) const
const MagneticField & magneticField() const
PerigeeTrajectoryParameters theParameters
std::string category() const
Definition: Exception.cc:74

Member Function Documentation

void TrajectoryStateClosestToPoint::calculateFTS ( ) const
private

Definition at line 58 of file TrajectoryStateClosestToPoint.cc.

References PerigeeTrajectoryParameters::charge(), PerigeeConversions::curvilinearError(), errorIsAvailable, isValid(), PerigeeConversions::momentumFromPerigee(), perigeeConversions, PerigeeConversions::positionFromPerigee(), theField, theFTS, theFTSavailable, theParameters, thePerigeeError, thePt, and theRefPoint.

Referenced by theState().

59 {
60  if(!isValid()) throw TrajectoryStateException(
61  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
66  if (errorIsAvailable) {
68  } else {
69  theFTS = FTS(gtp);
70  }
71  theFTSavailable = true;
72 }
CurvilinearTrajectoryError curvilinearError(const PerigeeTrajectoryError &perigeeError, const GlobalTrajectoryParameters &gtp) const
GlobalVector momentumFromPerigee(const AlgebraicVector &momentum, const TrackCharge &charge, const GlobalPoint &referencePoint, const MagneticField *field) const
GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters &parameters, const GlobalPoint &referencePoint) const
PerigeeTrajectoryParameters theParameters
TrackCharge TrajectoryStateClosestToPoint::charge ( void  ) const
inline

Definition at line 117 of file TrajectoryStateClosestToPoint.h.

References PerigeeTrajectoryParameters::charge(), isValid(), and theParameters.

Referenced by PhysicsObjectsMonitor::analyze(), and TestOutliers::analyze().

117  {
118  if(!isValid()) throw TrajectoryStateException(
119  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
120  return theParameters.charge();
121  }
PerigeeTrajectoryParameters theParameters
bool TrajectoryStateClosestToPoint::hasError ( void  ) const
inline

tells whether the error of the perigee parameters is available.

Definition at line 137 of file TrajectoryStateClosestToPoint.h.

References errorIsAvailable, and isValid().

Referenced by PerigeeLinearizedTrackState::hasError().

137  {
138  if(!isValid()) throw TrajectoryStateException(
139  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
140  return errorIsAvailable;
141  }
bool TrajectoryStateClosestToPoint::isValid ( void  ) const
inline
GlobalVector TrajectoryStateClosestToPoint::momentum ( ) const
inline

Definition at line 110 of file TrajectoryStateClosestToPoint.h.

References isValid(), PerigeeConversions::momentumFromPerigee(), perigeeConversions, theParameters, thePt, and theRefPoint.

Referenced by PhysicsObjectsMonitor::analyze(), V0Fitter::fitAll(), TwoBodyDecayLinearizationPointFinder::getLinearizationPoint(), and EgammaHLTPixelMatchElectronAlgo::process().

110  {
111  if(!isValid()) throw TrajectoryStateException(
112  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
114  }
GlobalVector momentumFromPerigee(const AlgebraicVector &momentum, const TrackCharge &charge, const GlobalPoint &referencePoint, const MagneticField *field) const
PerigeeTrajectoryParameters theParameters
const PerigeeTrajectoryError& TrajectoryStateClosestToPoint::perigeeError ( ) const
inline

returns the error of the perigee parameters if it is available

Definition at line 90 of file TrajectoryStateClosestToPoint.h.

References errorIsAvailable, isValid(), and thePerigeeError.

Referenced by PerigeeRefittedTrackState::covariance(), VertexFitterResult::fill(), AddTvTrack::getSecondaryVertices(), PerigeeLinearizedTrackState::predictedStateError(), PerigeeLinearizedTrackState::predictedStateMomentumError(), and PerigeeLinearizedTrackState::predictedStateWeight().

90  {
91  if(!isValid()) throw TrajectoryStateException(
92  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
94  "TrajectoryStateClosestToPoint: attempt to access errors when none available");
95  return thePerigeeError;
96  }
const PerigeeTrajectoryParameters& TrajectoryStateClosestToPoint::perigeeParameters ( ) const
inline

returns the perigee parameters at the p.c.a. to the reference point.

Definition at line 69 of file TrajectoryStateClosestToPoint.h.

References isValid(), and theParameters.

Referenced by AddTvTrack::getSecondaryVertices(), PerigeeRefittedTrackState::parameters(), PerigeeLinearizedTrackState::predictedStateMomentumParameters(), and PerigeeLinearizedTrackState::predictedStateParameters().

69  {
70  if(!isValid()) throw TrajectoryStateException(
71  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
72  return theParameters;
73  }
PerigeeTrajectoryParameters theParameters
GlobalPoint TrajectoryStateClosestToPoint::position ( ) const
inline

returns the state defined at the point of closest approach to the reference point.

Definition at line 103 of file TrajectoryStateClosestToPoint.h.

References isValid(), perigeeConversions, PerigeeConversions::positionFromPerigee(), theParameters, and theRefPoint.

Referenced by compEcalEnergySum(), and compHcalEnergySum().

103  {
104  if(!isValid()) throw TrajectoryStateException(
105  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
107  }
GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters &parameters, const GlobalPoint &referencePoint) const
PerigeeTrajectoryParameters theParameters
double TrajectoryStateClosestToPoint::pt ( ) const
inline

returns the transverse momentum magnitude

Definition at line 79 of file TrajectoryStateClosestToPoint.h.

References isValid(), and thePt.

79  {
80  if(!isValid()) throw TrajectoryStateException(
81  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
82  return thePt;
83  }
const GlobalPoint& TrajectoryStateClosestToPoint::referencePoint ( ) const
inline

returns the reference point which used to construct the state. It is thus the point with respect to which the impact parameters are defined.

Definition at line 57 of file TrajectoryStateClosestToPoint.h.

References isValid(), and theRefPoint.

Referenced by PerigeeRefittedTrackState::position().

57  {
58  if(!isValid()) throw TrajectoryStateException(
59  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
60  return theRefPoint;
61  }
const FreeTrajectoryState& TrajectoryStateClosestToPoint::theState ( ) const
inline

Definition at line 124 of file TrajectoryStateClosestToPoint.h.

References calculateFTS(), isValid(), theFTS, and theFTSavailable.

Referenced by ValidationMisalignedTracker::analyze(), PhysicsObjectsMonitor::analyze(), TestOutliers::analyze(), pat::LeptonVertexSignificance::calculate(), PerigeeLinearizedTrackState::computeChargedJacobians(), PerigeeLinearizedTrackState::computeJacobians(), PerigeeLinearizedTrackState::computeNeutralJacobians(), V0Fitter::fitAll(), PerigeeRefittedTrackState::freeTrajectoryState(), TransientTrackKinematicStateBuilder::operator()(), KinematicParticleFactoryFromTransientTrack::particle(), MuonUpdatorAtVertex::propagateToNominalLine(), TrackClassifier::reconstructionInformation(), and PerigeeRefittedTrackState::trajectoryStateOnSurface().

124  {
125  if(!isValid()) throw TrajectoryStateException(
126  "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
128  return theFTS;
129  }

Friends And Related Function Documentation

friend class PerigeeConversions
friend

Definition at line 154 of file TrajectoryStateClosestToPoint.h.

Definition at line 153 of file TrajectoryStateClosestToPoint.h.

Member Data Documentation

bool TrajectoryStateClosestToPoint::errorIsAvailable
private
PerigeeConversions TrajectoryStateClosestToPoint::perigeeConversions
private
const MagneticField* TrajectoryStateClosestToPoint::theField
private

Definition at line 166 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), and TrajectoryStateClosestToPoint().

FTS TrajectoryStateClosestToPoint::theFTS
mutableprivate
bool TrajectoryStateClosestToPoint::theFTSavailable
mutableprivate

Definition at line 169 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), and theState().

PerigeeTrajectoryParameters TrajectoryStateClosestToPoint::theParameters
private
PerigeeTrajectoryError TrajectoryStateClosestToPoint::thePerigeeError
private
double TrajectoryStateClosestToPoint::thePt
private
GlobalPoint TrajectoryStateClosestToPoint::theRefPoint
private

Definition at line 171 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), momentum(), position(), and referencePoint().

bool TrajectoryStateClosestToPoint::valid
private

Definition at line 165 of file TrajectoryStateClosestToPoint.h.

Referenced by isValid(), and TrajectoryStateClosestToPoint().