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
LocalTrajectoryParameters Class Reference

#include <LocalTrajectoryParameters.h>

Public Member Functions

TrackCharge charge () const
 Charge (-1, 0 or 1) More...
 
double dxdz () const
 
double dydz () const
 
 LocalTrajectoryParameters ()
 
 LocalTrajectoryParameters (const AlgebraicVector &v, double aPzSign, bool charged=true)
 
 LocalTrajectoryParameters (const AlgebraicVector5 &v, double aPzSign, bool charged=true)
 
 LocalTrajectoryParameters (double aQbp, double aDxdz, double aDydz, double aX, double aY, double aPzSign, bool charged=true)
 
 LocalTrajectoryParameters (const LocalPoint &pos, const LocalVector &p, TrackCharge charge)
 Constructor from local position, momentum and charge. More...
 
AlgebraicVector5 mixedFormatVector () const
 
AlgebraicVector mixedFormatVector_old () const
 
LocalVector momentum () const
 Momentum vector in the local frame. More...
 
LocalPoint position () const
 Local x and y position coordinates. More...
 
double pzSign () const
 Sign of the z-component of the momentum in the local frame. More...
 
double qbp () const
 
double signedInverseMomentum () const
 Signed inverse momentum q/p (zero for neutrals). More...
 
bool updateP (double dP)
 Update of momentum by a scalar dP. More...
 
AlgebraicVector5 vector () const
 
AlgebraicVector vector_old () const
 

Private Attributes

TrackCharge theCharge
 charge More...
 
double theDxdz
 tangent of direction in local x vs. z More...
 
double theDydz
 tangent of direction in local y vs. z More...
 
double thePzSign
 sign of local pz More...
 
double theQbp
 q/p (charged) or 1/p (neutral) More...
 
double theX
 local x position More...
 
double theY
 local y position More...
 

Detailed Description

Class providing access to a set of relevant parameters of a trajectory in a local, Cartesian frame. The set consists of the following parameters:

q/p : charged particles: charge (plus or minus one) divided by magnitude of momentum
neutral particles: inverse magnitude of momentum
dxdz : direction tangent in local xz-plane
dydz : direction tangent in local yz-plane
x : local x-coordinate
y : local y-coordinate

In addition, the sign of local p_z is needed to fully define the direction of the track in this local frame.

Definition at line 26 of file LocalTrajectoryParameters.h.

Constructor & Destructor Documentation

LocalTrajectoryParameters::LocalTrajectoryParameters ( )
inline

Definition at line 30 of file LocalTrajectoryParameters.h.

30 {}
LocalTrajectoryParameters::LocalTrajectoryParameters ( const AlgebraicVector v,
double  aPzSign,
bool  charged = true 
)
inline

Constructor from vector of parameters.

Expects a vector of parameters as defined above, plus the sign of p_z. For charged particles the charge will be determined by the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected.

Definition at line 39 of file LocalTrajectoryParameters.h.

References theCharge, theDxdz, theDydz, thePzSign, theQbp, theX, and theY.

39  {
40  theQbp = v[0];
41  theDxdz = v[1];
42  theDydz = v[2];
43  theX = v[3];
44  theY = v[4];
45  thePzSign = aPzSign;
46  if ( charged )
47  theCharge = theQbp>0 ? 1 : -1;
48  else
49  theCharge = 0;
50  }
double theDxdz
tangent of direction in local x vs. z
double thePzSign
sign of local pz
double theDydz
tangent of direction in local y vs. z
double theQbp
q/p (charged) or 1/p (neutral)
mathSSE::Vec4< T > v
LocalTrajectoryParameters::LocalTrajectoryParameters ( const AlgebraicVector5 v,
double  aPzSign,
bool  charged = true 
)
inline

Constructor from vector of parameters.

Expects a vector of parameters as defined above, plus the sign of p_z. For charged particles the charge will be determined by the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected.

Definition at line 59 of file LocalTrajectoryParameters.h.

References theCharge, theDxdz, theDydz, thePzSign, theQbp, theX, and theY.

