CMS 3D CMS Logo

Public Member Functions | Private Attributes

GlobalTrajectoryParameters Class Reference

#include <GlobalTrajectoryParameters.h>

List of all members.

Public Member Functions

TrackCharge charge () const
 GlobalTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
 GlobalTrajectoryParameters ()
 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.

                               : 
    theX(), theP(), theCharge(0), theField(0),
    hasCurvature_(false), cachedCurvature_(1.0) {} // we must initialize cache to non-NAN to avoid FPE
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.

                                                                 :
    theX(aX), theP(aP), theCharge(aCharge), theField(fieldProvider),
    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().

                                                                                           :
  theX(aX), theField(fieldProvider), hasCurvature_(true), cachedCurvature_(transverseCurvature)
{
  double bza = -2.99792458e-3 * theField->inTesla(theX).z();
  double qbp = transverseCurvature/bza*direction.perp();
  theP = direction*fabs(1./qbp);
  theCharge = qbp > 0. ? 1 : -1;
}

Member Function Documentation

TrackCharge GlobalTrajectoryParameters::charge ( void  ) const [inline]
const MagneticField& GlobalTrajectoryParameters::magneticField ( ) const [inline]
GlobalVector GlobalTrajectoryParameters::magneticFieldInInverseGeV ( const GlobalPoint x) const
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(), GsfTrackProducerBase::putInEvt(), KfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), SeedGeneratorForCosmics::seeds(), TkGluedMeasurementDet::testStrips(), TangentApproachInRPhi::trajectoryParameters(), SeedFromConsecutiveHitsCreator::trajectorySeed(), and TwoTrackMinimumDistanceHelixHelix::updateCoeffs().

                                {
    return theP;
  }
GlobalPoint GlobalTrajectoryParameters::position ( void  ) 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(), TwoTrackMinimumDistance::calculate(), TwoTrackMinimumDistanceLineLine::calculate(), cms::FastMuPropagator::checkfts(), PixelHitMatcher::compatibleSeeds(), AnalyticalCurvilinearJacobian::computeFullJacobian(), convert(), HICTrajectoryCorrector::correct(), ConversionBarrelEstimator::estimate(), cms::HICSeedMeasurementEstimator::estimate(), ForwardMeasurementEstimator::estimate(), ConversionForwardEstimator::estimate(), BarrelMeasurementEstimator::estimate(), AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState(), AnalyticalImpactPointExtrapolator::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(), GsfTrackProducerBase::putInEvt(), KfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), cms::HICTkOuterStartingLayerFinder::startingLayers(), TangentApproachInRPhi::trajectoryParameters(), and TwoTrackMinimumDistanceHelixHelix::updateCoeffs().

                               {
    return theX;
  }
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().

                                                 {
    return theCharge/theP.perp();
  }
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().

{
  if (!hasCurvature_) {
      double bza = -2.99792458e-3 * theField->inTesla(theX).z();
      cachedCurvature_ = bza*signedInverseTransverseMomentum();
      hasCurvature_ = true;
  }
  return cachedCurvature_;
}
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<<(), MinPtTrajectoryFilter::test(), ThresholdPtTrajectoryFilter::test(), and vector_old().

                                  {
    //AlgebraicVector6 v;
    //v[0] = theX.x();
    //v[1] = theX.y();
    //v[2] = theX.z();
    //v[3] = theP.x();
    //v[4] = theP.y();
    //v[5] = theP.z();
    return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
  }
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().

{ return asHepVector(vector());  }

Member Data Documentation

Definition at line 115 of file GlobalTrajectoryParameters.h.

Referenced by transverseCurvature().

Definition at line 115 of file GlobalTrajectoryParameters.h.

Referenced by transverseCurvature().