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
 
GlobalVector direction () const
 
 GlobalTrajectoryParameters ()
 
 GlobalTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
 
 GlobalTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider, GlobalVector fieldValue)
 
 GlobalTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &direction, float transverseCurvature, int, const MagneticField *fieldProvider)
 
 GlobalTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &direction, float transverseCurvature, int, const MagneticField *fieldProvider, GlobalVector fieldValue)
 
const MagneticFieldmagneticField () const
 
GlobalVector magneticFieldInInverseGeV (const GlobalPoint &x) const
 
GlobalVector magneticFieldInInverseGeV () const
 
GlobalVector magneticFieldInTesla () const
 
GlobalVector momentum () const
 
GlobalPoint position () const
 
float signedInverseMomentum () const
 
float signedInverseTransverseMomentum () const
 
float transverseCurvature () const
 
AlgebraicVector6 vector () const
 

Private Attributes

GlobalVector cachedMagneticField
 
signed char 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 15 of file GlobalTrajectoryParameters.h.

Constructor & Destructor Documentation

GlobalTrajectoryParameters::GlobalTrajectoryParameters ( )
inline

Definition at line 18 of file GlobalTrajectoryParameters.h.

18  :
19  theField(0),
20  theX(), theP(),
21  theCharge(0)
22  {} // we must initialize cache to non-NAN to avoid FPE
GlobalTrajectoryParameters::GlobalTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge,
const MagneticField fieldProvider 
)

Constructing class from global position, global momentum and charge.

Definition at line 38 of file GlobalTrajectoryParameters.cc.

References cachedMagneticField, MagneticField::inTesla(), theField, and theX.

41  :
42  theField(fieldProvider),
43  theX(aX), theP(aP),
44  theCharge(aCharge)
45 {
47 } // we must initialize cache to non-NAN to avoid FPE
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalTrajectoryParameters::GlobalTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge,
const MagneticField fieldProvider,
GlobalVector  fieldValue 
)

Definition at line 52 of file GlobalTrajectoryParameters.cc.

56  :
57  theField(fieldProvider),
58  theX(aX), theP(aP),
59  cachedMagneticField(fieldValue),
60  theCharge(aCharge)
61  {}
GlobalTrajectoryParameters::GlobalTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector direction,
float  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 5 of file GlobalTrajectoryParameters.cc.

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

8  :
9  theField(fieldProvider),
10  theX(aX)
11 {
13  float bza = -2.99792458e-3f * cachedMagneticField.z();
14  float qbpi = bza/(direction.perp()*transverseCurvature);
15  theP = direction*std::abs(qbpi);
16  theCharge = qbpi > 0.f ? 1 : -1;
17 }
T perp() const
Definition: PV3DBase.h:72
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
GlobalTrajectoryParameters::GlobalTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector direction,
float  transverseCurvature,
int  ,
const MagneticField fieldProvider,
GlobalVector  fieldValue 
)

Definition at line 20 of file GlobalTrajectoryParameters.cc.

References funct::abs(), cachedMagneticField, f, PV3DBase< T, PVType, FrameType >::perp(), theCharge, theP, transverseCurvature(), and PV3DBase< T, PVType, FrameType >::z().

24  :
25  theField(fieldProvider),
26  theX(aX),
27  cachedMagneticField(fieldValue)
28 {
29  float bza = -2.99792458e-3f * cachedMagneticField.z();
30  float qbpi = bza/(direction.perp()*transverseCurvature);
31  theP = direction*std::abs(qbpi);
32  theCharge = qbpi > 0.f ? 1 : -1;
33 }
T perp() const
Definition: PV3DBase.h:72
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]

Member Function Documentation

TrackCharge GlobalTrajectoryParameters::charge ( void  ) const
inline
GlobalVector GlobalTrajectoryParameters::direction ( ) const
inline

Definition at line 71 of file GlobalTrajectoryParameters.h.

References theP, and Vector3DBase< T, FrameTag >::unit().

71  {
72  return theP.unit();
73  }
Vector3DBase unit() const
Definition: Vector3DBase.h:57
const MagneticField& GlobalTrajectoryParameters::magneticField ( ) const
inline
GlobalVector GlobalTrajectoryParameters::magneticFieldInInverseGeV ( const GlobalPoint x) const
GlobalVector GlobalTrajectoryParameters::magneticFieldInInverseGeV ( ) const
inline

Definition at line 122 of file GlobalTrajectoryParameters.h.

References cachedMagneticField, and f.

122  {
123  return 2.99792458e-3f * cachedMagneticField;
124  }
double f[11][100]
GlobalVector GlobalTrajectoryParameters::magneticFieldInTesla ( ) const
inline

Definition at line 126 of file GlobalTrajectoryParameters.h.

References cachedMagneticField.

Referenced by BasicTrajectoryState::update().

126  {
127  return cachedMagneticField;
128  }
GlobalVector GlobalTrajectoryParameters::momentum ( ) const
inline

Global momentum.

Definition at line 67 of file GlobalTrajectoryParameters.h.

