CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, bool hitsAreReverse, const MagneticField *magField, MaterialEffects materialEffects, PropagationDirection propDir, double mass, double momentumEstimate, bool useBeamSpot, const reco::BeamSpot &beamSpot)
 
virtual BzeroReferenceTrajectoryclone () const
 
virtual ~BzeroReferenceTrajectory ()
 
- Public Member Functions inherited from ReferenceTrajectory
 ReferenceTrajectory (const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, bool hitsAreReverse, const MagneticField *magField, MaterialEffects materialEffects, PropagationDirection propDir, double mass, bool useBeamSpot, const reco::BeamSpot &beamSpot)
 
virtual ~ReferenceTrajectory ()
 
- Public Member Functions inherited from ReferenceTrajectoryBase
const AlgebraicMatrixderivatives () const
 
const TMatrixD & gblExtDerivatives () const
 
const TVectorD & gblExtMeasurements () const
 
const TVectorD & gblExtPrecisions () const
 
std::vector< std::pair
< std::vector< 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 ()
 

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
< ReferenceTrajectoryBase
ReferenceTrajectoryPtr
 
- 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, double mass, MaterialEffects materialEffects, const PropagationDirection propDir, const MagneticField *magField, bool useBeamSpot, 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 PropagationDirection propDir, const MagneticField *magField) const
 
 ReferenceTrajectory (unsigned int nPar, unsigned int nHits, MaterialEffects materialEffects)
 
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
 
TMatrixD theGblExtDerivatives
 
TVectorD theGblExtMeasurements
 
TVectorD theGblExtPrecisions
 
std::vector< std::pair
< std::vector< 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 inherited from ReferenceTrajectoryBase
static const 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 referenceTsos,
const TransientTrackingRecHit::ConstRecHitContainer recHits,
bool  hitsAreReverse,
const MagneticField magField,
MaterialEffects  materialEffects,
PropagationDirection  propDir,
double  mass,
double  momentumEstimate,
bool  useBeamSpot,
const reco::BeamSpot beamSpot 
)

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(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), LocalTrajectoryParameters::mixedFormatVector(), LocalTrajectoryParameters::pzSign(), TrajectoryStateOnSurface::surface(), ReferenceTrajectory::surfaceSide(), ReferenceTrajectoryBase::theDerivatives, theMomentumEstimate, ReferenceTrajectoryBase::theParameters, and ReferenceTrajectoryBase::theValidityFlag.

Referenced by clone().

18  :
19  ReferenceTrajectory( refTsos.localParameters().mixedFormatVector().kSize, recHits.size(), materialEffects),
20  theMomentumEstimate( momentumEstimate )
21 {
22  // no check against magField == 0
23 
24  // No estimate for momentum of cosmics available -> set to default value.
25  theParameters = asHepVector(refTsos.localParameters().mixedFormatVector());
27 
28  LocalTrajectoryParameters locParamWithFixedMomentum( asSVector<5>(theParameters),
29  refTsos.localParameters().pzSign(),
30  refTsos.localParameters().charge() );
31 
32  const TrajectoryStateOnSurface refTsosWithFixedMomentum(locParamWithFixedMomentum, refTsos.localError(),
33  refTsos.surface(), magField,
34  surfaceSide(propDir));
35 
36  if (hitsAreReverse)
37  {
39  fwdRecHits.reserve(recHits.size());
40 
41  for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it=recHits.rbegin(); it != recHits.rend(); ++it)
42  fwdRecHits.push_back(*it);
43 
44  theValidityFlag = this->construct(refTsosWithFixedMomentum, fwdRecHits, mass,
45  materialEffects, propDir, magField,
46  useBeamSpot, beamSpot);
47  } else {
48  theValidityFlag = this->construct(refTsosWithFixedMomentum, recHits, mass,
49  materialEffects, propDir, magField,
50  useBeamSpot, beamSpot);
51  }
52 
53  // Exclude momentum from the parameters and also the derivatives of the measurements w.r.t. the momentum.
54  theParameters = theParameters.sub( 2, 5 );
55  theDerivatives = theDerivatives.sub( 1, theDerivatives.num_row(), 2, theDerivatives.num_col() );
56 }
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, double mass, MaterialEffects materialEffects, const PropagationDirection propDir, const MagneticField *magField, bool useBeamSpot, const reco::BeamSpot &beamSpot)
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
SurfaceSide surfaceSide(const PropagationDirection dir) const
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, bool hitsAreReverse, const MagneticField *magField, MaterialEffects materialEffects, PropagationDirection propDir, double mass, bool useBeamSpot, const reco::BeamSpot &beamSpot)
std::vector< ConstRecHitPointer > ConstRecHitContainer
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:43
virtual BzeroReferenceTrajectory::~BzeroReferenceTrajectory ( )
inlinevirtual

Definition at line 57 of file BzeroReferenceTrajectory.h.

57 {}

Member Function Documentation

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

Reimplemented from ReferenceTrajectory.

Definition at line 59 of file BzeroReferenceTrajectory.h.

References BzeroReferenceTrajectory().

60  { return new BzeroReferenceTrajectory(*this); }
BzeroReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, bool hitsAreReverse, const MagneticField *magField, MaterialEffects materialEffects, PropagationDirection propDir, double mass, double momentumEstimate, bool useBeamSpot, const reco::BeamSpot &beamSpot)

Member Data Documentation

double BzeroReferenceTrajectory::theMomentumEstimate
private

Definition at line 64 of file BzeroReferenceTrajectory.h.

Referenced by BzeroReferenceTrajectory().