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

Definition at line 21 of file TrajectoryStateClosestToPoint.h.

Definition at line 20 of file TrajectoryStateClosestToPoint.h.

Constructor & Destructor Documentation

TrajectoryStateClosestToPoint::TrajectoryStateClosestToPoint ( )
inline
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 34 of file TrajectoryStateClosestToPoint.h.

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

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

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(), theField, theFTS, theParameters, thePerigeeError, thePt, and valid.

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

Member Function Documentation

void TrajectoryStateClosestToPoint::calculateFTS ( ) const

Definition at line 28 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().

28  {
29  if(!isValid()) throw TrajectoryStateException("TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
34  if (errorIsAvailable) {
36  } else {
37  theFTS = FTS(gtp);
38  }
39  theFTSavailable = true;
40 }
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
TrackCharge TrajectoryStateClosestToPoint::charge ( void  ) const
inline
bool TrajectoryStateClosestToPoint::hasError ( void  ) const
inline

tells whether the error of the perigee parameters is available.

Definition at line 116 of file TrajectoryStateClosestToPoint.h.

References errorIsAvailable.

Referenced by HLTMuon::analyze(), MatcherUsingTracksAlgorithm::getChi2(), and PerigeeLinearizedTrackState::hasError().

116  {
117  return errorIsAvailable;
118  }
bool TrajectoryStateClosestToPoint::isValid ( void  ) const
inline
GlobalVector TrajectoryStateClosestToPoint::momentum ( ) const
inline
const PerigeeTrajectoryError& TrajectoryStateClosestToPoint::perigeeError ( ) const
inline
const PerigeeTrajectoryParameters& TrajectoryStateClosestToPoint::perigeeParameters ( ) const
inline
GlobalPoint TrajectoryStateClosestToPoint::position ( ) const
inline

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

Definition at line 91 of file TrajectoryStateClosestToPoint.h.

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

Referenced by compEcalEnergySum(), compHcalEnergySum(), tauImpactParameter::ParticleBuilder::createTrackParticle(), MatcherUsingTracksAlgorithm::matchWithPropagation(), and PFTauTransverseImpactParameters::produce().

91  {
93  }
GlobalPoint positionFromPerigee(const PerigeeTrajectoryParameters &parameters, const GlobalPoint &referencePoint)
PerigeeTrajectoryParameters theParameters
double TrajectoryStateClosestToPoint::pt ( ) const
inline

returns the transverse momentum magnitude

Definition at line 75 of file TrajectoryStateClosestToPoint.h.

References thePt.

Referenced by PerigeeLinearizedTrackState::computeChargedJacobians(), and reco::modules::DuplicateTrackMerger::produce().

75  {
76  return thePt;
77  }
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 59 of file TrajectoryStateClosestToPoint.h.

References theRefPoint.

Referenced by MatcherUsingTracksAlgorithm::getChi2(), and PerigeeRefittedTrackState::position().

59  {
60  return theRefPoint;
61  }
const FreeTrajectoryState& TrajectoryStateClosestToPoint::theState ( ) const
inline

Friends And Related Function Documentation

Definition at line 129 of file TrajectoryStateClosestToPoint.h.

Member Data Documentation

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

Definition at line 142 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), and TrajectoryStateClosestToPoint().

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

Definition at line 151 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 146 of file TrajectoryStateClosestToPoint.h.

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

bool TrajectoryStateClosestToPoint::valid
private

Definition at line 150 of file TrajectoryStateClosestToPoint.h.

Referenced by isValid(), and TrajectoryStateClosestToPoint().