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 Attributes
GlobalTrajectoryParameters Class Reference

#include <GlobalTrajectoryParameters.h>

Public Member Functions

TrackCharge charge () const
 
 GlobalTrajectoryParameters ()
 
 GlobalTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
 
 GlobalTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &direction, double transverseCurvature, int, const MagneticField *fieldProvider)
 
const MagneticFieldmagneticField () const
 
GlobalVector magneticFieldInInverseGeV (const GlobalPoint &x) const
 
GlobalVector momentum () const
 
GlobalPoint position () const
 
double signedInverseMomentum () const
 
double signedInverseTransverseMomentum () const
 
double transverseCurvature () const
 
AlgebraicVector6 vector () const
 
AlgebraicVector vector_old () const
 

Private Attributes

double cachedCurvature_
 
bool hasCurvature_
 
TrackCharge theCharge
 
const MagneticFieldtheField
 
GlobalVector theP
 
GlobalPoint theX
 

Detailed Description

Class providing access to a set of relevant parameters of a trajectory in the global, Cartesian frame. The basic data members used to calculate these parameters are the charge and global position and momentum.

Definition at line 16 of file GlobalTrajectoryParameters.h.

Constructor & Destructor Documentation

GlobalTrajectoryParameters::GlobalTrajectoryParameters ( )
inline

Definition at line 19 of file GlobalTrajectoryParameters.h.

GlobalTrajectoryParameters::GlobalTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge,
const MagneticField fieldProvider 
)
inline

Constructing class from global position, global momentum and charge.

Definition at line 26 of file GlobalTrajectoryParameters.h.

29  :
30  theX(aX), theP(aP), theCharge(aCharge), theField(fieldProvider),
31  hasCurvature_(false), cachedCurvature_(1.0) {} // we must initialize cache to non-NAN to avoid FPE
GlobalTrajectoryParameters::GlobalTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector direction,
double  transverseCurvature,
int  ,
const MagneticField fieldProvider 
)

Constructing class from global position, direction (unit length) and transverse curvature. The fourth int argument is dummy, it serves only to distinguish this constructor from the one above.

Definition at line 4 of file GlobalTrajectoryParameters.cc.

References MagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::perp(), theCharge, theField, theP, theX, and PV3DBase< T, PVType, FrameType >::z().

7  :
9 {
10  double bza = -2.99792458e-3 * theField->inTesla(theX).z();
11  double qbp = transverseCurvature/bza*direction.perp();
12  theP = direction*fabs(1./qbp);
13  theCharge = qbp > 0. ? 1 : -1;
14 }
T perp() const
Definition: PV3DBase.h:66
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
T z() const
Definition: PV3DBase.h:58

Member Function Documentation

TrackCharge GlobalTrajectoryParameters::charge ( void  ) const
inline
const MagneticField& GlobalTrajectoryParameters::magneticField ( ) const
inline
GlobalVector GlobalTrajectoryParameters::magneticFieldInInverseGeV ( const GlobalPoint x) const

Definition at line 26 of file GlobalTrajectoryParameters.cc.

References MagneticField::inTesla(), and theField.

Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), AnalyticalCurvilinearJacobian::AnalyticalCurvilinearJacobian(), AnalyticalErrorPropagation::operator()(), operator<<(), and FreeTrajectoryState::rescaleError().

27 {
28  return 2.99792458e-3 * theField->inTesla(x);
29 }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
GlobalVector GlobalTrajectoryParameters::momentum ( ) const
inline

Global momentum.

Definition at line 54 of file GlobalTrajectoryParameters.h.

