CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes | Friends
TrajectoryStateClosestToPoint Class Reference

#include <TrajectoryStateClosestToPoint.h>

Public Member Functions

void calculateFTS () const
 
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)
 
 TrajectoryStateClosestToPoint (const FTS &originalFTS, const GlobalPoint &referencePoint)
 

Private Types

typedef FreeTrajectoryState FTS
 
typedef TrajectoryStateOnSurface TSOS
 

Private Attributes

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

Friends

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 18 of file TrajectoryStateClosestToPoint.h.

Member Typedef Documentation

◆ FTS

Definition at line 20 of file TrajectoryStateClosestToPoint.h.

◆ TSOS

Definition at line 19 of file TrajectoryStateClosestToPoint.h.

Constructor & Destructor Documentation

◆ TrajectoryStateClosestToPoint() [1/4]

TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint ( )
inline

◆ TrajectoryStateClosestToPoint() [2/4]

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

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

Definition at line 31 of file TrajectoryStateClosestToPoint.h.

◆ TrajectoryStateClosestToPoint() [3/4]

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

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.h.

53  : theField(field),
56  thePt(pt),
58  valid(true),
59  theFTSavailable(false),
60  errorIsAvailable(true) {}
const PerigeeTrajectoryError & perigeeError() const
const PerigeeTrajectoryParameters & perigeeParameters() const
const GlobalPoint & referencePoint() const
PerigeeTrajectoryParameters theParameters

◆ TrajectoryStateClosestToPoint() [4/4]

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

Use the appropriate TrajectoryStateClosestToPointBuilder to get access to this constructor

Definition at line 6 of file TrajectoryStateClosestToPoint.cc.

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

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

Member Function Documentation

◆ calculateFTS()

void TrajectoryStateClosestToPoint::calculateFTS ( ) const

Definition at line 26 of file TrajectoryStateClosestToPoint.cc.

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

Referenced by theState().

26  {
27  if (!isValid())
28  throw TrajectoryStateException("TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
32  theField);
33  if (errorIsAvailable) {
35  } else {
36  theFTS = FTS(gtp);
37  }
38  theFTSavailable = true;
39 }
GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters &parameters, const GlobalPoint &referencePoint)
GlobalVector momentumFromPerigee(const AlgebraicVector3 &momentum, const TrackCharge &charge, const GlobalPoint &referencePoint, const MagneticField *field)
CurvilinearTrajectoryError curvilinearError(const PerigeeTrajectoryError &perigeeError, const GlobalTrajectoryParameters &gtp)
PerigeeTrajectoryParameters theParameters

◆ charge()

TrackCharge TrajectoryStateClosestToPoint::charge ( void  ) const
inline

◆ hasError()

bool TrajectoryStateClosestToPoint::hasError ( void  ) const
inline

tells whether the error of the perigee parameters is available.

Definition at line 106 of file TrajectoryStateClosestToPoint.h.

References errorIsAvailable.

Referenced by PerigeeLinearizedTrackState::hasError().

◆ isValid()

bool TrajectoryStateClosestToPoint::isValid ( void  ) const
inline

◆ momentum()

GlobalVector TrajectoryStateClosestToPoint::momentum ( ) const
inline

◆ perigeeError()

const PerigeeTrajectoryError& TrajectoryStateClosestToPoint::perigeeError ( ) const
inline

◆ perigeeParameters()

const PerigeeTrajectoryParameters& TrajectoryStateClosestToPoint::perigeeParameters ( ) const
inline

◆ position()

GlobalPoint TrajectoryStateClosestToPoint::position ( ) const
inline

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

Definition at line 90 of file TrajectoryStateClosestToPoint.h.

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

Referenced by PrimaryVertexValidation::analyze(), L1MuonRecoTreeProducer::analyze(), DisappearingMuonsSkimming::getECALIsolation(), and MatcherUsingTracksAlgorithm::matchWithPropagation().

GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters &parameters, const GlobalPoint &referencePoint)
PerigeeTrajectoryParameters theParameters

◆ pt()

double TrajectoryStateClosestToPoint::pt ( ) const
inline

◆ referencePoint()

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 67 of file TrajectoryStateClosestToPoint.h.

References theRefPoint.

Referenced by PerigeeRefittedTrackState::position(), and TrajectoryStateClosestToPoint().

◆ theState()

const FreeTrajectoryState& TrajectoryStateClosestToPoint::theState ( ) const
inline

Friends And Related Function Documentation

◆ TrajectoryStateClosestToPointBuilder

Definition at line 113 of file TrajectoryStateClosestToPoint.h.

Member Data Documentation

◆ errorIsAvailable

bool TrajectoryStateClosestToPoint::errorIsAvailable
private

◆ theField

const MagneticField* TrajectoryStateClosestToPoint::theField
private

Definition at line 125 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), and TrajectoryStateClosestToPoint().

◆ theFTS

FTS TrajectoryStateClosestToPoint::theFTS
mutableprivate

◆ theFTSavailable

bool TrajectoryStateClosestToPoint::theFTSavailable
mutableprivate

Definition at line 134 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), and theState().

◆ theParameters

PerigeeTrajectoryParameters TrajectoryStateClosestToPoint::theParameters
private

◆ thePerigeeError

PerigeeTrajectoryError TrajectoryStateClosestToPoint::thePerigeeError
private

◆ thePt

double TrajectoryStateClosestToPoint::thePt
private

◆ theRefPoint

GlobalPoint TrajectoryStateClosestToPoint::theRefPoint
private

Definition at line 129 of file TrajectoryStateClosestToPoint.h.

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

◆ valid

bool TrajectoryStateClosestToPoint::valid
private

Definition at line 133 of file TrajectoryStateClosestToPoint.h.

Referenced by isValid(), and TrajectoryStateClosestToPoint().