59  {
60  theQbp = v[0];
61  theDxdz = v[1];
62  theDydz = v[2];
63  theX = v[3];
64  theY = v[4];
65  thePzSign = aPzSign;
66  if ( charged )
67  theCharge = theQbp>0 ? 1 : -1;
68  else
69  theCharge = 0;
70  }
double theDxdz
tangent of direction in local x vs. z
double thePzSign
sign of local pz
double theDydz
tangent of direction in local y vs. z
double theQbp
q/p (charged) or 1/p (neutral)
mathSSE::Vec4< T > v
LocalTrajectoryParameters::LocalTrajectoryParameters ( double  aQbp,
double  aDxdz,
double  aDydz,
double  aX,
double  aY,
double  aPzSign,
bool  charged = true 
)
inline

Constructor from individual parameters.

Expects parameters as defined above, plus the sign of p_z. For charged particles the charge will be determined by the sign of the first argument. For neutral particles the last argument should be false, in which case the charge of the first argument will be neglected.

Definition at line 80 of file LocalTrajectoryParameters.h.

References theCharge, and theQbp.

81  :
82  theDxdz(aDxdz), theDydz(aDydz),
83  theX(aX), theY(aY), thePzSign(aPzSign) {
84  if ( charged ) {
85  theQbp = aQbp;
86  theCharge = theQbp>0 ? 1 : -1;
87  }
88  else {
89  theQbp = aQbp;
90  theCharge = 0;
91  }
92  }
double theDxdz
tangent of direction in local x vs. z
double thePzSign
sign of local pz
double theDydz
tangent of direction in local y vs. z
double theQbp
q/p (charged) or 1/p (neutral)
LocalTrajectoryParameters::LocalTrajectoryParameters ( const LocalPoint pos,
const LocalVector p,
TrackCharge  charge 
)
inline

Constructor from local position, momentum and charge.

Definition at line 95 of file LocalTrajectoryParameters.h.

References PV3DBase< T, PVType, FrameType >::mag(), and theQbp.

96  :
97  theQbp( charge/p.mag()), theDxdz( p.x()/p.z()), theDydz( p.y()/p.z()),
98  theX( pos.x()), theY(pos.y()), thePzSign( p.z()>0. ? 1.:-1.), theCharge(charge) {
99  if ( charge==0 ) theQbp = 1./p.mag();
100  }
T y() const
Definition: PV3DBase.h:57
T mag() const
Definition: PV3DBase.h:61
double theDxdz
tangent of direction in local x vs. z
T z() const
Definition: PV3DBase.h:58
double thePzSign
sign of local pz
TrackCharge charge() const
Charge (-1, 0 or 1)
double theDydz
tangent of direction in local y vs. z
double theQbp
q/p (charged) or 1/p (neutral)
T x() const
Definition: PV3DBase.h:56

Member Function Documentation

TrackCharge LocalTrajectoryParameters::charge ( ) const
inline
double LocalTrajectoryParameters::dxdz ( ) const
inline
double LocalTrajectoryParameters::dydz ( ) const
inline
AlgebraicVector5 LocalTrajectoryParameters::mixedFormatVector ( ) const
inline

Vector of parameters in internal representation.

Vector of parameters as defined above, with the first element = q/p for charged and = 1/p for neutral.

Definition at line 162 of file LocalTrajectoryParameters.h.

References theDxdz, theDydz, theQbp, theX, theY, and v.

Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), PixelCPEBase::computeAnglesFromTrajectory(), TwoBowedSurfacesAlignmentParameters::derivatives(), DualBzeroReferenceTrajectory::extractParameters(), DualReferenceTrajectory::extractParameters(), DualKalmanTrajectory::extractParameters(), DualKalmanTrajectory::fillTrajectoryPositions(), KarimakiAlignmentDerivatives::operator()(), SegmentAlignmentDerivatives4D::operator()(), BowedSurfaceAlignmentDerivatives::operator()(), operator<<(), and ReferenceTrajectory::ReferenceTrajectory().

162  {
164  v[0] = theQbp; // signed in case of charged particles, 1/p for neutrals
165  v[1] = theDxdz;
166  v[2] = theDydz;
167  v[3] = theX;
168  v[4] = theY;
169  return v;
170  }
double theDxdz
tangent of direction in local x vs. z
ROOT::Math::SVector< double, 5 > AlgebraicVector5
double theDydz
tangent of direction in local y vs. z
double theQbp
q/p (charged) or 1/p (neutral)
mathSSE::Vec4< T > v
AlgebraicVector LocalTrajectoryParameters::mixedFormatVector_old ( ) const
inline