References theP.

Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), cms::DiMuonSeedGeneratorHIC::barrelUpdateSeed(), MuonTrackLoader::buildTrackExtra(), TwoTrackMinimumDistanceLineLine::calculate(), VZeroFinder::checkTrackPair(), TkGluedMeasurementDet::collectRecHits(), AnalyticalCurvilinearJacobian::computeFullJacobian(), AnalyticalCurvilinearJacobian::computeInfinitesimalJacobian(), AnalyticalCurvilinearJacobian::computeStraightLineJacobian(), convert(), HICTrajectoryCorrector::correct(), cms::HICSeedMeasurementEstimator::estimate(), HICTrajectoryBuilder::findCompatibleMeasurements(), cms::HICTkOuterStartingLayerFinder::findForwardLayers(), HICTrajectoryCorrector::findPhiInVertex(), HICMuonUpdator::findPhiInVertex(), cms::DiMuonSeedGeneratorHIC::forwardUpdateSeed(), NuclearTrackCorrector::getNewTrackExtra(), SeedFromConsecutiveHitsCreator::initialKinematic(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), JacobianCartesianToCurvilinear::JacobianCartesianToCurvilinear(), PerigeeConversions::jacobianCurvilinear2Perigee(), JacobianCurvilinearToCartesian::JacobianCurvilinearToCartesian(), PerigeeConversions::jacobianPerigee2Curvilinear(), FreeTrajectoryState::momentum(), ClosestApproachInRPhi::newTrajectory(), AnalyticalErrorPropagation::operator()(), TwoTrackMinimumDistance::pointsHelixHelix(), SimpleCosmicBONSeeder::pqFromHelixFit(), SoftConversionProducer::produce(), ConvBremSeedProducer::produce(), TrackingRecHitProjector< ResultingHit >::project(), cms::HICMuonPropagator::propagate(), cms::FastMuPropagator::propagate(), AnalyticalPropagator::propagatedStateWithPath(), KfTrackProducerBase::putInEvt(), GsfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), SeedGeneratorForCosmics::seeds(), TkGluedMeasurementDet::testStrips(), TangentApproachInRPhi::trajectoryParameters(), SeedFromConsecutiveHitsCreator::trajectorySeed(), and TwoTrackMinimumDistanceHelixHelix::updateCoeffs().

54  {
55  return theP;
56  }
GlobalPoint GlobalTrajectoryParameters::position ( ) const
inline

Global position.

Definition at line 47 of file GlobalTrajectoryParameters.h.

References theX.

Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), AnalyticalCurvilinearJacobian::AnalyticalCurvilinearJacobian(), cms::DiMuonSeedGeneratorHIC::barrelUpdateSeed(), MuonTrackLoader::buildTrackExtra(), TwoTrackMinimumDistanceHelixHelix::calculate(), TwoTrackMinimumDistanceLineLine::calculate(), TwoTrackMinimumDistance::calculate(), cms::FastMuPropagator::checkfts(), PixelHitMatcher::compatibleSeeds(), AnalyticalCurvilinearJacobian::computeFullJacobian(), convert(), HICTrajectoryCorrector::correct(), cms::HICSeedMeasurementEstimator::estimate(), ConversionForwardEstimator::estimate(), ConversionBarrelEstimator::estimate(), ForwardMeasurementEstimator::estimate(), BarrelMeasurementEstimator::estimate(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), TwoTrackMinimumDistanceHelixHelix::finalPoints(), HICTrajectoryBuilder::findCompatibleMeasurements(), cms::HICTkOuterStartingLayerFinder::findForwardLayers(), HICTrajectoryCorrector::findPhiInVertex(), HICMuonUpdator::findPhiInVertex(), cms::DiMuonSeedGeneratorHIC::forwardUpdateSeed(), NuclearTrackCorrector::getNewTrackExtra(), SeedFromConsecutiveHitsCreator::initialKinematic(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), PerigeeConversions::jacobianPerigee2Curvilinear(), ClosestApproachInRPhi::newTrajectory(), AnalyticalErrorPropagation::operator()(), TwoTrackMinimumDistance::pointsHelixHelix(), FreeTrajectoryState::position(), SoftConversionProducer::produce(), ConvBremSeedProducer::produce(), cms::HICMuonPropagator::propagate(), cms::FastMuPropagator::propagate(), AnalyticalPropagator::propagatedStateWithPath(), TauTagTools::propagTrackECALSurfContactPoint(), KfTrackProducerBase::putInEvt(), GsfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), cms::HICTkOuterStartingLayerFinder::startingLayers(), TangentApproachInRPhi::trajectoryParameters(), and TwoTrackMinimumDistanceHelixHelix::updateCoeffs().

