CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

TrajectoryStateClosestToPoint Class Reference

#include <TrajectoryStateClosestToPoint.h>

List of all members.

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 (const PerigeeTrajectoryParameters &perigeeParameters, double pt, const GlobalPoint &referencePoint, const MagneticField *field)
 TrajectoryStateClosestToPoint ()
 parameter dimension
 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]

parameter dimension

Definition at line 28 of file TrajectoryStateClosestToPoint.h.

                                 :
    valid(false), theFTSavailable(false), errorIsAvailable(false) {}
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.

                                                                 :
    valid(true), theField(field), theFTSavailable(false), theRefPoint(referencePoint), 
    theParameters(perigeeParameters), thePt( pt ), errorIsAvailable(false)
{}
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.

                             :
    valid(true), theField(field), theFTSavailable(false), theRefPoint(referencePoint),
    theParameters(perigeeParameters), thePt( pt ), thePerigeeError(perigeeError),
    errorIsAvailable(true)
    
{}
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.

                                                                                         :
  valid(true), theFTS(originalFTS), theFTSavailable(true), theRefPoint(referencePoint)
{
  try {
      theParameters = perigeeConversions.ftsToPerigeeParameters(originalFTS, referencePoint, thePt);
      if (theFTS.hasError()) {
        thePerigeeError = perigeeConversions.ftsToPerigeeError(originalFTS);
        errorIsAvailable = true;
      } 
      else {
        errorIsAvailable = false;
      }
      theField = &(originalFTS.parameters().magneticField());
  } catch (const cms::Exception &ex) {
      if (ex.category() != "PerigeeConversions") throw;
      edm::LogWarning("TrajectoryStateClosestToPoint_PerigeeConversions") << "Caught exception " << ex.explainSelf() << ".\n";
      valid = false;
  }
}

Member Function Documentation

void TrajectoryStateClosestToPoint::calculateFTS ( ) const [private]
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().

                             {
    if(!isValid()) throw TrajectoryStateException(
        "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
    return theParameters.charge();
  }
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 HLTMuon::analyze(), MatcherUsingTracksAlgorithm::getChi2(), and PerigeeLinearizedTrackState::hasError().

                        {
    if(!isValid()) throw TrajectoryStateException(
        "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
    return errorIsAvailable;
  }
bool TrajectoryStateClosestToPoint::isValid ( void  ) const [inline]
GlobalVector TrajectoryStateClosestToPoint::momentum ( ) const [inline]
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 HLTMuon::analyze(), PerigeeRefittedTrackState::covariance(), VertexFitterResult::fill(), MatcherUsingTracksAlgorithm::getChi2(), PerigeeLinearizedTrackState::predictedStateError(), PerigeeLinearizedTrackState::predictedStateMomentumError(), and PerigeeLinearizedTrackState::predictedStateWeight().

                                                      {
    if(!isValid()) throw TrajectoryStateException(
        "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
    if (!errorIsAvailable) throw TrajectoryStateException(
      "TrajectoryStateClosestToPoint: attempt to access errors when none available");
    return thePerigeeError;
  }
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 HLTMuon::analyze(), MatcherUsingTracksAlgorithm::getChi2(), PerigeeRefittedTrackState::parameters(), PerigeeLinearizedTrackState::predictedStateMomentumParameters(), and PerigeeLinearizedTrackState::predictedStateParameters().

                                                                {
    if(!isValid()) throw TrajectoryStateException(
        "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
    return theParameters;
  }
GlobalPoint TrajectoryStateClosestToPoint::position ( void  ) 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(), compHcalEnergySum(), and MatcherUsingTracksAlgorithm::matchWithPropagation().

                               {
    if(!isValid()) throw TrajectoryStateException(
        "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
    return perigeeConversions.positionFromPerigee(theParameters, theRefPoint);
  }
double TrajectoryStateClosestToPoint::pt ( ) const [inline]

returns the transverse momentum magnitude

Definition at line 79 of file TrajectoryStateClosestToPoint.h.

References isValid(), and thePt.

                    {
    if(!isValid()) throw TrajectoryStateException(
        "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
    return thePt;
  }
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 MatcherUsingTracksAlgorithm::getChi2(), and PerigeeRefittedTrackState::position().

                                             {
    if(!isValid()) throw TrajectoryStateException(
        "TrajectoryStateClosestToPoint is invalid and cannot return any parameters");
    return theRefPoint;
  }
const FreeTrajectoryState& TrajectoryStateClosestToPoint::theState ( ) const [inline]

Friends And Related Function Documentation

friend class PerigeeConversions [friend]

Definition at line 154 of file TrajectoryStateClosestToPoint.h.

friend class TrajectoryStateClosestToPointBuilder [friend]

Definition at line 153 of file TrajectoryStateClosestToPoint.h.


Member Data Documentation

Definition at line 166 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), and TrajectoryStateClosestToPoint().

Definition at line 169 of file TrajectoryStateClosestToPoint.h.

Referenced by calculateFTS(), and theState().

Definition at line 171 of file TrajectoryStateClosestToPoint.h.

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

Definition at line 165 of file TrajectoryStateClosestToPoint.h.

Referenced by isValid(), and TrajectoryStateClosestToPoint().