CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
BzeroReferenceTrajectory Class Reference

#include <BzeroReferenceTrajectory.h>

Inheritance diagram for BzeroReferenceTrajectory:
ReferenceTrajectory ReferenceTrajectoryBase ReferenceCounted

Public Member Functions

 BzeroReferenceTrajectory (const TrajectoryStateOnSurface &tsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
 
virtual BzeroReferenceTrajectoryclone () const
 
virtual ~BzeroReferenceTrajectory ()
 
- Public Member Functions inherited from ReferenceTrajectory
 ReferenceTrajectory (const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
 
virtual ~ReferenceTrajectory ()
 
- Public Member Functions inherited from ReferenceTrajectoryBase
const AlgebraicMatrixderivatives () const
 
const Eigen::MatrixXd & gblExtDerivatives () const
 
const Eigen::VectorXd & gblExtMeasurements () const
 
const Eigen::VectorXd & gblExtPrecisions () const
 
std::vector< std::pair< std::vector< gbl::GblPoint >, Eigen::MatrixXd > > & 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::ConstRecHitContainerrecHits () const
 
void setParameterErrors (const AlgebraicSymMatrix &error)
 
const AlgebraicSymMatrixtrajectoryPositionErrors () const
 
const AlgebraicVectortrajectoryPositions () const
 
const std::vector< TrajectoryStateOnSurface > & trajectoryStates () const
 
const AlgebraicMatrixtrajectoryToCurv () const
 
virtual ~ReferenceTrajectoryBase ()
 

Private Attributes

double theMomentumEstimate
 

Additional Inherited Members

- Public Types inherited from ReferenceTrajectory
typedef SurfaceSideDefinition::SurfaceSide SurfaceSide
 
- Public Types inherited from ReferenceTrajectoryBase
enum  MaterialEffects {
  none, multipleScattering, energyLoss, combined,
  breakPoints, brokenLinesCoarse, brokenLinesFine, localGBL,
  curvlinGBL
}
 
typedef ReferenceCountingPointer< ReferenceTrajectoryBaseReferenceTrajectoryPtr
 
- Protected Member Functions inherited from ReferenceTrajectory
virtual bool addMaterialEffectsBp (const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
 
virtual bool addMaterialEffectsBrl (const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv, const GlobalTrajectoryParameters &gtp)
 
virtual bool addMaterialEffectsBrl (const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv, const std::vector< double > &allSteps, const GlobalTrajectoryParameters &gtp, const double minStep=1.0)
 
virtual bool addMaterialEffectsCov (const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs)
 
virtual bool addMaterialEffectsCurvlinGbl (const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
 
virtual bool addMaterialEffectsLocalGbl (const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvatureChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParameterCovs)
 
virtual bool construct (const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
 
MaterialEffectsUpdatorcreateUpdator (MaterialEffects materialEffects, double mass) const
 
virtual void fillDerivatives (const AlgebraicMatrix &projection, const AlgebraicMatrix &fullJacobian, unsigned int iRow)
 
virtual void fillMeasurementAndError (const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iRow, const TrajectoryStateOnSurface &updatedTsos)
 
virtual void fillTrajectoryPositions (const AlgebraicMatrix &projection, const AlgebraicVector &mixedLocalParams, unsigned int iRow)
 
AlgebraicMatrix getHitProjectionMatrix (const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
 
template<unsigned int N>
AlgebraicMatrix getHitProjectionMatrixT (const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
 
virtual bool propagate (const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const MagneticField *magField) const
 
 ReferenceTrajectory (unsigned int nPar, unsigned int nHits, const ReferenceTrajectoryBase::Config &config)
 
SurfaceSide surfaceSide (const PropagationDirection dir) const
 
- Protected Member Functions inherited from ReferenceTrajectoryBase
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 inherited from ReferenceTrajectoryBase
AlgebraicMatrix theDerivatives
 
Eigen::MatrixXd theGblExtDerivatives
 
Eigen::VectorXd theGblExtMeasurements
 
Eigen::VectorXd theGblExtPrecisions
 
std::vector< std::pair< std::vector< gbl::GblPoint >, Eigen::MatrixXd > > 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< TrajectoryStateOnSurfacetheTsosVec
 
bool theValidityFlag
 
- Static Protected Attributes inherited from ReferenceTrajectoryBase
static unsigned int nMeasPerHit {2}
 

Detailed Description

Class implementing the reference trajectory of a single particle in the absence of a magnetic field (B=0, hence the name), i.e. a straight track with only 4 parameters (no curvature parameter).

Given the TrajectoryStateOnSurface at the first hit and the list of all hits the local measurements, derivatives etc. as described in (and accessed via) ReferenceTrajectoryBase are calculated.

The covariance-matrix of the measurements may include effects of multiple-scattering or energy-loss effects or both. This can be defined in the constructor via the variable 'materialEffects (cf. ReferenceTrajectoryBase):

materialEffects = none/multipleScattering/energyLoss/combined

Since no a-priori momentum estimate exists, but is needed for the calculation of material effects, a fixed value is used (e.g. representing the average momentum of the cosmics spectrum).

By default, the mass is assumed to be the muon-mass, but can be changed via a constructor argument.

LIMITATIONS: So far all input hits have to be valid, but invalid hits would be needed to take into account the material effects in them...

Definition at line 35 of file BzeroReferenceTrajectory.h.

Constructor & Destructor Documentation

BzeroReferenceTrajectory::BzeroReferenceTrajectory ( const TrajectoryStateOnSurface tsos,
const TransientTrackingRecHit::ConstRecHitContainer recHits,
const MagneticField magField,
const reco::BeamSpot beamSpot,
const ReferenceTrajectoryBase::Config config 
)

Constructor with Tsos at first hit (in physical order) and list of hits [if (hitsAreReverse) ==> order of hits is in opposite direction compared to the flight of particle, but note that BzeroReferenceTrajectory::recHits() returns the hits always in order of flight], the material effects to be considered and a particle mass and a momentum extimate, the magnetic field of the event is needed for propagations etc.

Definition at line 11 of file BzeroReferenceTrajectory.cc.

References asHepVector(), LocalTrajectoryParameters::charge(), ReferenceTrajectory::construct(), ReferenceTrajectoryBase::Config::hitsAreReverse, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), LocalTrajectoryParameters::mixedFormatVector(), ReferenceTrajectoryBase::Config::propDir, LocalTrajectoryParameters::pzSign(), TrajectoryStateOnSurface::surface(), ReferenceTrajectory::surfaceSide(), ReferenceTrajectoryBase::theDerivatives, theMomentumEstimate, ReferenceTrajectoryBase::theParameters, and ReferenceTrajectoryBase::theValidityFlag.

Referenced by clone().

15  :
18 {
19  // no check against magField == 0
20 
21  // No estimate for momentum of cosmics available -> set to default value.
24 
25  LocalTrajectoryParameters locParamWithFixedMomentum( asSVector<5>(theParameters),
26  tsos.localParameters().pzSign(),
27  tsos.localParameters().charge() );
28 
29  const TrajectoryStateOnSurface refTsosWithFixedMomentum(locParamWithFixedMomentum, tsos.localError(),
30  tsos.surface(), magField,
31  surfaceSide(config.propDir));
32 
33  if (config.hitsAreReverse)
34  {
36  fwdRecHits.reserve(recHits.size());
37 
38  for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it=recHits.rbegin(); it != recHits.rend(); ++it)
39  fwdRecHits.push_back(*it);
40 
41  theValidityFlag = this->construct(refTsosWithFixedMomentum, fwdRecHits, magField, beamSpot);
42  } else {
43  theValidityFlag = this->construct(refTsosWithFixedMomentum, recHits, magField, beamSpot);
44  }
45 
46  // Exclude momentum from the parameters and also the derivatives of the measurements w.r.t. the momentum.
47  theParameters = theParameters.sub( 2, 5 );
48  theDerivatives = theDerivatives.sub( 1, theDerivatives.num_row(), 2, theDerivatives.num_col() );
49 }
const LocalTrajectoryParameters & localParameters() const
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
SurfaceSide surfaceSide(const PropagationDirection dir) const
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
const SurfaceType & surface() const
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
const LocalTrajectoryError & localError() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlgebraicVector5 mixedFormatVector() const
TrackCharge charge() const
Charge (-1, 0 or 1)
float pzSign() const
Sign of the z-component of the momentum in the local frame.
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:48
virtual BzeroReferenceTrajectory::~BzeroReferenceTrajectory ( )
inlinevirtual

Definition at line 52 of file BzeroReferenceTrajectory.h.

52 {}

Member Function Documentation

virtual BzeroReferenceTrajectory* BzeroReferenceTrajectory::clone ( void  ) const
inlinevirtual

Reimplemented from ReferenceTrajectory.

Definition at line 54 of file BzeroReferenceTrajectory.h.

References BzeroReferenceTrajectory().

55  { return new BzeroReferenceTrajectory(*this); }
BzeroReferenceTrajectory(const TrajectoryStateOnSurface &tsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)

Member Data Documentation

double BzeroReferenceTrajectory::theMomentumEstimate
private

Definition at line 59 of file BzeroReferenceTrajectory.h.

Referenced by BzeroReferenceTrajectory().