47  {
48  return theX;
49  }
double GlobalTrajectoryParameters::signedInverseMomentum ( ) const
inline
double GlobalTrajectoryParameters::signedInverseTransverseMomentum ( ) const
inline

Charge divided by transverse momentum, i.e. q/p_T.

Definition at line 75 of file GlobalTrajectoryParameters.h.

References PV3DBase< T, PVType, FrameType >::perp(), theCharge, and theP.

Referenced by transverseCurvature().

75  {
76  return theCharge/theP.perp();
77  }
T perp() const
Definition: PV3DBase.h:66
double GlobalTrajectoryParameters::transverseCurvature ( ) const

Transverse curvature kappa (which is the inverse radius of curvature in the transverse plane) in cm^{-1}. Sign convention is such that positive kappa means counterclockwise rotation of the track with respect to the global z-axis.

Definition at line 16 of file GlobalTrajectoryParameters.cc.

References cachedCurvature_, hasCurvature_, MagneticField::inTesla(), signedInverseTransverseMomentum(), theField, theX, and PV3DBase< T, PVType, FrameType >::z().

Referenced by AnalyticalCurvilinearJacobian::AnalyticalCurvilinearJacobian(), PerigeeConversions::jacobianPerigee2Curvilinear(), and FreeTrajectoryState::transverseCurvature().

17 {
18  if (!hasCurvature_) {
19  double bza = -2.99792458e-3 * theField->inTesla(theX).z();
21  hasCurvature_ = true;
22  }
23  return cachedCurvature_;
24 }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
T z() const
Definition: PV3DBase.h:58
AlgebraicVector6 GlobalTrajectoryParameters::vector ( ) const
inline

Vector whose first three elements are the global position coordinates and whose last three elements are the global momentum coordinates.

Definition at line 90 of file GlobalTrajectoryParameters.h.

References theP, theX, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by GlobalTrackerMuonAlignment::debugTrajectorySOS(), GlobalTrackerMuonAlignment::debugTrajectorySOSv(), operator<<(), ThresholdPtTrajectoryFilter::test(), MinPtTrajectoryFilter::test(), and vector_old().

90  {
91  //AlgebraicVector6 v;
92  //v[0] = theX.x();
93  //v[1] = theX.y();
94  //v[2] = theX.z();
95  //v[3] = theP.x();
96  //v[4] = theP.y();
97  //v[5] = theP.z();
98  return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
99  }
T y() const
Definition: PV3DBase.h:57
ROOT::Math::SVector< double, 6 > AlgebraicVector6
T z() const
Definition: PV3DBase.h:58
T x() const
Definition: PV3DBase.h:56
AlgebraicVector GlobalTrajectoryParameters::vector_old ( ) const
inline

Vector whose first three elements are the global position coordinates and whose last three elements are the global momentum coordinates.

Definition at line 105 of file GlobalTrajectoryParameters.h.

References asHepVector(), and vector().

105 { return asHepVector(vector()); }
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:43
AlgebraicVector6 vector() const

Member Data Documentation

double GlobalTrajectoryParameters::cachedCurvature_
mutableprivate

Definition at line 115 of file GlobalTrajectoryParameters.h.

Referenced by transverseCurvature().

bool GlobalTrajectoryParameters::hasCurvature_
mutableprivate

Definition at line 115 of file GlobalTrajectoryParameters.h.

Referenced by transverseCurvature().

TrackCharge GlobalTrajectoryParameters::theCharge
private
const MagneticField* GlobalTrajectoryParameters::theField
private
GlobalVector GlobalTrajectoryParameters::theP
private
GlobalPoint GlobalTrajectoryParameters::theX
private