CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
ReferenceTrajectoryBase Class Referenceabstract

#include <ReferenceTrajectoryBase.h>

Inheritance diagram for ReferenceTrajectoryBase:
ReferenceCounted DualReferenceTrajectory ReferenceTrajectory TwoBodyDecayTrajectory DualBzeroReferenceTrajectory BzeroReferenceTrajectory

Classes

struct  Config
 

Public Types

enum  MaterialEffects {
  none, multipleScattering, energyLoss, combined,
  breakPoints, brokenLinesCoarse, brokenLinesFine, localGBL,
  curvlinGBL
}
 
typedef
ReferenceCountingPointer
< ReferenceTrajectoryBase
ReferenceTrajectoryPtr
 

Public Member Functions

virtual ReferenceTrajectoryBaseclone () const =0
 
const AlgebraicMatrixderivatives () const
 
const TMatrixD & gblExtDerivatives () const
 
const TVectorD & gblExtMeasurements () const
 
const TVectorD & gblExtPrecisions () const
 
std::vector< std::pair
< std::vector< gbl::GblPoint >
, TMatrixD > > & 
gblInput ()
 
bool isValid ()
 
const AlgebraicMatrixlocalToTrajectory () const
 
const AlgebraicSymMatrixmeasurementErrors () const
 
const AlgebraicVectormeasurements () const
 
int nominalField () const
 
unsigned int numberOfHitMeas () const
 
unsigned int numberOfHits () const
 
unsigned int numberOfPar () const
 
unsigned int numberOfVirtualMeas () const
 
unsigned int numberOfVirtualPar () const
 
const AlgebraicSymMatrixparameterErrors () const
 
bool parameterErrorsAvailable () const
 
const AlgebraicVectorparameters () const
 
const
TransientTrackingRecHit::ConstRecHitContainer
recHits () const
 
void setParameterErrors (const AlgebraicSymMatrix &error)
 
const AlgebraicSymMatrixtrajectoryPositionErrors () const
 
const AlgebraicVectortrajectoryPositions () const
 
const std::vector
< TrajectoryStateOnSurface > & 
trajectoryStates () const
 
const AlgebraicMatrixtrajectoryToCurv () const
 
virtual ~ReferenceTrajectoryBase ()
 

Protected Member Functions

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

Protected Attributes

AlgebraicMatrix theDerivatives
 
TMatrixD theGblExtDerivatives
 
TVectorD theGblExtMeasurements
 
TVectorD theGblExtPrecisions
 
std::vector< std::pair
< std::vector< gbl::GblPoint >
, TMatrixD > > 
theGblInput
 
AlgebraicMatrix theInnerLocalToTrajectory
 
AlgebraicMatrix theInnerTrajectoryToCurvilinear
 
AlgebraicVector theMeasurements
 
AlgebraicSymMatrix theMeasurementsCov
 
int theNomField
 
unsigned int theNumberOfHits
 
unsigned int theNumberOfPars
 
unsigned int theNumberOfVirtualMeas
 
unsigned int theNumberOfVirtualPars
 
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:
2010/09/10 12:11:39

by :

Author:
mussgill

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.

.............................................................................

090730 C. Kleinwort: 'Break Points' introduced for better description of multiple scattering (correlations)

For each detector layer (in the hit collection) two ortogonal scattering angles are introduced as new local track parameters ("break points"). To constrain those to the expected mean (=0.) and variance (~1/p^2 X/X0) corresponding measurements are added. Invalid hits may be used to produce break points too (UseInvalidHits = True).

Break points have been implemented for: ReferenceTrajectory, BzeroReferenceTrajectory, DualReferenceTrajectory and DualBzeroReferenceTrajectory For 'Dual' trajectories they make no sense as only the correlations between the hits in a track half are accounted for and not those between the halves!

Break Points are selected by TrajectoryFactory.MaterialEffects = "BreakPoints"

090909 C. Kleinwort: 'Broken Lines' introduced for description of multiple scattering (V. Blobel, Nuclear Instruments and Methods A, 566 (2006), pp. 14-17) Fine Broken Lines are selected by TrajectoryFactory.MaterialEffects = "BrokenLinesFine" (exact derivatives) Coarse Broken Lines are selected by TrajectoryFactory.MaterialEffects = "BrokenLines[Coarse]" (approximate derivatives, closeby hits (ds<1cm) combined)

091127 C. Kleinwort: 1) 'Broken Lines' extended to PCA, required for beamspot constraint and TwoBodyDecayTrajectory, selected with "BrokenLines[Coarse]Pca" or "BrokenLinesFinePca" 2) For coarse Broken Lines linear interpolation is used for combined hits 3) TwoBodyDecayTrajectory implemented for break points and Broken Lines

141103 C. Kleinwort: 'General Broken Lines' introduced for description of multiple scattering (C. Kleinwort, Nuclear Instruments and Methods A, 673 (2012), pp. 107-110) needs GBL version >= V01-13-00 (from svnsrv.desy.de) Selected by TrajectoryFactory.MaterialEffects = "LocalGBL" or = "CurvlinGBL" (for trajectory constructed in local or curvilinear system)