Vector of parameters in internal representation.

Vector of parameters as defined above, with the first element = q/p for charged and = 1/p for neutral.

Definition at line 177 of file LocalTrajectoryParameters.h.

References theDxdz, theDydz, theQbp, theX, theY, and v.

177  {
178  AlgebraicVector v(5);
179  v[0] = theQbp; // signed in case of charged particles, 1/p for neutrals
180  v[1] = theDxdz;
181  v[2] = theDydz;
182  v[3] = theX;
183  v[4] = theY;
184  return v;
185  }
double theDxdz
tangent of direction in local x vs. z
CLHEP::HepVector AlgebraicVector
double theDydz
tangent of direction in local y vs. z
double theQbp
q/p (charged) or 1/p (neutral)
mathSSE::Vec4< T > v
LocalVector LocalTrajectoryParameters::momentum ( ) const
inline

Momentum vector in the local frame.

Definition at line 110 of file LocalTrajectoryParameters.h.

References L1TEmulatorMonitor_cff::p, mathSSE::sqrt(), theDxdz, theDydz, thePzSign, and theQbp.

Referenced by SiPixelTrackResidualSource::analyze(), BasicSingleTrajectoryState::checkGlobalParameters(), MuonSeedSimpleCleaner::checkPt(), PixelCPEBase::computeAnglesFromTrajectory(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), display_seed(), SiPixelHitEfficiencyModule::fill(), IsGoodSeed(), JacobianCartesianToLocal::JacobianCartesianToLocal(), JacobianCurvilinearToLocal::JacobianCurvilinearToLocal(), JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(), BasicSingleTrajectoryState::localMomentum(), StripCPEfromTrackAngle::localParameters(), StripCPEgeometric::localParameters(), reco::TrackInfo::localTrackMomentum(), TrackCandidateProducer::produce(), KalmanAlignmentTrackRefitter::refitSingleTracklet(), TrackInfoProducerAlgorithm::run(), and InOutConversionTrackFinder::tracks().

110  {
111  double p = 1./fabs(theQbp);
112  if ( p>1.e9 ) p = 1.e9;
113  double dz = thePzSign/sqrt(1. + theDxdz*theDxdz + theDydz*theDydz);
114  double dx = dz*theDxdz;
115  double dy = dz*theDydz;
116  return LocalVector(dx*p, dy*p, dz*p);
117  }
Local3DVector LocalVector
Definition: LocalVector.h:12
double theDxdz
tangent of direction in local x vs. z
T sqrt(T t)
Definition: SSEVec.h:28
double thePzSign
sign of local pz
double theDydz
tangent of direction in local y vs. z
double theQbp
q/p (charged) or 1/p (neutral)
LocalPoint LocalTrajectoryParameters::position ( ) const
inline
double LocalTrajectoryParameters::pzSign ( ) const
inline
double LocalTrajectoryParameters::qbp ( ) const
inline

Definition at line 202 of file LocalTrajectoryParameters.h.

References theQbp.

Referenced by JacobianLocalToCartesian::JacobianLocalToCartesian(), and MaterialEffectsUpdator::newArguments().

202 { return theQbp;}
double theQbp
q/p (charged) or 1/p (neutral)
double LocalTrajectoryParameters::signedInverseMomentum ( ) const
inline
bool LocalTrajectoryParameters::updateP ( double  dP)
inline

Update of momentum by a scalar dP.

Definition at line 193 of file LocalTrajectoryParameters.h.

References L1TEmulatorMonitor_cff::p, and theQbp.

Referenced by GsfMaterialEffectsUpdator::updateState(), VolumeMaterialEffectsUpdator::updateState(), and MaterialEffectsUpdator::updateStateInPlace().

193  {
194  double p = 1./fabs(theQbp);
195  if ((p += dP) <= 0.) return false;
196  double newQbp = theQbp > 0. ? 1./p : -1./p;
197  theQbp = newQbp;
198  return true;
199  }
double theQbp
q/p (charged) or 1/p (neutral)
AlgebraicVector5 LocalTrajectoryParameters::vector ( ) const
inline

