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, float transverseCurvature, int, const MagneticField *fieldProvider)
const MagneticFieldmagneticField () const
GlobalVector magneticFieldInInverseGeV (const GlobalPoint &x) const
GlobalVector momentum () const
GlobalPoint position () const
float signedInverseMomentum () const
float signedInverseTransverseMomentum () const
float transverseCurvature () const
AlgebraicVector6 vector () const

Private Attributes

float cachedCurvature_
bool hasCurvature_
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 16 of file GlobalTrajectoryParameters.h.


Constructor & Destructor Documentation

GlobalTrajectoryParameters::GlobalTrajectoryParameters ( ) [inline]

Definition at line 19 of file GlobalTrajectoryParameters.h.

                               :
    theField(0), 
    theX(), theP(), 
    cachedCurvature_(0.0),
    theCharge(0),
    hasCurvature_(false)  {}  // 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 29 of file GlobalTrajectoryParameters.h.

                                                                 :
    theField(fieldProvider),
    theX(aX), theP(aP),     
    cachedCurvature_(aCharge),
    theCharge(aCharge),
    hasCurvature_(false) {
  } // we must initialize cache to non-NAN to avoid FPE
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 abs, f, MagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::perp(), theCharge, theField, theP, theX, transverseCurvature(), and PV3DBase< T, PVType, FrameType >::z().

                                                                                           :
  theField(fieldProvider),
  theX(aX), cachedCurvature_(transverseCurvature),  hasCurvature_(true)
{
  float bza = -2.99792458e-3f * theField->inTesla(theX).z();
  float qbpi = bza/(direction.perp()*transverseCurvature);
  theP = direction*std::abs(qbpi);
  theCharge = qbpi > 0.f ? 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 60 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(), HICTrajectoryCorrector::correct(), cms::HICSeedMeasurementEstimator::estimate(), HICTrajectoryBuilder::findCompatibleMeasurements(), cms::HICTkOuterStartingLayerFinder::findForwardLayers(), HICTrajectoryCorrector::findPhiInVertex(), HICMuonUpdator::findPhiInVertex(), cms::DiMuonSeedGeneratorHIC::forwardUpdateSeed(), NuclearTrackCorrector::getNewTrackExtra(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), SeedFromConsecutiveHitsCreator::initialKinematic(), SeedForPhotonConversion1Leg::initialKinematic(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), JacobianCartesianToCurvilinear::JacobianCartesianToCurvilinear(), PerigeeConversions::jacobianCurvilinear2Perigee(), JacobianCurvilinearToCartesian::JacobianCurvilinearToCartesian(), PerigeeConversions::jacobianPerigee2Curvilinear(), FreeTrajectoryState::momentum(), ClosestApproachInRPhi::newTrajectory(), AnalyticalErrorPropagation::operator()(), TwoTrackMinimumDistance::pointsHelixHelix(), SimpleCosmicBONSeeder::pqFromHelixFit(), 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(), SeedForPhotonConversion1Leg::trajectorySeed(), SeedFromConsecutiveHitsCreator::trajectorySeed(), and TwoTrackMinimumDistanceHelixHelix::updateCoeffs().

                                {
    return theP;
  }
GlobalPoint GlobalTrajectoryParameters::position ( void  ) const [inline]

Global position.

Definition at line 53 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(), 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(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), SeedFromConsecutiveHitsCreator::initialKinematic(), SeedForPhotonConversion1Leg::initialKinematic(), RoadSearchTrackCandidateMakerAlgorithm::initialTrajectoryFromTriplet(), PerigeeConversions::jacobianPerigee2Curvilinear(), ClosestApproachInRPhi::newTrajectory(), AnalyticalErrorPropagation::operator()(), TwoTrackMinimumDistance::pointsHelixHelix(), FreeTrajectoryState::position(), 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;
  }
float GlobalTrajectoryParameters::signedInverseMomentum ( ) const [inline]
float GlobalTrajectoryParameters::signedInverseTransverseMomentum ( ) const [inline]

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

Definition at line 81 of file GlobalTrajectoryParameters.h.

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

Referenced by transverseCurvature().

                                                {
    return theCharge/theP.perp();
  }
float 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 18 of file GlobalTrajectoryParameters.cc.

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

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

{
  if unlikely(!hasCurvature_) {
      float bza = -2.99792458e-3f * 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 96 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(), and ThresholdPtTrajectoryFilter::test().

                                  {
    //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());
  }

Member Data Documentation

Definition at line 116 of file GlobalTrajectoryParameters.h.

Referenced by transverseCurvature().

Definition at line 118 of file GlobalTrajectoryParameters.h.

Referenced by transverseCurvature().