Definition at line 104 of file ReferenceTrajectoryBase.h.

Member Typedef Documentation

Definition at line 109 of file ReferenceTrajectoryBase.h.

Member Enumeration Documentation

Enumerator
none 
multipleScattering 
energyLoss 
combined 
breakPoints 
brokenLinesCoarse 
brokenLinesFine 
localGBL 
curvlinGBL 

Definition at line 111 of file ReferenceTrajectoryBase.h.

Constructor & Destructor Documentation

virtual ReferenceTrajectoryBase::~ReferenceTrajectoryBase ( )
inlinevirtual

Definition at line 135 of file ReferenceTrajectoryBase.h.

ReferenceTrajectoryBase::ReferenceTrajectoryBase ( unsigned int  nPar,
unsigned int  nHits,
unsigned int  nVirtualPar,
unsigned int  nVirtualMeas 
)
explicitprotected

Definition at line 3 of file ReferenceTrajectoryBase.cc.

References theRecHits, and theTsosVec.

5  : theValidityFlag(false), theParamCovFlag(false),
6  theNumberOfHits( nHits ), theNumberOfPars( nPar ),
7  theNumberOfVirtualMeas( nVirtualMeas ), theNumberOfVirtualPars( nVirtualPar ),
9  theMeasurements(nMeasPerHit * nHits + nVirtualMeas),
10  theMeasurementsCov(nMeasPerHit * nHits + nVirtualMeas, 0),
13  theParameters(nPar),
14  theParameterCov(nPar, 0),
15  theDerivatives(nMeasPerHit * nHits + nVirtualMeas, nPar + nVirtualPar, 0),
17  theInnerLocalToTrajectory( 5, 5, 0 )
18 {
19  theTsosVec.reserve(nHits);
20  theRecHits.reserve(nHits);
21 }
AlgebraicMatrix theInnerTrajectoryToCurvilinear
AlgebraicMatrix theInnerLocalToTrajectory
static const unsigned int nMeasPerHit
AlgebraicSymMatrix theTrajectoryPositionCov
TransientTrackingRecHit::ConstRecHitContainer theRecHits
AlgebraicSymMatrix theMeasurementsCov
AlgebraicSymMatrix theParameterCov
std::vector< TrajectoryStateOnSurface > theTsosVec

Member Function Documentation

virtual ReferenceTrajectoryBase* ReferenceTrajectoryBase::clone ( ) const
pure virtual
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 159 of file ReferenceTrajectoryBase.h.

const TMatrixD& ReferenceTrajectoryBase::gblExtDerivatives ( ) const
inline

Returns the GBL external derivatives.

Definition at line 174 of file ReferenceTrajectoryBase.h.

const TVectorD& ReferenceTrajectoryBase::gblExtMeasurements ( ) const
inline

Returns the GBL external derivatives.

Definition at line 178 of file ReferenceTrajectoryBase.h.

const TVectorD& ReferenceTrajectoryBase::gblExtPrecisions ( ) const
inline

Returns the GBL external derivatives.

Definition at line 182 of file ReferenceTrajectoryBase.h.

std::vector<std::pair<std::vector<gbl::GblPoint>, TMatrixD> >& ReferenceTrajectoryBase::gblInput ( )
inline

Returns the GBL input

Definition at line 170 of file ReferenceTrajectoryBase.h.

bool ReferenceTrajectoryBase::isValid ( void  )
inline

Definition at line 137 of file ReferenceTrajectoryBase.h.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

const AlgebraicMatrix& ReferenceTrajectoryBase::localToTrajectory ( ) const
inline

Returns the transformation of local to tracjectory parameters

Definition at line 166 of file ReferenceTrajectoryBase.h.

const AlgebraicSymMatrix& ReferenceTrajectoryBase::measurementErrors ( ) const
inline

Returns the full covariance matrix of the measurements. ORCA-equivalent: covariance()

Definition at line 145 of file ReferenceTrajectoryBase.h.

const AlgebraicVector& ReferenceTrajectoryBase::measurements ( ) const
inline

Returns the measurements in local coordinates.

Definition at line 141 of file ReferenceTrajectoryBase.h.

int ReferenceTrajectoryBase::nominalField ( ) const
inline

Definition at line 215 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::numberOfHitMeas ( ) const
inline

Definition at line 214 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::numberOfHits ( ) const
inline

Definition at line 210 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::numberOfPar ( ) const
inline

Definition at line 211 of file ReferenceTrajectoryBase.h.

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

Definition at line 25 of file ReferenceTrajectoryBase.cc.

References useRecHit().

26 {
27  unsigned int nUsedHits = 0;
28  TransientTrackingRecHit::ConstRecHitContainer::const_iterator itHit;
29  for ( itHit = recHits.begin(); itHit != recHits.end(); ++itHit ) if ( useRecHit( *itHit ) ) ++nUsedHits;
30  return nUsedHits;
31 }
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
unsigned int ReferenceTrajectoryBase::numberOfVirtualMeas ( ) const
inline

