CMS 3D CMS Logo

ReferenceTrajectoryBase Class Reference

Author : Gero Flucke (based on code for ORCA by Edmund Widl) date : 2006/09/17 last update:
Date
2008/07/10 15:24:35
by :
Author
ewidl
. More...

#include <Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h>

Inheritance diagram for ReferenceTrajectoryBase:

ReferenceCounted DualReferenceTrajectory ReferenceTrajectory TwoBodyDecayTrajectory DualBzeroReferenceTrajectory BzeroReferenceTrajectory

List of all members.

Public Types

enum  MaterialEffects { none, multipleScattering, energyLoss, combined }
typedef
ReferenceCountingPointer
< ReferenceTrajectoryBase
ReferenceTrajectoryPtr

Public Member Functions

virtual ReferenceTrajectoryBaseclone () const =0
const AlgebraicMatrixderivatives () const
 Returns the derivatives of the local coordinates of the reference trajectory (i.e.
bool isValid ()
const AlgebraicSymMatrixmeasurementErrors () const
 Returns the full covariance matrix of the measurements.
const AlgebraicVectormeasurements () const
 Returns the measurements in local coordinates.
int numberOfHits () const
const AlgebraicSymMatrixparameterErrors () const
 Returns the covariance matrix of the 'track'-parameters.
bool parameterErrorsAvailable () const
 Returns true if the covariance matrix of the 'track'-parameters is set.
const AlgebraicVectorparameters () const
 Returns the set of 'track'-parameters.
const
TransientTrackingRecHit::ConstRecHitContainer
recHits () const
 Returns the TransientTrackingRecHits (as ConstRecHitPointer's), order might depend on concrete implementation of inheriting class.
void setParameterErrors (const AlgebraicSymMatrix &error)
 Set the covariance matrix of the 'track'-parameters.
const AlgebraicSymMatrixtrajectoryPositionErrors () const
 Returns the covariance matrix of the reference trajectory.
const AlgebraicVectortrajectoryPositions () const
 Returns the local coordinates of the reference trajectory.
const std::vector
< TrajectoryStateOnSurface > & 
trajectoryStates () const
 Returns the Tsos at the surfaces of the hits, parallel to recHits().
virtual ~ReferenceTrajectoryBase ()

Protected Member Functions

unsigned int numberOfUsedRecHits (const TransientTrackingRecHit::ConstRecHitContainer &recHits) const
 ReferenceTrajectoryBase (unsigned int nPar=0, unsigned int nHits=0)
bool useRecHit (const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const

Protected Attributes

AlgebraicMatrix theDerivatives
AlgebraicVector theMeasurements
AlgebraicSymMatrix theMeasurementsCov
unsigned int theNumberOfHits
bool theParamCovFlag
AlgebraicSymMatrix theParameterCov
AlgebraicVector theParameters
TransientTrackingRecHit::ConstRecHitContainer theRecHits
AlgebraicSymMatrix theTrajectoryPositionCov
AlgebraicVector theTrajectoryPositions
std::vector
< TrajectoryStateOnSurface
theTsosVec
bool theValidityFlag

Static Protected Attributes

static const unsigned int nMeasPerHit = 2


Detailed Description

Author : Gero Flucke (based on code for ORCA by Edmund Widl) date : 2006/09/17 last update:
Date
2008/07/10 15:24:35
by :
Author
ewidl
.

Base class for reference 'trajectories' of single- or multiparticles stated. Inheriting classes have to calculate all relevant quantities accessed through member functions of this base class:

The local measured x/y coordinates on all crossed detectors as vector:

m = (x1, y1, x2, y2, ..., xN, yN) [transposed vector shown]

their covariance matrix (possibly containing correlations between hits due to material effects which are not taken into account by the ideal trajectory parametrisation, cf. below),

similarly the local x/y cordinates of the reference trajectory with covariance,

the parameters of the (ideal) 'trajectory' (e.g. 5 values for a single track or 9 for a two-track-state with vertex constraint),

the derivatives of the local coordinates of the reference trajectory with respect to the initial 'trajectory'-parameters, e.g. for n parameters 'p' and N hits with 'x/y' coordinates:

D = ( dx1/dp1, dx1/dp2, ..., dx1/dpn,

dy1/dp1, dy1/dp2, ..., dy1/dpn,

dx2/dp1, dx2/dp2, ..., dx2/dpn,

dy2/dp1, dy2/dp2, ..., dy2/dpn,

. . .

. . .

dxN/dp1, dxN/dp2, ..., dxN/dpn,

dyN/dp1, dyN/dp2, ..., dyN/dpn )

and finally the TrajectoryStateOnSurface's of the reference trajectory.

Take care to check validity of the calculation (isValid()) before using the results.

Definition at line 64 of file ReferenceTrajectoryBase.h.


Member Typedef Documentation

typedef ReferenceCountingPointer<ReferenceTrajectoryBase> ReferenceTrajectoryBase::ReferenceTrajectoryPtr

Definition at line 69 of file ReferenceTrajectoryBase.h.


Member Enumeration Documentation

enum ReferenceTrajectoryBase::MaterialEffects

Enumerator:
none 
multipleScattering 
energyLoss 
combined 

Definition at line 71 of file ReferenceTrajectoryBase.h.


Constructor & Destructor Documentation

virtual ReferenceTrajectoryBase::~ReferenceTrajectoryBase (  )  [inline, virtual]

Definition at line 73 of file ReferenceTrajectoryBase.h.

00073 {}

ReferenceTrajectoryBase::ReferenceTrajectoryBase ( unsigned int  nPar = 0,
unsigned int  nHits = 0 
) [explicit, protected]

Definition at line 3 of file ReferenceTrajectoryBase.cc.

References theRecHits, and theTsosVec.

00004   : theValidityFlag(false), theParamCovFlag(false),
00005     theNumberOfHits( nHits ),
00006     theTsosVec(), theRecHits(),
00007     theMeasurements(nMeasPerHit * nHits), theMeasurementsCov(nMeasPerHit * nHits, 0),
00008     theTrajectoryPositions(nMeasPerHit * nHits), 
00009     theTrajectoryPositionCov(nMeasPerHit * nHits,0),
00010     theParameters(nPar), theParameterCov(nPar, 0),
00011     theDerivatives(nMeasPerHit * nHits, nPar, 0) 
00012 {
00013   theTsosVec.reserve(nHits);
00014   theRecHits.reserve(nHits);
00015 }


Member Function Documentation

virtual ReferenceTrajectoryBase* ReferenceTrajectoryBase::clone (  )  const [pure virtual]

Implemented in BzeroReferenceTrajectory, DualBzeroReferenceTrajectory, DualReferenceTrajectory, ReferenceTrajectory, and TwoBodyDecayTrajectory.

const AlgebraicMatrix& ReferenceTrajectoryBase::derivatives ( void   )  const [inline]

Returns the derivatives of the local coordinates of the reference trajectory (i.e.

trajectoryPositions) w.r.t. the initial 'trajectory'-parameters.

Definition at line 97 of file ReferenceTrajectoryBase.h.

References theDerivatives.

Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().

00097 { return theDerivatives; }

bool ReferenceTrajectoryBase::isValid ( void   )  [inline]

Definition at line 75 of file ReferenceTrajectoryBase.h.

References theValidityFlag.

Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().

00075 { return theValidityFlag; }

const AlgebraicSymMatrix& ReferenceTrajectoryBase::measurementErrors (  )  const [inline]

Returns the full covariance matrix of the measurements.

ORCA-equivalent: covariance()

Definition at line 83 of file ReferenceTrajectoryBase.h.

References theMeasurementsCov.

Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().

00083 { return theMeasurementsCov; }

const AlgebraicVector& ReferenceTrajectoryBase::measurements (  )  const [inline]

Returns the measurements in local coordinates.

Definition at line 79 of file ReferenceTrajectoryBase.h.

References theMeasurements.

Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().

00079 { return theMeasurements; }

int ReferenceTrajectoryBase::numberOfHits ( void   )  const [inline]

Definition at line 124 of file ReferenceTrajectoryBase.h.

References theNumberOfHits.

Referenced by DualReferenceTrajectory::construct().

00124 { return theNumberOfHits; }

unsigned int ReferenceTrajectoryBase::numberOfUsedRecHits ( const TransientTrackingRecHit::ConstRecHitContainer recHits  )  const [protected]

Definition at line 19 of file ReferenceTrajectoryBase.cc.

References useRecHit().

00020 {
00021   unsigned int nUsedHits = 0;
00022   TransientTrackingRecHit::ConstRecHitContainer::const_iterator itHit;
00023   for ( itHit = recHits.begin(); itHit != recHits.end(); ++itHit ) if ( useRecHit( *itHit ) ) ++nUsedHits;
00024   return nUsedHits;
00025 }

const AlgebraicSymMatrix& ReferenceTrajectoryBase::parameterErrors (  )  const [inline]

Returns the covariance matrix of the 'track'-parameters.

Definition at line 113 of file ReferenceTrajectoryBase.h.

References theParameterCov.

00113 { return theParameterCov; }

bool ReferenceTrajectoryBase::parameterErrorsAvailable (  )  const [inline]

Returns true if the covariance matrix of the 'track'-parameters is set.

Definition at line 105 of file ReferenceTrajectoryBase.h.

References theParamCovFlag.

00105 { return theParamCovFlag; }

const AlgebraicVector& ReferenceTrajectoryBase::parameters ( void   )  const [inline]

Returns the set of 'track'-parameters.

Definition at line 101 of file ReferenceTrajectoryBase.h.

References theParameters.

Referenced by ReferenceTrajectory::fillDerivatives().

00101 { return theParameters; }

const TransientTrackingRecHit::ConstRecHitContainer& ReferenceTrajectoryBase::recHits (  )  const [inline]

Returns the TransientTrackingRecHits (as ConstRecHitPointer's), order might depend on concrete implementation of inheriting class.

Definition at line 122 of file ReferenceTrajectoryBase.h.

References theRecHits.

Referenced by DualReferenceTrajectory::construct().

00122 { return theRecHits; }

void ReferenceTrajectoryBase::setParameterErrors ( const AlgebraicSymMatrix error  )  [inline]

Set the covariance matrix of the 'track'-parameters.

Definition at line 109 of file ReferenceTrajectoryBase.h.

References theParamCovFlag, and theParameterCov.

Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories().

00109 { theParameterCov = error; theParamCovFlag = true; }

const AlgebraicSymMatrix& ReferenceTrajectoryBase::trajectoryPositionErrors (  )  const [inline]

Returns the covariance matrix of the reference trajectory.

Definition at line 92 of file ReferenceTrajectoryBase.h.

References theTrajectoryPositionCov.

Referenced by DualReferenceTrajectory::construct().

00092 { return theTrajectoryPositionCov; }

const AlgebraicVector& ReferenceTrajectoryBase::trajectoryPositions (  )  const [inline]

Returns the local coordinates of the reference trajectory.

ORCA-equivalent: referenceTrack()

Definition at line 88 of file ReferenceTrajectoryBase.h.

References theTrajectoryPositions.

Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().

00088 { return theTrajectoryPositions; }

const std::vector<TrajectoryStateOnSurface>& ReferenceTrajectoryBase::trajectoryStates (  )  const [inline]

Returns the Tsos at the surfaces of the hits, parallel to recHits().

Definition at line 117 of file ReferenceTrajectoryBase.h.

References theTsosVec.

Referenced by DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), and TwoBodyDecayTrajectory::constructTsosVecWithErrors().

00117 { return theTsosVec; }

bool ReferenceTrajectoryBase::useRecHit ( const TransientTrackingRecHit::ConstRecHitPointer hitPtr  )  const [protected]

Definition at line 29 of file ReferenceTrajectoryBase.cc.

Referenced by ReferenceTrajectory::construct(), and numberOfUsedRecHits().

00030 {
00031   return hitPtr->isValid();
00032 }


Member Data Documentation

const unsigned int ReferenceTrajectoryBase::nMeasPerHit = 2 [static, protected]

Definition at line 154 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectory::addMaterialEffectsCov(), ReferenceTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), and TwoBodyDecayTrajectory::constructSingleTsosWithErrors().

AlgebraicMatrix ReferenceTrajectoryBase::theDerivatives [protected]

Definition at line 152 of file ReferenceTrajectoryBase.h.

Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), ReferenceTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), derivatives(), and ReferenceTrajectory::fillDerivatives().

