CMS 3D CMS Logo

Public Member Functions | Private Attributes

LocalTrajectoryParameters Class Reference

#include <LocalTrajectoryParameters.h>

List of all members.

Public Member Functions

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

Private Attributes

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

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 25 of file LocalTrajectoryParameters.h.


Constructor & Destructor Documentation

LocalTrajectoryParameters::LocalTrajectoryParameters ( ) [inline]

Definition at line 29 of file LocalTrajectoryParameters.h.

{}
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 38 of file LocalTrajectoryParameters.h.

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

                                                                                            {
    theQbp  = v[0];
    theDxdz = v[1];
    theDydz = v[2];
    theX    = v[3];
    theY    = v[4];
    thePzSign = aPzSign;
    if ( charged )
      theCharge = theQbp>0 ? 1 : -1;
    else
      theCharge = 0;
  }
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 59 of file LocalTrajectoryParameters.h.

References theCharge, and theQbp.

                                                                                       :
    theDxdz(aDxdz), theDydz(aDydz),
    theX(aX), theY(aY), thePzSign(aPzSign) {
    if ( charged ) {
      theQbp = aQbp;
      theCharge = theQbp>0 ? 1 : -1;
    }
    else {
      theQbp = aQbp;
      theCharge = 0;
    }
  }
LocalTrajectoryParameters::LocalTrajectoryParameters ( const LocalPoint pos,
const LocalVector p,
TrackCharge  charge 
) [inline]

Constructor from local position, momentum and charge.

Definition at line 74 of file LocalTrajectoryParameters.h.

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

                                                 :
    theQbp( charge/p.mag()), theDxdz( p.x()/p.z()), theDydz( p.y()/p.z()), 
    theX( pos.x()), theY(pos.y()), thePzSign( p.z()>0. ? 1.:-1.), theCharge(charge) {
    if ( charge==0 )  theQbp = 1./p.mag();
  }

Member Function Documentation

TrackCharge LocalTrajectoryParameters::charge ( ) const [inline]
double LocalTrajectoryParameters::dxdz ( ) const [inline]
double LocalTrajectoryParameters::dydz ( ) const [inline]
AlgebraicVector5 LocalTrajectoryParameters::mixedFormatVector ( ) const [inline]
LocalVector LocalTrajectoryParameters::momentum ( ) const [inline]
LocalPoint LocalTrajectoryParameters::position ( ) const [inline]
double LocalTrajectoryParameters::pzSign ( ) const [inline]
double LocalTrajectoryParameters::qbp ( ) const [inline]
double LocalTrajectoryParameters::signedInverseMomentum ( ) const [inline]
bool LocalTrajectoryParameters::updateP ( double  dP) [inline]

Update of momentum by a scalar dP.

Definition at line 142 of file LocalTrajectoryParameters.h.

References AlCaHLTBitMon_ParallelJobs::p, and theQbp.

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

                          {
    double p = 1./fabs(theQbp);
    if ((p += dP) <= 0.) return false;
    double newQbp = theQbp > 0. ? 1./p : -1./p;
    theQbp = newQbp;
    return true;
  }
AlgebraicVector5 LocalTrajectoryParameters::vector ( ) const [inline]

Member Data Documentation

charge

Definition at line 165 of file LocalTrajectoryParameters.h.

Referenced by charge(), and LocalTrajectoryParameters().

tangent of direction in local x vs. z

Definition at line 158 of file LocalTrajectoryParameters.h.

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

tangent of direction in local y vs. z

Definition at line 159 of file LocalTrajectoryParameters.h.

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

sign of local pz

Definition at line 163 of file LocalTrajectoryParameters.h.

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

q/p (charged) or 1/p (neutral)

Definition at line 157 of file LocalTrajectoryParameters.h.

Referenced by LocalTrajectoryParameters(), mixedFormatVector(), momentum(), qbp(), signedInverseMomentum(), and updateP().

local x position

Definition at line 160 of file LocalTrajectoryParameters.h.

Referenced by LocalTrajectoryParameters(), mixedFormatVector(), position(), and vector().

local y position

Definition at line 161 of file LocalTrajectoryParameters.h.

Referenced by LocalTrajectoryParameters(), mixedFormatVector(), position(), and vector().