#include <ReferenceTrajectoryBase.h>
Author : Gero Flucke (based on code for ORCA by Edmund Widl) date : 2006/09/17 last update:
by :
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
Definition at line 94 of file ReferenceTrajectoryBase.h.
typedef ReferenceCountingPointer<ReferenceTrajectoryBase> ReferenceTrajectoryBase::ReferenceTrajectoryPtr |
Definition at line 99 of file ReferenceTrajectoryBase.h.
none | |
multipleScattering | |
energyLoss | |
combined | |
breakPoints | |
brokenLinesCoarse | |
brokenLinesFine |
Definition at line 101 of file ReferenceTrajectoryBase.h.
virtual ReferenceTrajectoryBase::~ReferenceTrajectoryBase | ( | ) | [inline, virtual] |
Definition at line 104 of file ReferenceTrajectoryBase.h.
{}
ReferenceTrajectoryBase::ReferenceTrajectoryBase | ( | unsigned int | nPar, |
unsigned int | nHits, | ||
unsigned int | nVirtualPar, | ||
unsigned int | nVirtualMeas | ||
) | [explicit, protected] |
Definition at line 3 of file ReferenceTrajectoryBase.cc.
References theRecHits, and theTsosVec.
: theValidityFlag(false), theParamCovFlag(false), theNumberOfHits( nHits ), theNumberOfPars( nPar ), theNumberOfVirtualMeas( nVirtualMeas ), theNumberOfVirtualPars( nVirtualPar ), theTsosVec(), theRecHits(), theMeasurements(nMeasPerHit * nHits + nVirtualMeas), theMeasurementsCov(nMeasPerHit * nHits + nVirtualMeas, 0), theTrajectoryPositions(nMeasPerHit * nHits), theTrajectoryPositionCov(nMeasPerHit * nHits, 0), theParameters(nPar), theParameterCov(nPar, 0), theDerivatives(nMeasPerHit * nHits + nVirtualMeas, nPar + nVirtualPar, 0), theInnerTrajectoryToCurvilinear( 5, 5, 0 ), theInnerLocalToTrajectory( 5, 5, 0 ) { theTsosVec.reserve(nHits); theRecHits.reserve(nHits); }
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 128 of file ReferenceTrajectoryBase.h.
References theDerivatives.
Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().
{ return theDerivatives; }
bool ReferenceTrajectoryBase::isValid | ( | void | ) | [inline] |
Definition at line 106 of file ReferenceTrajectoryBase.h.
References theValidityFlag.
Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().
{ return theValidityFlag; }
const AlgebraicMatrix& ReferenceTrajectoryBase::localToTrajectory | ( | ) | const [inline] |
Returns the transformation of local to tracjectory parameters
Definition at line 135 of file ReferenceTrajectoryBase.h.
References theInnerLocalToTrajectory.
Referenced by TwoBodyDecayTrajectory::construct().
{ return theInnerLocalToTrajectory; }
const AlgebraicSymMatrix& ReferenceTrajectoryBase::measurementErrors | ( | ) | const [inline] |
Returns the full covariance matrix of the measurements. ORCA-equivalent: covariance()
Definition at line 114 of file ReferenceTrajectoryBase.h.
References theMeasurementsCov.
Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().
{ return theMeasurementsCov; }
const AlgebraicVector& ReferenceTrajectoryBase::measurements | ( | ) | const [inline] |
Returns the measurements in local coordinates.
Definition at line 110 of file ReferenceTrajectoryBase.h.
References theMeasurements.
Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().
{ return theMeasurements; }
unsigned int ReferenceTrajectoryBase::numberOfHitMeas | ( | ) | const [inline] |
Definition at line 166 of file ReferenceTrajectoryBase.h.
References nMeasPerHit, and theNumberOfHits.
Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().
{ return theNumberOfHits * nMeasPerHit; }
unsigned int ReferenceTrajectoryBase::numberOfHits | ( | void | ) | const [inline] |
Definition at line 162 of file ReferenceTrajectoryBase.h.
References theNumberOfHits.
Referenced by TwoBodyDecayTrajectory::construct().
{ return theNumberOfHits; }
unsigned int ReferenceTrajectoryBase::numberOfPar | ( | ) | const [inline] |
Definition at line 163 of file ReferenceTrajectoryBase.h.
References theNumberOfPars.
Referenced by TwoBodyDecayTrajectory::construct().
{ return theNumberOfPars; }
unsigned int ReferenceTrajectoryBase::numberOfUsedRecHits | ( | const TransientTrackingRecHit::ConstRecHitContainer & | recHits | ) | const [protected] |
Definition at line 25 of file ReferenceTrajectoryBase.cc.
References useRecHit().
unsigned int ReferenceTrajectoryBase::numberOfVirtualMeas | ( | ) | const [inline] |
Definition at line 164 of file ReferenceTrajectoryBase.h.
References theNumberOfVirtualMeas.
Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().
{ return theNumberOfVirtualMeas; }
unsigned int ReferenceTrajectoryBase::numberOfVirtualPar | ( | ) | const [inline] |
Definition at line 165 of file ReferenceTrajectoryBase.h.
References theNumberOfVirtualPars.
Referenced by TwoBodyDecayTrajectory::construct().
{ return theNumberOfVirtualPars; }
const AlgebraicSymMatrix& ReferenceTrajectoryBase::parameterErrors | ( | ) | const [inline] |
Returns the covariance matrix of the 'track'-parameters.
Definition at line 151 of file ReferenceTrajectoryBase.h.
References theParameterCov.
{ return theParameterCov; }
bool ReferenceTrajectoryBase::parameterErrorsAvailable | ( | ) | const [inline] |
Returns true if the covariance matrix of the 'track'-parameters is set.
Definition at line 143 of file ReferenceTrajectoryBase.h.
References theParamCovFlag.
{ return theParamCovFlag; }
const AlgebraicVector& ReferenceTrajectoryBase::parameters | ( | void | ) | const [inline] |
Returns the set of 'track'-parameters.
Definition at line 139 of file ReferenceTrajectoryBase.h.
References theParameters.
Referenced by ReferenceTrajectory::fillDerivatives().
{ 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 160 of file ReferenceTrajectoryBase.h.
References theRecHits.
Referenced by DualKalmanTrajectory::construct(), and DualReferenceTrajectory::construct().
{ return theRecHits; }
void ReferenceTrajectoryBase::setParameterErrors | ( | const AlgebraicSymMatrix & | error | ) | [inline] |
Set the covariance matrix of the 'track'-parameters.
Definition at line 147 of file ReferenceTrajectoryBase.h.
References error, theParamCovFlag, and theParameterCov.
Referenced by TwoBodyDecayTrajectoryFactory::constructTrajectories().
{ theParameterCov = error; theParamCovFlag = true; }
const AlgebraicSymMatrix& ReferenceTrajectoryBase::trajectoryPositionErrors | ( | ) | const [inline] |
Returns the covariance matrix of the reference trajectory.
Definition at line 123 of file ReferenceTrajectoryBase.h.
References theTrajectoryPositionCov.
Referenced by DualReferenceTrajectory::construct().
{ return theTrajectoryPositionCov; }
const AlgebraicVector& ReferenceTrajectoryBase::trajectoryPositions | ( | ) | const [inline] |
Returns the local coordinates of the reference trajectory. ORCA-equivalent: referenceTrack()
Definition at line 119 of file ReferenceTrajectoryBase.h.
References theTrajectoryPositions.
Referenced by DualReferenceTrajectory::construct(), and TwoBodyDecayTrajectory::construct().
{ 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 155 of file ReferenceTrajectoryBase.h.
References theTsosVec.
Referenced by DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), and TwoBodyDecayTrajectory::constructTsosVecWithErrors().
{ return theTsosVec; }
const AlgebraicMatrix& ReferenceTrajectoryBase::trajectoryToCurv | ( | ) | const [inline] |
Returns the transformation of tracjectory to curvilinear parameters
Definition at line 132 of file ReferenceTrajectoryBase.h.
References theInnerTrajectoryToCurvilinear.
{ return theInnerTrajectoryToCurvilinear; }
bool ReferenceTrajectoryBase::useRecHit | ( | const TransientTrackingRecHit::ConstRecHitPointer & | hitPtr | ) | const [protected] |
Definition at line 35 of file ReferenceTrajectoryBase.cc.
Referenced by ReferenceTrajectory::construct(), and numberOfUsedRecHits().
{
return hitPtr->isValid();
}
const unsigned int ReferenceTrajectoryBase::nMeasPerHit = 2 [static, protected] |
Definition at line 205 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBp(), ReferenceTrajectory::addMaterialEffectsBrl(), ReferenceTrajectory::addMaterialEffectsCov(), ReferenceTrajectory::construct(), DualKalmanTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), DualKalmanTrajectory::fillMeasurementAndError1(), DualKalmanTrajectory::fillMeasurementAndError2(), DualKalmanTrajectory::fillTrajectoryPositions(), and numberOfHitMeas().
Definition at line 198 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBp(), ReferenceTrajectory::addMaterialEffectsBrl(), BzeroReferenceTrajectory::BzeroReferenceTrajectory(), ReferenceTrajectory::construct(), DualKalmanTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), derivatives(), and ReferenceTrajectory::fillDerivatives().
Definition at line 203 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), ReferenceTrajectory::construct(), and localToTrajectory().
Definition at line 201 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), ReferenceTrajectory::construct(), and trajectoryToCurv().
Definition at line 189 of file ReferenceTrajectoryBase.h.
Referenced by DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), ReferenceTrajectory::fillMeasurementAndError(), DualKalmanTrajectory::fillMeasurementAndError1(), DualKalmanTrajectory::fillMeasurementAndError2(), and measurements().
Definition at line 190 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBp(), ReferenceTrajectory::addMaterialEffectsBrl(), ReferenceTrajectory::addMaterialEffectsCov(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), ReferenceTrajectory::fillMeasurementAndError(), DualKalmanTrajectory::fillMeasurementAndError1(), DualKalmanTrajectory::fillMeasurementAndError2(), and measurementErrors().
unsigned int ReferenceTrajectoryBase::theNumberOfHits [protected] |
Definition at line 181 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), numberOfHitMeas(), and numberOfHits().
unsigned int ReferenceTrajectoryBase::theNumberOfPars [protected] |
Definition at line 182 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBp(), ReferenceTrajectory::addMaterialEffectsBrl(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), and numberOfPar().
unsigned int ReferenceTrajectoryBase::theNumberOfVirtualMeas [protected] |
Definition at line 183 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), TwoBodyDecayTrajectory::construct(), and numberOfVirtualMeas().
unsigned int ReferenceTrajectoryBase::theNumberOfVirtualPars [protected] |
Definition at line 184 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::addMaterialEffectsBrl(), ReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), and numberOfVirtualPar().
bool ReferenceTrajectoryBase::theParamCovFlag [protected] |
Definition at line 179 of file ReferenceTrajectoryBase.h.
Referenced by parameterErrorsAvailable(), and setParameterErrors().
Definition at line 196 of file ReferenceTrajectoryBase.h.
Referenced by parameterErrors(), and setParameterErrors().
Definition at line 195 of file ReferenceTrajectoryBase.h.
Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), ReferenceTrajectory::construct(), DualKalmanTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), parameters(), and ReferenceTrajectory::ReferenceTrajectory().
Definition at line 187 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::construct(), DualKalmanTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), recHits(), and ReferenceTrajectoryBase().
Definition at line 193 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::construct(), DualKalmanTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), and trajectoryPositionErrors().
Definition at line 192 of file ReferenceTrajectoryBase.h.
Referenced by DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), ReferenceTrajectory::fillTrajectoryPositions(), DualKalmanTrajectory::fillTrajectoryPositions(), and trajectoryPositions().
std::vector<TrajectoryStateOnSurface> ReferenceTrajectoryBase::theTsosVec [protected] |
Definition at line 186 of file ReferenceTrajectoryBase.h.
Referenced by ReferenceTrajectory::construct(), DualReferenceTrajectory::construct(), TwoBodyDecayTrajectory::construct(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), DualKalmanTrajectory::fillKalmanPart(), ReferenceTrajectoryBase(), and trajectoryStates().
bool ReferenceTrajectoryBase::theValidityFlag [protected] |
Definition at line 178 of file ReferenceTrajectoryBase.h.
Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), DualBzeroReferenceTrajectory::DualBzeroReferenceTrajectory(), DualKalmanTrajectory::DualKalmanTrajectory(), DualReferenceTrajectory::DualReferenceTrajectory(), isValid(), ReferenceTrajectory::ReferenceTrajectory(), and TwoBodyDecayTrajectory::TwoBodyDecayTrajectory().