CMS 3D CMS Logo

BasicSingleTrajectoryState Class Reference

Concrete implementation for the state of one trajectory on a surface. More...

#include <TrackingTools/TrajectoryState/interface/BasicSingleTrajectoryState.h>

Inheritance diagram for BasicSingleTrajectoryState:

BasicTrajectoryState ReferenceCounted

List of all members.

Public Member Functions

 BasicSingleTrajectoryState (const Surface &aSurface)
 construct invalid trajectory state (without parameters)
 BasicSingleTrajectoryState (const LocalTrajectoryParameters &par, const LocalTrajectoryError &err, const Surface &aSurface, const MagneticField *field, double weight)
 Constructor from local parameters, errors and surface.
 BasicSingleTrajectoryState (const LocalTrajectoryParameters &par, const LocalTrajectoryError &err, const Surface &aSurface, const MagneticField *field, const SurfaceSide side=atCenterOfSurface, double weight=1.)
 Constructor from local parameters, errors and surface.
 BasicSingleTrajectoryState (const LocalTrajectoryParameters &par, const Surface &aSurface, const MagneticField *field, const SurfaceSide side=atCenterOfSurface)
 Constructor from local parameters, errors and surface.
 BasicSingleTrajectoryState (const GlobalTrajectoryParameters &par, const CurvilinearTrajectoryError &err, const Surface &aSurface, double weight)
 Constructor from global parameters, errors and surface.
 BasicSingleTrajectoryState (const GlobalTrajectoryParameters &par, const CurvilinearTrajectoryError &err, const Surface &aSurface, const SurfaceSide side=atCenterOfSurface, double weight=1.)
 Constructor from global parameters, errors and surface.
 BasicSingleTrajectoryState (const GlobalTrajectoryParameters &par, const CartesianTrajectoryError &err, const Surface &aSurface, const SurfaceSide side=atCenterOfSurface)
 Constructor from global parameters, errors and surface.
 BasicSingleTrajectoryState (const GlobalTrajectoryParameters &par, const Surface &aSurface, const SurfaceSide side=atCenterOfSurface)
 Constructor from global parameters and surface.
 BasicSingleTrajectoryState (const FreeTrajectoryState &fts, const Surface &aSurface, const SurfaceSide side=atCenterOfSurface)
 Constructor from FTS and surface.
const CartesianTrajectoryErrorcartesianError () const
TrackCharge charge () const
BasicSingleTrajectoryStateclone () const
const CurvilinearTrajectoryErrorcurvilinearError () const
FreeTrajectoryStatefreeTrajectoryState (bool withErrors=true) const
GlobalVector globalDirection () const
GlobalVector globalMomentum () const
const GlobalTrajectoryParametersglobalParameters () const
GlobalPoint globalPosition () const
bool hasError () const
bool isValid () const
LocalVector localDirection () const
const LocalTrajectoryErrorlocalError () const
LocalVector localMomentum () const
const LocalTrajectoryParameterslocalParameters () const
LocalPoint localPosition () const
const MagneticFieldmagneticField () const
void rescaleError (double factor)
double signedInverseMomentum () const
const Surfacesurface () const
virtual SurfaceSide surfaceSide () const
 Position relative to material, defined relative to momentum vector.
double transverseCurvature () const
virtual double weight () const
virtual ~BasicSingleTrajectoryState ()

Private Member Functions

void checkCartesianError () const
void checkCurvilinError () const
void checkGlobalParameters () const
void createLocalError () const
void createLocalErrorFromCartesianError () const
void createLocalErrorFromCurvilinearError () const
void createLocalParameters () const

Private Attributes

bool theCartesianErrorUp2Date
bool theCurvilinErrorUp2Date
const MagneticFieldtheField
DeepCopyPointer
< FreeTrajectoryState
theFreeState
bool theGlobalParamsUp2Date
LocalTrajectoryError theLocalError
bool theLocalErrorValid
LocalTrajectoryParameters theLocalParameters
bool theLocalParametersValid
ConstReferenceCountingPointer
< Surface
theSurfaceP
const SurfaceSide theSurfaceSide
double theWeight