Definition at line 212 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::numberOfVirtualPar ( ) const
inline

Definition at line 213 of file ReferenceTrajectoryBase.h.

const AlgebraicSymMatrix& ReferenceTrajectoryBase::parameterErrors ( ) const
inline

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

Definition at line 199 of file ReferenceTrajectoryBase.h.

bool ReferenceTrajectoryBase::parameterErrorsAvailable ( ) const
inline

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

Definition at line 191 of file ReferenceTrajectoryBase.h.

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

Returns the set of 'track'-parameters.

Definition at line 187 of file ReferenceTrajectoryBase.h.

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 208 of file ReferenceTrajectoryBase.h.

void ReferenceTrajectoryBase::setParameterErrors ( const AlgebraicSymMatrix error)
inline

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

Definition at line 195 of file ReferenceTrajectoryBase.h.

const AlgebraicSymMatrix& ReferenceTrajectoryBase::trajectoryPositionErrors ( ) const
inline

Returns the covariance matrix of the reference trajectory.

Definition at line 154 of file ReferenceTrajectoryBase.h.

const AlgebraicVector& ReferenceTrajectoryBase::trajectoryPositions ( ) const
inline

Returns the local coordinates of the reference trajectory. ORCA-equivalent: referenceTrack()

Definition at line 150 of file ReferenceTrajectoryBase.h.

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

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

Definition at line 203 of file ReferenceTrajectoryBase.h.

const AlgebraicMatrix& ReferenceTrajectoryBase::trajectoryToCurv ( ) const
inline

Returns the transformation of tracjectory to curvilinear parameters

Definition at line 163 of file ReferenceTrajectoryBase.h.

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

Definition at line 35 of file ReferenceTrajectoryBase.cc.

Referenced by numberOfUsedRecHits().

36 {
37  return hitPtr->isValid();
38 }

Member Data Documentation

const unsigned int ReferenceTrajectoryBase::nMeasPerHit = 2
staticprotected

Definition at line 261 of file ReferenceTrajectoryBase.h.

AlgebraicMatrix ReferenceTrajectoryBase::theDerivatives
protected
TMatrixD ReferenceTrajectoryBase::theGblExtDerivatives
protected

Definition at line 257 of file ReferenceTrajectoryBase.h.

TVectorD ReferenceTrajectoryBase::theGblExtMeasurements
protected

Definition at line 258 of file ReferenceTrajectoryBase.h.

TVectorD ReferenceTrajectoryBase::theGblExtPrecisions
protected

Definition at line 259 of file ReferenceTrajectoryBase.h.

std::vector<std::pair<std::vector<gbl::GblPoint>, TMatrixD> > ReferenceTrajectoryBase::theGblInput
protected

Definition at line 254 of file ReferenceTrajectoryBase.h.

AlgebraicMatrix ReferenceTrajectoryBase::theInnerLocalToTrajectory
protected

Definition at line 252 of file ReferenceTrajectoryBase.h.

AlgebraicMatrix ReferenceTrajectoryBase::theInnerTrajectoryToCurvilinear
protected

Definition at line 250 of file ReferenceTrajectoryBase.h.

AlgebraicVector ReferenceTrajectoryBase::theMeasurements
protected

Definition at line 238 of file ReferenceTrajectoryBase.h.

AlgebraicSymMatrix ReferenceTrajectoryBase::theMeasurementsCov
protected

Definition at line 239 of file ReferenceTrajectoryBase.h.

int ReferenceTrajectoryBase::theNomField
protected

Definition at line 255 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::theNumberOfHits
protected

Definition at line 230 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::theNumberOfPars
protected

Definition at line 231 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::theNumberOfVirtualMeas
protected

Definition at line 232 of file ReferenceTrajectoryBase.h.

unsigned int ReferenceTrajectoryBase::theNumberOfVirtualPars
protected

Definition at line 233 of file ReferenceTrajectoryBase.h.

bool ReferenceTrajectoryBase::theParamCovFlag
protected

Definition at line 228 of file ReferenceTrajectoryBase.h.

AlgebraicSymMatrix ReferenceTrajectoryBase::theParameterCov
protected

Definition at line 245 of file ReferenceTrajectoryBase.h.

AlgebraicVector ReferenceTrajectoryBase::theParameters
protected
TransientTrackingRecHit::ConstRecHitContainer ReferenceTrajectoryBase::theRecHits
protected

Definition at line 236 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectoryBase().

AlgebraicSymMatrix ReferenceTrajectoryBase::theTrajectoryPositionCov
protected

Definition at line 242 of file ReferenceTrajectoryBase.h.

AlgebraicVector ReferenceTrajectoryBase::theTrajectoryPositions
protected

Definition at line 241 of file ReferenceTrajectoryBase.h.

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

Definition at line 235 of file ReferenceTrajectoryBase.h.

Referenced by ReferenceTrajectoryBase().

bool ReferenceTrajectoryBase::theValidityFlag
protected