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 AlgebraicVector &v, double aPzSign, bool charged=true)
 LocalTrajectoryParameters (double aQbp, double aDxdz, double aDydz, double aX, double aY, double aPzSign, bool charged=true)
 LocalTrajectoryParameters ()
 LocalTrajectoryParameters (const LocalPoint &pos, const LocalVector &p, TrackCharge charge)
 Constructor from local position, momentum and charge.
 LocalTrajectoryParameters (const AlgebraicVector5 &v, double aPzSign, bool charged=true)
AlgebraicVector5 mixedFormatVector () const
AlgebraicVector mixedFormatVector_old () 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
AlgebraicVector vector_old () 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 26 of file LocalTrajectoryParameters.h.


Constructor & Destructor Documentation

LocalTrajectoryParameters::LocalTrajectoryParameters ( ) [inline]

Definition at line 30 of file LocalTrajectoryParameters.h.

{}
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.

                                                                                           {
    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 ( 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.

                                                                                            {
    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 80 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 95 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]
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.

                                                {
    AlgebraicVector v(5);
    v[0] = theQbp;    // signed in case of charged particles, 1/p for neutrals
    v[1] = theDxdz;
    v[2] = theDydz;
    v[3] = theX;
    v[4] = theY;
    return v;
  }
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 193 of file LocalTrajectoryParameters.h.

References L1TEmulatorMonitor_cff::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]
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.

                                     {
    AlgebraicVector v(5);
    v[0] = signedInverseMomentum();
    v[1] = theDxdz;
    v[2] = theDydz;
    v[3] = theX;
    v[4] = theY;
    return v;
  }

Member Data Documentation

charge

Definition at line 216 of file LocalTrajectoryParameters.h.

Referenced by charge(), and LocalTrajectoryParameters().

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().

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().

sign of local pz

Definition at line 214 of file LocalTrajectoryParameters.h.

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