Detailed Description

Concrete implementation for the state of one trajectory on a surface.

Definition at line 23 of file BasicSingleTrajectoryState.h.


Constructor & Destructor Documentation

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const FreeTrajectoryState fts,
const Surface aSurface,
const SurfaceSide  side = atCenterOfSurface 
)

Constructor from FTS and surface.

For surfaces with material the side of the surface should be specified explicitely.

Definition at line 10 of file BasicSingleTrajectoryState.cc.

Referenced by clone().

00012                                                     :
00013   theFreeState( new FreeTrajectoryState(fts)),
00014   theGlobalParamsUp2Date(true),
00015   theCartesianErrorUp2Date(fts.hasCartesianError()),
00016   theCurvilinErrorUp2Date(fts.hasCurvilinearError()),
00017   theLocalParameters(),
00018   theLocalError(),
00019   theLocalParametersValid(false),
00020   theLocalErrorValid(false),
00021   theSurfaceP( &aSurface), theSurfaceSide(side), theWeight(1.),
00022   theField( &fts.parameters().magneticField())
00023 {}    

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const GlobalTrajectoryParameters par,
const Surface aSurface,
const SurfaceSide  side = atCenterOfSurface 
)

Constructor from global parameters and surface.

For surfaces with material the side of the surface should be specified explicitely.

Definition at line 26 of file BasicSingleTrajectoryState.cc.

00028                                                     :
00029   theFreeState( new FreeTrajectoryState(par)),
00030   theGlobalParamsUp2Date(true),
00031   theCartesianErrorUp2Date(false),
00032   theCurvilinErrorUp2Date(false),
00033   theLocalParameters(),
00034   theLocalError(),
00035   theLocalParametersValid(false),
00036   theLocalErrorValid(false),
00037   theSurfaceP( &aSurface), theSurfaceSide(side), theWeight(1.),
00038   theField( &par.magneticField())
00039 {}

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const GlobalTrajectoryParameters par,
const CartesianTrajectoryError err,
const Surface aSurface,
const SurfaceSide  side = atCenterOfSurface 
)

Constructor from global parameters, errors and surface.

For surfaces with material the side of the surface should be specified explicitely.

Definition at line 42 of file BasicSingleTrajectoryState.cc.

00045                                                     :
00046   theFreeState( new FreeTrajectoryState(par, err)),
00047   theGlobalParamsUp2Date(true),
00048   theCartesianErrorUp2Date(true),
00049   theCurvilinErrorUp2Date(false),
00050   theLocalParameters(),
00051   theLocalError(),
00052   theLocalParametersValid(false),
00053   theLocalErrorValid(false),
00054   theSurfaceP( &aSurface), theSurfaceSide(side), theWeight(1.),
00055   theField( &par.magneticField())
00056 {}

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const GlobalTrajectoryParameters par,
const CurvilinearTrajectoryError err,
const Surface aSurface,
const SurfaceSide  side = atCenterOfSurface,
double  weight = 1. 
)

Constructor from global parameters, errors and surface.

For surfaces with material the side of the surface should be specified explicitely. For multi-states the weight should be specified explicitely.

Definition at line 59 of file BasicSingleTrajectoryState.cc.

00063                                            :
00064   theFreeState( new FreeTrajectoryState(par, err)),
00065   theGlobalParamsUp2Date(true),
00066   theCartesianErrorUp2Date(false),
00067   theCurvilinErrorUp2Date(true),
00068   theLocalParameters(),
00069   theLocalError(),
00070   theLocalParametersValid(false),
00071   theLocalErrorValid(false),
00072   theSurfaceP( &aSurface), theSurfaceSide(side), theWeight(weight),
00073   theField( &par.magneticField())
00074 {}

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const GlobalTrajectoryParameters par,
const CurvilinearTrajectoryError err,
const Surface aSurface,
double  weight 
)