Vector of parameters with signed inverse momentum.

Vector of parameters as defined above, with the first element = q/p .

Definition at line 147 of file LocalTrajectoryParameters.h.

References signedInverseMomentum(), theDxdz, theDydz, theX, theY, and v.

Referenced by GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), CollinearFitAtTM2::CollinearFitAtTM2(), TrajectoryStateCombiner::combine(), GsfTrackProducerBase::computeModeAtTM(), PFGsfHelper::computeQpMode(), GlobalTrackerMuonAlignment::debugTrajectorySOS(), GlobalTrackerMuonAlignment::debugTrajectorySOSv(), Chi2MeasurementEstimatorForTrackerHits::estimate(), CollinearFitAtTM::fit(), StripCPEfromTrackAngle::localParameters(), StripCPEgeometric::localParameters(), GsfTrackProducerBase::localParametersFromQpMode(), GlobalMuonTrackMatcher::match_Chi2(), MeasurementExtractor::measuredParameters(), GlobalTrackerMuonAlignment::misalignMuonL(), TrackCandidateProducer::produce(), TrackAssociatorByPosition::quality(), ChargeSignificanceTrajectoryFilter::TBC(), CkfDebugger::testSeed(), Strip1DMeasurementTransformator::trajectoryParameters(), StripMeasurementTransformator::trajectoryParameters(), Tsos2DPhi::Tsos2DPhi(), Tsos2DZed::Tsos2DZed(), and Tsos4D::Tsos4D().

147  {
149  v[0] = signedInverseMomentum();
150  v[1] = theDxdz;
151  v[2] = theDydz;
152  v[3] = theX;
153  v[4] = theY;
154  return v;
155  }
double theDxdz
tangent of direction in local x vs. z
ROOT::Math::SVector< double, 5 > AlgebraicVector5
double theDydz
tangent of direction in local y vs. z
double signedInverseMomentum() const
Signed inverse momentum q/p (zero for neutrals).
mathSSE::Vec4< T > v
AlgebraicVector LocalTrajectoryParameters::vector_old ( ) const
inline

Vector of parameters with signed inverse momentum.

Vector of parameters as defined above, with the first element = q/p .

Definition at line 132 of file LocalTrajectoryParameters.h.

References signedInverseMomentum(), theDxdz, theDydz, theX, theY, and v.

132  {
133  AlgebraicVector v(5);
134  v[0] = signedInverseMomentum();
135  v[1] = theDxdz;
136  v[2] = theDydz;
137  v[3] = theX;
138  v[4] = theY;
139  return v;
140  }
double theDxdz
tangent of direction in local x vs. z
CLHEP::HepVector AlgebraicVector
double theDydz
tangent of direction in local y vs. z
double signedInverseMomentum() const
Signed inverse momentum q/p (zero for neutrals).
mathSSE::Vec4< T > v

Member Data Documentation

TrackCharge LocalTrajectoryParameters::theCharge
private

charge

Definition at line 216 of file LocalTrajectoryParameters.h.

Referenced by charge(), and LocalTrajectoryParameters().

double LocalTrajectoryParameters::theDxdz
private

tangent of direction in local x vs. z

Definition at line 209 of file LocalTrajectoryParameters.h.

Referenced by dxdz(), LocalTrajectoryParameters(), mixedFormatVector(), mixedFormatVector_old(), momentum(), vector(), and vector_old().

double LocalTrajectoryParameters::theDydz
private

tangent of direction in local y vs. z

Definition at line 210 of file LocalTrajectoryParameters.h.

Referenced by dydz(), LocalTrajectoryParameters(), mixedFormatVector(), mixedFormatVector_old(), momentum(), vector(), and vector_old().

double LocalTrajectoryParameters::thePzSign
private

sign of local pz

Definition at line 214 of file LocalTrajectoryParameters.h.

Referenced by LocalTrajectoryParameters(), momentum(), and pzSign().

double LocalTrajectoryParameters::theQbp
private
double LocalTrajectoryParameters::theX
private
double LocalTrajectoryParameters::theY
private