References theP.

Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), analyticalErrorPropagation(), MuonTrackLoader::buildTrackExtra(), TwoTrackMinimumDistanceLineLine::calculate(), TkGluedMeasurementDet::checkHitProjection(), VZeroFinder::checkTrackPair(), TkGluedMeasurementDet::collectRecHits(), PixelClusterShapeSeedComparitor::compatible(), StripSubClusterShapeSeedFilter::compatible(), AnalyticalCurvilinearJacobian::computeFullJacobian(), AnalyticalCurvilinearJacobian::computeInfinitesimalJacobian(), AnalyticalCurvilinearJacobian::computeStraightLineJacobian(), NuclearTrackCorrector::getNewTrackExtra(), SeedFromConsecutiveHitsTripletOnlyCreator::initialKinematic(), SeedFromConsecutiveHitsCreator::initialKinematic(), SeedForPhotonConversion1Leg::initialKinematic(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), JacobianCurvilinearToLocal::JacobianCurvilinearToLocal(), PerigeeConversions::jacobianPerigee2Curvilinear(), SeedFromConsecutiveHitsCreator::makeSeed(), FreeTrajectoryState::momentum(), ClosestApproachInRPhi::newTrajectory(), TwoTrackMinimumDistance::pointsHelixHelix(), ConvBremSeedProducer::produce(), TkGluedMeasurementDet::projectOnGluedDet(), AnalyticalPropagator::propagatedStateWithPath(), KfTrackProducerBase::putInEvt(), GsfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), TkGluedMeasurementDet::testStrips(), TangentApproachInRPhi::trajectoryParameters(), SeedForPhotonConversion1Leg::trajectorySeed(), and TwoTrackMinimumDistanceHelixHelix::updateCoeffs().

67  {
68  return theP;
69  }
GlobalPoint GlobalTrajectoryParameters::position ( ) const
inline

Global position.

Definition at line 60 of file GlobalTrajectoryParameters.h.

References theX.

Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), analyticalErrorPropagation(), MuonTrackLoader::buildTrackExtra(), TwoTrackMinimumDistanceHelixHelix::calculate(), TwoTrackMinimumDistanceLineLine::calculate(), TwoTrackMinimumDistance::calculate(), PixelClusterShapeSeedComparitor::compatible(), StripSubClusterShapeSeedFilter::compatible(), PixelHitMatcher::compatibleSeeds(), AnalyticalCurvilinearJacobian::computeFullJacobian(), ConversionForwardEstimator::estimate(), ConversionBarrelEstimator::estimate(), ForwardMeasurementEstimator::estimate(), BarrelMeasurementEstimator::estimate(), AnalyticalImpactPointExtrapolator::extrapolateSingleState(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), TwoTrackMinimumDistanceHelixHelix::finalPoints(), NuclearTrackCorrector::getNewTrackExtra(), SeedFromConsecutiveHitsTripletOnlyCreator::initialKinematic(), SeedFromConsecutiveHitsCreator::initialKinematic(), SeedForPhotonConversion1Leg::initialKinematic(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), ClosestApproachInRPhi::newTrajectory(), TwoTrackMinimumDistance::pointsHelixHelix(), FreeTrajectoryState::position(), ConvBremSeedProducer::produce(), AnalyticalPropagator::propagatedStateWithPath(), TauTagTools::propagTrackECALSurfContactPoint(), KfTrackProducerBase::putInEvt(), GsfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), TangentApproachInRPhi::trajectoryParameters(), and TwoTrackMinimumDistanceHelixHelix::updateCoeffs().

60  {
61  return theX;
62  }
float GlobalTrajectoryParameters::signedInverseMomentum ( ) const
inline
float GlobalTrajectoryParameters::signedInverseTransverseMomentum ( ) const
inline

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

Definition at line 92 of file GlobalTrajectoryParameters.h.

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

Referenced by transverseCurvature().

92  {
93  return theCharge/theP.perp();
94  }
T perp() const
Definition: PV3DBase.h:72
float GlobalTrajectoryParameters::transverseCurvature ( ) const
inline

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 101 of file GlobalTrajectoryParameters.h.

References cachedMagneticField, f, signedInverseTransverseMomentum(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by AnalyticalCurvilinearJacobian::AnalyticalCurvilinearJacobian(), GlobalTrajectoryParameters(), SeedForPhotonConversion1Leg::initialKinematic(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), GeomDetCompatibilityChecker::isCompatible(), PerigeeConversions::jacobianPerigee2Curvilinear(), and FreeTrajectoryState::transverseCurvature().

101  {
102  return -2.99792458e-3f * signedInverseTransverseMomentum() * cachedMagneticField.z();
103  }
T z() const
Definition: PV3DBase.h:64
double f[11][100]
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 109 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<<(), and ThresholdPtTrajectoryFilter::test().

109  {
110  //AlgebraicVector6 v;
111  //v[0] = theX.x();
112  //v[1] = theX.y();
113  //v[2] = theX.z();
114  //v[3] = theP.x();
115  //v[4] = theP.y();
116  //v[5] = theP.z();
117  return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
118  }
T y() const
Definition: PV3DBase.h:63
ROOT::Math::SVector< double, 6 > AlgebraicVector6
T z() const
Definition: PV3DBase.h:64
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

GlobalVector GlobalTrajectoryParameters::cachedMagneticField
private
signed char GlobalTrajectoryParameters::theCharge
private
const MagneticField* GlobalTrajectoryParameters::theField
private
GlobalVector GlobalTrajectoryParameters::theP
private
GlobalPoint GlobalTrajectoryParameters::theX
private

Definition at line 135 of file GlobalTrajectoryParameters.h.

Referenced by GlobalTrajectoryParameters(), position(), and vector().