AlgebraicVector ReferenceTrajectoryBase::theMeasurements [protected]

Definition at line 143 of file ReferenceTrajectoryBase.h.

Referenced by DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), ReferenceTrajectory::fillMeasurementAndError(), and measurements().

AlgebraicSymMatrix ReferenceTrajectoryBase::theMeasurementsCov [protected]

Definition at line 144 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectory::addMaterialEffectsCov(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), ReferenceTrajectory::fillMeasurementAndError(), and measurementErrors().

unsigned int ReferenceTrajectoryBase::theNumberOfHits [protected]

Definition at line 138 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectory::construct(), and numberOfHits().

bool ReferenceTrajectoryBase::theParamCovFlag [protected]

Definition at line 136 of file ReferenceTrajectoryBase.h.

Referenced by parameterErrorsAvailable(), and setParameterErrors().

AlgebraicSymMatrix ReferenceTrajectoryBase::theParameterCov [protected]

Definition at line 150 of file ReferenceTrajectoryBase.h.

Referenced by parameterErrors(), and setParameterErrors().

AlgebraicVector ReferenceTrajectoryBase::theParameters [protected]

Definition at line 149 of file ReferenceTrajectoryBase.h.

Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), ReferenceTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), parameters(), and ReferenceTrajectory::ReferenceTrajectory().

TransientTrackingRecHit::ConstRecHitContainer ReferenceTrajectoryBase::theRecHits [protected]

Definition at line 141 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), recHits(), and ReferenceTrajectoryBase().

AlgebraicSymMatrix ReferenceTrajectoryBase::theTrajectoryPositionCov [protected]

Definition at line 147 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), and trajectoryPositionErrors().

AlgebraicVector ReferenceTrajectoryBase::theTrajectoryPositions [protected]

Definition at line 146 of file ReferenceTrajectoryBase.h.

Referenced by DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), ReferenceTrajectory::fillTrajectoryPositions(), and trajectoryPositions().

std::vector<TrajectoryStateOnSurface> ReferenceTrajectoryBase::theTsosVec [protected]

Definition at line 140 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), ReferenceTrajectoryBase(), and trajectoryStates().

bool ReferenceTrajectoryBase::theValidityFlag [protected]

Definition at line 135 of file ReferenceTrajectoryBase.h.

Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), DualBzeroReferenceTrajectory::DualBzeroReferenceTrajectory(), DualReferenceTrajectory::DualReferenceTrajectory(), isValid(), ReferenceTrajectory::ReferenceTrajectory(), and TwoBodyDecayTrajectory::TwoBodyDecayTrajectory().


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