Constructor from global parameters, errors and surface.

For multi-states the weight should be specified explicitely. For backward compatibility without specification of the side of the surface.

Definition at line 77 of file BasicSingleTrajectoryState.cc.

00080                                            :
00081   theFreeState( new FreeTrajectoryState(par, err)),
00082   theGlobalParamsUp2Date(true),
00083   theCartesianErrorUp2Date(false),
00084   theCurvilinErrorUp2Date(true),
00085   theLocalParameters(),
00086   theLocalError(),
00087   theLocalParametersValid(false),
00088   theLocalErrorValid(false),
00089   theSurfaceP( &aSurface), theSurfaceSide(SurfaceSideDefinition::atCenterOfSurface), 
00090   theWeight(weight),
00091   theField( &par.magneticField())
00092 {}

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const LocalTrajectoryParameters par,
const Surface aSurface,
const MagneticField field,
const SurfaceSide  side = atCenterOfSurface 
)

Constructor from local parameters, errors and surface.

For surfaces with material the side of the surface should be specified explicitely.

Definition at line 95 of file BasicSingleTrajectoryState.cc.

00098                                                     :
00099   theFreeState(0),
00100   theGlobalParamsUp2Date(false),
00101   theCartesianErrorUp2Date(false),
00102   theCurvilinErrorUp2Date(false),
00103   theLocalParameters(par),
00104   theLocalError(),
00105   theLocalParametersValid(true),
00106   theLocalErrorValid(false),
00107   theSurfaceP( &aSurface), theSurfaceSide(side),
00108   theWeight(1.),
00109   theField(field) 
00110 {}

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const LocalTrajectoryParameters par,
const LocalTrajectoryError err,
const Surface aSurface,
const MagneticField field,
const SurfaceSide  side = atCenterOfSurface,
double  weight = 1. 
)

Constructor from local parameters, errors and surface.

For surfaces with material the side of the surface should be specified explicitely. For multi-states the weight should be specified explicitely.

Definition at line 113 of file BasicSingleTrajectoryState.cc.

00118                                            :
00119   theFreeState(0),
00120   theGlobalParamsUp2Date(false),
00121   theCartesianErrorUp2Date(false),
00122   theCurvilinErrorUp2Date(false),
00123   theLocalParameters(par),
00124   theLocalError(err),
00125   theLocalParametersValid(true),
00126   theLocalErrorValid(true),
00127   theSurfaceP( &aSurface),
00128   theSurfaceSide(side), 
00129   theWeight(weight),
00130   theField(field)
00131 {}

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const LocalTrajectoryParameters par,
const LocalTrajectoryError err,
const Surface aSurface,
const MagneticField field,
double  weight 
)

Constructor from local parameters, errors and surface.

For multi-states the weight should be specified explicitely. For backward compatibility without specification of the side of the surface.

Definition at line 134 of file BasicSingleTrajectoryState.cc.

00138                                            :
00139   theFreeState(0),
00140   theGlobalParamsUp2Date(false),
00141   theCartesianErrorUp2Date(false),
00142   theCurvilinErrorUp2Date(false),
00143   theLocalParameters(par),
00144   theLocalError(err),
00145   theLocalParametersValid(true),
00146   theLocalErrorValid(true),
00147   theSurfaceP( &aSurface), theSurfaceSide(SurfaceSideDefinition::atCenterOfSurface),
00148   theWeight(weight),
00149   theField(field)
00150 {}

BasicSingleTrajectoryState::BasicSingleTrajectoryState ( const Surface aSurface  ) 

construct invalid trajectory state (without parameters)

Definition at line 153 of file BasicSingleTrajectoryState.cc.

00153                                                     :
00154   theFreeState(0),
00155   theGlobalParamsUp2Date(false),
00156   theCartesianErrorUp2Date(false),
00157   theCurvilinErrorUp2Date(false),
00158   theLocalParameters(),
00159   theLocalError(),
00160   theLocalParametersValid(false),
00161   theLocalErrorValid(false),
00162   theSurfaceP( &aSurface), theSurfaceSide(SurfaceSideDefinition::atCenterOfSurface), theWeight(0.),
00163   theField(0)
00164 {}

BasicSingleTrajectoryState::~BasicSingleTrajectoryState (  )  [virtual]

Definition at line 167 of file BasicSingleTrajectoryState.cc.

00167 {}


Member Function Documentation

const CartesianTrajectoryError& BasicSingleTrajectoryState::cartesianError (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 124 of file BasicSingleTrajectoryState.h.

References FreeTrajectoryState::cartesianError(), freeTrajectoryState(), and hasError().

00124                                                          {
00125     if(!hasError()) throw TrajectoryStateException(
00126      "TrajectoryStateOnSurface: attempt to access cartesian errors when none available");
00127     return freeTrajectoryState()->cartesianError();
00128   }

TrackCharge BasicSingleTrajectoryState::charge ( void   )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 115 of file BasicSingleTrajectoryState.h.

References FreeTrajectoryState::charge(), and freeTrajectoryState().

00115                              {
00116     return freeTrajectoryState(false)->charge();
00117   }

void BasicSingleTrajectoryState::checkCartesianError (  )  const [private]

Definition at line 202 of file BasicSingleTrajectoryState.cc.

References createLocalError(), createLocalParameters(), JacobianLocalToCartesian::jacobian(), localParameters(), LocalTrajectoryError::matrix(), surface(), theCartesianErrorUp2Date, theFreeState, theLocalError, theLocalErrorValid, and theLocalParametersValid.

Referenced by freeTrajectoryState().

00202                                                            {
00203   if(!theCartesianErrorUp2Date){
00204     if(!theLocalParametersValid) createLocalParameters();
00205     if(!theLocalErrorValid) createLocalError();
00206     theCartesianErrorUp2Date = true;
00207    
00208     JacobianLocalToCartesian loc2Cart(surface(), localParameters());
00209     const AlgebraicMatrix65& jac = loc2Cart.jacobian();
00210 
00211     const AlgebraicSymMatrix66 &cov = ROOT::Math::Similarity(jac, theLocalError.matrix());
00212     
00213     //theFreeState->setCartesianError( CartesianTrajectoryError(cov) );
00214     theFreeState->setCartesianError( cov );
00215   }
00216 }

void BasicSingleTrajectoryState::checkCurvilinError (  )  const [private]

Definition at line 184 of file BasicSingleTrajectoryState.cc.

References createLocalError(), createLocalParameters(), JacobianLocalToCurvilinear::jacobian(), localParameters(), LocalTrajectoryError::matrix(), surface(), theCurvilinErrorUp2Date, theField, theFreeState, theLocalError, theLocalErrorValid, and theLocalParametersValid.

Referenced by freeTrajectoryState().

00184                                                           {
00185   if(!theCurvilinErrorUp2Date){
00186     if(!theLocalParametersValid) createLocalParameters();
00187     // after createLocalParameters we can be sure theFreeState is not null
00188     if(!theLocalErrorValid) createLocalError();
00189     //    cout<<"!theCurvilinErrorUp2Date: create curviError from local"<<endl;
00190     theCurvilinErrorUp2Date = true;
00191     
00192     JacobianLocalToCurvilinear loc2Curv(surface(), localParameters(), *theField);
00193     const AlgebraicMatrix55& jac = loc2Curv.jacobian();
00194     
00195     const AlgebraicSymMatrix55 &cov = ROOT::Math::Similarity(jac, theLocalError.matrix());
00196 
00197     //theFreeState->setCurvilinearError( CurvilinearTrajectoryError(cov) );
00198     theFreeState->setCurvilinearError( cov );
00199   }
00200 }

void BasicSingleTrajectoryState::checkGlobalParameters (  )  const [private]

Definition at line 169 of file BasicSingleTrajectoryState.cc.

References LocalTrajectoryParameters::charge(), LocalTrajectoryParameters::momentum(), p, LocalTrajectoryParameters::position(), DeepCopyPointer< T >::replaceWith(), surface(), theCartesianErrorUp2Date, theCurvilinErrorUp2Date, theField, theFreeState, theGlobalParamsUp2Date, theLocalParameters, Surface::toGlobal(), and x.

Referenced by freeTrajectoryState().

00169                                                              {
00170   if(!theGlobalParamsUp2Date){
00171     //    cout<<"!theGlobalParamsUp2Date"<<endl;
00172     theGlobalParamsUp2Date = true;
00173     theCurvilinErrorUp2Date = false;
00174     theCartesianErrorUp2Date = false;
00175     // calculate global parameters from local
00176     GlobalPoint  x = surface().toGlobal(theLocalParameters.position());
00177     GlobalVector p = surface().toGlobal(theLocalParameters.momentum());
00178     theFreeState.replaceWith(new FreeTrajectoryState(x, p, 
00179                                                      theLocalParameters.charge(),
00180                                                      theField));
00181   }
00182 }

BasicSingleTrajectoryState* BasicSingleTrajectoryState::clone ( void   )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 187 of file BasicSingleTrajectoryState.h.

References BasicSingleTrajectoryState().

00187                                             {
00188     return new BasicSingleTrajectoryState(*this);
00189   }

void BasicSingleTrajectoryState::createLocalError (  )  const [private]

Definition at line 230 of file BasicSingleTrajectoryState.cc.

References createLocalErrorFromCartesianError(), createLocalErrorFromCurvilinearError(), theFreeState, and theLocalErrorValid.

Referenced by checkCartesianError(), checkCurvilinError(), and localError().

00230                                                         {
00231     if(theFreeState->hasCurvilinearError())
00232       createLocalErrorFromCurvilinearError();
00233     else if(theFreeState->hasCartesianError())
00234       createLocalErrorFromCartesianError();
00235     else
00236       theLocalErrorValid = false;
00237 }

void BasicSingleTrajectoryState::createLocalErrorFromCartesianError (  )  const [private]

Definition at line 253 of file BasicSingleTrajectoryState.cc.

References funct::C, JacobianCartesianToLocal::jacobian(), localParameters(), surface(), theFreeState, theLocalError, and theLocalErrorValid.

Referenced by createLocalError().

00253                                                                      {
00254 
00255   JacobianCartesianToLocal cart2Loc(surface(), localParameters());
00256   const AlgebraicMatrix56& jac = cart2Loc.jacobian();
00257     
00258 
00259   const AlgebraicSymMatrix55 &C = 
00260     ROOT::Math::Similarity(jac, theFreeState->cartesianError().matrix());
00261   theLocalError = LocalTrajectoryError(C);
00262   theLocalErrorValid = true;
00263 }

void BasicSingleTrajectoryState::createLocalErrorFromCurvilinearError (  )  const [private]

Definition at line 240 of file BasicSingleTrajectoryState.cc.

References JacobianCurvilinearToLocal::jacobian(), localParameters(), surface(), theField, theFreeState, theLocalError, and theLocalErrorValid.

Referenced by createLocalError().

00240                                                                        {
00241   
00242   JacobianCurvilinearToLocal curv2Loc(surface(), localParameters(), *theField);
00243   const AlgebraicMatrix55& jac = curv2Loc.jacobian();
00244   
00245   const AlgebraicSymMatrix55 &cov = 
00246     ROOT::Math::Similarity(jac, theFreeState->curvilinearError().matrix());
00247   //    cout<<"Clocal via curvilinear error"<<endl;
00248   theLocalError = LocalTrajectoryError(cov);
00249   theLocalErrorValid = true;
00250 }

void BasicSingleTrajectoryState::createLocalParameters (  )  const [private]

Definition at line 219 of file BasicSingleTrajectoryState.cc.

References PV3DBase< T, PVType, FrameType >::mag(), p, surface(), theFreeState, theLocalParameters, theLocalParametersValid, GloballyPositioned< T >::toLocal(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by checkCartesianError(), checkCurvilinError(), and localParameters().

00219                                                              {
00220   LocalPoint  x = surface().toLocal(theFreeState->position());
00221   LocalVector p = surface().toLocal(theFreeState->momentum());
00222 // believe p.z() never exactly equals 0.
00223   bool isCharged = theFreeState->charge()!=0;
00224   theLocalParameters =
00225     LocalTrajectoryParameters(isCharged?theFreeState->signedInverseMomentum():1./p.mag(),
00226       p.x()/p.z(), p.y()/p.z(), x.x(), x.y(), p.z()>0. ? 1.:-1., isCharged);
00227   theLocalParametersValid = true;
00228 }

const CurvilinearTrajectoryError& BasicSingleTrajectoryState::curvilinearError (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 129 of file BasicSingleTrajectoryState.h.

References FreeTrajectoryState::curvilinearError(), freeTrajectoryState(), and hasError().

00129                                                              {
00130     if(!hasError()) throw TrajectoryStateException(
00131      "TrajectoryStateOnSurface: attempt to access curvilinear errors when none available");
00132     return freeTrajectoryState()->curvilinearError();
00133   }

FreeTrajectoryState* BasicSingleTrajectoryState::freeTrajectoryState ( bool  withErrors = true  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 134 of file BasicSingleTrajectoryState.h.

References checkCartesianError(), checkCurvilinError(), checkGlobalParameters(), hasError(), and isValid().

Referenced by cartesianError(), charge(), curvilinearError(), globalDirection(), globalMomentum(), globalParameters(), globalPosition(), signedInverseMomentum(), and transverseCurvature().

00134                                                                          {
00135     if(!isValid()) throw TrajectoryStateException(
00136       "TrajectoryStateOnSurface is invalid and cannot return any parameters");
00137     checkGlobalParameters();
00138     //if(hasError()) { // let's start like this to see if we alloc less
00139     if(withErrors && hasError()) { // this is the right thing
00140       checkCartesianError();
00141       checkCurvilinError();
00142     }
00143     return &(*theFreeState);
00144   }

GlobalVector BasicSingleTrajectoryState::globalDirection (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 112 of file BasicSingleTrajectoryState.h.

References freeTrajectoryState(), FreeTrajectoryState::momentum(), and Vector3DBase< T, FrameTag >::unit().

00112                                        {
00113     return freeTrajectoryState(false)->momentum().unit();
00114   }  

GlobalVector BasicSingleTrajectoryState::globalMomentum (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 109 of file BasicSingleTrajectoryState.h.

References freeTrajectoryState(), and FreeTrajectoryState::momentum().

00109                                       {
00110     return freeTrajectoryState(false)->momentum();
00111   }

const GlobalTrajectoryParameters& BasicSingleTrajectoryState::globalParameters ( void   )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 103 of file BasicSingleTrajectoryState.h.

References freeTrajectoryState(), and FreeTrajectoryState::parameters().

00103                                                              {
00104     return freeTrajectoryState(false)->parameters();
00105   }

GlobalPoint BasicSingleTrajectoryState::globalPosition (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 106 of file BasicSingleTrajectoryState.h.

References freeTrajectoryState(), and FreeTrajectoryState::position().

00106                                      {
00107     return freeTrajectoryState(false)->position();
00108   }

bool BasicSingleTrajectoryState::hasError ( void   )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 98 of file BasicSingleTrajectoryState.h.

References theFreeState, and theLocalErrorValid.

Referenced by cartesianError(), curvilinearError(), freeTrajectoryState(), localError(), and rescaleError().

00098                         {
00099     return (theFreeState && theFreeState->hasError()) || theLocalErrorValid;
00100   }

bool BasicSingleTrajectoryState::isValid ( void   )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 94 of file BasicSingleTrajectoryState.h.

References theFreeState, and theLocalParametersValid.

Referenced by freeTrajectoryState(), and localParameters().

00094                        {
00095     return theFreeState || theLocalParametersValid;
00096   }

LocalVector BasicSingleTrajectoryState::localDirection (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 162 of file BasicSingleTrajectoryState.h.

References localMomentum(), and Vector3DBase< T, FrameTag >::unit().

00162                                      {
00163     return localMomentum().unit();
00164   }

const LocalTrajectoryError& BasicSingleTrajectoryState::localError (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 165 of file BasicSingleTrajectoryState.h.

References createLocalError(), hasError(), theLocalError, and theLocalErrorValid.

00165                                                  {
00166     if (!hasError()) throw TrajectoryStateException(
00167       "TrajectoryStateOnSurface: attempt to access errors when none available");
00168     if (!theLocalErrorValid)
00169       createLocalError();
00170     return theLocalError;
00171   }

LocalVector BasicSingleTrajectoryState::localMomentum (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 159 of file BasicSingleTrajectoryState.h.

References localParameters(), and LocalTrajectoryParameters::momentum().

Referenced by localDirection().

00159                                     {
00160     return localParameters().momentum();
00161   }

const LocalTrajectoryParameters& BasicSingleTrajectoryState::localParameters (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 149 of file BasicSingleTrajectoryState.h.

References createLocalParameters(), isValid(), theLocalParameters, and theLocalParametersValid.

Referenced by checkCartesianError(), checkCurvilinError(), createLocalErrorFromCartesianError(), createLocalErrorFromCurvilinearError(), localMomentum(), and localPosition().

00149                                                            {
00150     if (!isValid()) throw TrajectoryStateException(
00151       "TrajectoryStateOnSurface is invalid and cannot return any parameters");
00152     if (!theLocalParametersValid)
00153       createLocalParameters();
00154     return theLocalParameters;
00155   }

LocalPoint BasicSingleTrajectoryState::localPosition (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 156 of file BasicSingleTrajectoryState.h.

References localParameters(), and LocalTrajectoryParameters::position().

00156                                    {
00157     return localParameters().position();
00158   }

const MagneticField* BasicSingleTrajectoryState::magneticField (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 146 of file BasicSingleTrajectoryState.h.

References theField.

00146 { return theField; }

void BasicSingleTrajectoryState::rescaleError ( double  factor  )  [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 179 of file BasicSingleTrajectoryState.h.

References hasError(), theFreeState, theLocalError, and theLocalErrorValid.

00179                                    {
00180     if (!hasError()) throw TrajectoryStateException(
00181       "TrajectoryStateOnSurface: attempt to access errors when none available");
00182     if (theLocalErrorValid) theLocalError *= (factor*factor);
00183     if (theFreeState)
00184       theFreeState->rescaleError(factor);
00185   }

double BasicSingleTrajectoryState::signedInverseMomentum (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 118 of file BasicSingleTrajectoryState.h.

References freeTrajectoryState(), and FreeTrajectoryState::signedInverseMomentum().

00118                                        {
00119     return freeTrajectoryState(false)->signedInverseMomentum();
00120   }

const Surface& BasicSingleTrajectoryState::surface (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 173 of file BasicSingleTrajectoryState.h.

References theSurfaceP.

Referenced by checkCartesianError(), checkCurvilinError(), checkGlobalParameters(), createLocalErrorFromCartesianError(), createLocalErrorFromCurvilinearError(), and createLocalParameters().

00173                                  {
00174     return *theSurfaceP;
00175   }

virtual SurfaceSide BasicSingleTrajectoryState::surfaceSide (  )  const [inline, virtual]

Position relative to material, defined relative to momentum vector.

Implements BasicTrajectoryState.

Definition at line 192 of file BasicSingleTrajectoryState.h.

References theSurfaceSide.

00192                                           {
00193     return theSurfaceSide;
00194   }

double BasicSingleTrajectoryState::transverseCurvature (  )  const [inline, virtual]

Implements BasicTrajectoryState.

Definition at line 121 of file BasicSingleTrajectoryState.h.

References freeTrajectoryState(), and FreeTrajectoryState::transverseCurvature().

00121                                      {
00122     return freeTrajectoryState(false)->transverseCurvature();
00123   }

virtual double BasicSingleTrajectoryState::weight (  )  const [inline, virtual]

Reimplemented from BasicTrajectoryState.

Definition at line 177 of file BasicSingleTrajectoryState.h.

References theWeight.

00177 {return theWeight;} 


Member Data Documentation

bool BasicSingleTrajectoryState::theCartesianErrorUp2Date [mutable, private]

Definition at line 215 of file BasicSingleTrajectoryState.h.

Referenced by checkCartesianError(), and checkGlobalParameters().

bool BasicSingleTrajectoryState::theCurvilinErrorUp2Date [mutable, private]

Definition at line 216 of file BasicSingleTrajectoryState.h.

Referenced by checkCurvilinError(), and checkGlobalParameters().

const MagneticField* BasicSingleTrajectoryState::theField [private]

Definition at line 226 of file BasicSingleTrajectoryState.h.

Referenced by checkCurvilinError(), checkGlobalParameters(), createLocalErrorFromCurvilinearError(), and magneticField().

DeepCopyPointer<FreeTrajectoryState> BasicSingleTrajectoryState::theFreeState [mutable, private]

Definition at line 212 of file BasicSingleTrajectoryState.h.

Referenced by checkCartesianError(), checkCurvilinError(), checkGlobalParameters(), createLocalError(), createLocalErrorFromCartesianError(), createLocalErrorFromCurvilinearError(), createLocalParameters(), hasError(), isValid(), and rescaleError().

bool BasicSingleTrajectoryState::theGlobalParamsUp2Date [mutable, private]

Definition at line 214 of file BasicSingleTrajectoryState.h.

Referenced by checkGlobalParameters().

LocalTrajectoryError BasicSingleTrajectoryState::theLocalError [mutable, private]

Definition at line 219 of file BasicSingleTrajectoryState.h.

Referenced by checkCartesianError(), checkCurvilinError(), createLocalErrorFromCartesianError(), createLocalErrorFromCurvilinearError(), localError(), and rescaleError().

bool BasicSingleTrajectoryState::theLocalErrorValid [mutable, private]

Definition at line 221 of file BasicSingleTrajectoryState.h.

Referenced by checkCartesianError(), checkCurvilinError(), createLocalError(), createLocalErrorFromCartesianError(), createLocalErrorFromCurvilinearError(), hasError(), localError(), and rescaleError().

LocalTrajectoryParameters BasicSingleTrajectoryState::theLocalParameters [mutable, private]

Definition at line 218 of file BasicSingleTrajectoryState.h.

Referenced by checkGlobalParameters(), createLocalParameters(), and localParameters().

bool BasicSingleTrajectoryState::theLocalParametersValid [mutable, private]

Definition at line 220 of file BasicSingleTrajectoryState.h.

Referenced by checkCartesianError(), checkCurvilinError(), createLocalParameters(), isValid(), and localParameters().

ConstReferenceCountingPointer<Surface> BasicSingleTrajectoryState::theSurfaceP [private]

Definition at line 223 of file BasicSingleTrajectoryState.h.

Referenced by surface().

const SurfaceSide BasicSingleTrajectoryState::theSurfaceSide [private]

Definition at line 224 of file BasicSingleTrajectoryState.h.

Referenced by surfaceSide().

double BasicSingleTrajectoryState::theWeight [private]

Definition at line 225 of file BasicSingleTrajectoryState.h.

Referenced by weight().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:14:58 2009 for CMSSW by  doxygen 1.5.4