CMS 3D CMS Logo

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

#include <Trajectory.h>

Public Types

using ConstRecHitContainer = TrackingRecHit::ConstRecHitContainer
 
typedef std::vector
< TrajectoryMeasurement
DataContainer
 
using RecHitContainer = ConstRecHitContainer
 

Public Member Functions

int cccBadHits () const
 
float cccThreshold () const
 
float chiSquared () const
 
TrajectoryMeasurement const & closestMeasurement (GlobalPoint) const
 
DataContainer const & data () const
 obsolete name, use measurements() instead. More...
 
PropagationDirection const & direction () const
 
float dPhiCacheForLoopersReconstruction () const
 
bool empty () const
 True if trajectory has no measurements. More...
 
TrajectoryMeasurement const & firstMeasurement () const
 
int foundHits () const
 
TrajectoryStateOnSurface geometricalInnermostState () const
 
void incrementLoops ()
 
void invalidate ()
 Method to invalidate a trajectory. Useful during ambiguity resolution. More...
 
bool isLooper () const
 
bool isValid () const
 
const DetLayerlastLayer () const
 Redundant method, returns the layer of lastMeasurement() . More...
 
TrajectoryMeasurement const & lastMeasurement () const
 
int lostHits () const
 
DataContainer const & measurements () const
 
DataContainermeasurements ()
 
int ndof (bool bon=true) const
 
signed char nLoops () const
 
int numberOfCCCBadHits (float ccc_threshold)
 
Trajectoryoperator= (Trajectory const &rh)=default
 
Trajectoryoperator= (Trajectory &&rh)
 
void pop ()
 
void push (const TrajectoryMeasurement &tm)
 
void push (const TrajectoryMeasurement &tm, double chi2Increment)
 
void push (TrajectoryMeasurement &&tm)
 
void push (TrajectoryMeasurement &&tm, double chi2Increment)
 
ConstRecHitContainer recHits () const
 
void reserve (unsigned int n)
 
void reverse ()
 
TrajectorySeed const & seed () const
 Access to the seed used to reconstruct the Trajectory. More...
 
unsigned int seedNHits () const
 
edm::RefToBase< TrajectorySeedseedRef (void) const
 
void setDPhiCacheForLoopersReconstruction (float dphi)
 
void setNLoops (signed char value)
 
void setSeedRef (const edm::RefToBase< TrajectorySeed > &seedRef)
 
void setSharedSeed (const boost::shared_ptr< const TrajectorySeed > &seed)
 
void setStopReason (StopReason s)
 
const boost::shared_ptr< const
TrajectorySeed > & 
sharedSeed () const
 
StopReason stopReason () const
 
 Trajectory ()
 
 Trajectory (const TrajectorySeed &seed)
 
 Trajectory (const TrajectorySeed &seed, PropagationDirection dir)
 
 Trajectory (const boost::shared_ptr< const TrajectorySeed > &seed, PropagationDirection dir)
 
 Trajectory (PropagationDirection dir)
 
 Trajectory (Trajectory const &rh)=default
 
 Trajectory (Trajectory &&rh)
 
void validRecHits (ConstRecHitContainer &cont) const
 

Static Public Member Functions

static bool inactive ()
 
static bool isBad (const TrackingRecHit &hit)
 
static bool lost (const TrackingRecHit &hit)
 

Private Member Functions

bool badForCCC (const TrajectoryMeasurement &tm)
 
void check () const
 
void pushAux (double chi2Increment)
 
void updateBadForCCC (float ccc_threshold)
 

Private Attributes

edm::RefToBase< TrajectorySeedseedRef_
 
StopReason stopReason_
 
float theCCCThreshold_
 
float theChiSquared
 
float theChiSquaredBad
 
DataContainer theData
 
PropagationDirection theDirection
 
bool theDirectionValidity
 
float theDPhiCache
 
signed char theNLoops
 
signed short theNumberOfCCCBadHits_
 
signed short theNumberOfFoundHits
 
signed short theNumberOfLostHits
 
boost::shared_ptr< const
TrajectorySeed
theSeed
 
bool theValid
 

Detailed Description

A class for detailed particle trajectory representation. It is used during trajectory building to "grow" a trajectory. The trajectory is represented as an ordered sequence of TrajectoryMeasurement objects with a stack-like interface. The measurements are added to the Trajectory in the order of increasing precision: each new TrajectoryMeasurement is assumed to improve the precision of the last one, normally by adding a constraint from a new RecHit. However the Trajectory class does not have the means to verify that measurements are added in the correct order, and thus cannot guarantee the order, which is the responsibility of the TrajectoryBuilder. The Trajectory provides some security by allowing to add or remove measurements only on one of it's ends, with push(TM) and pop() methods. The last measurement in a Trajectory can thus be either the innermost (closest to the interaction point) or the outermost, depending on the way the Trajectory was built. The direction of building is represented as a PropagationDirection, which has two possible values: alongMomentum (outwards) and oppositeToMomentum (inwards), and is accessed with the direction() method.

Definition at line 40 of file Trajectory.h.

Member Typedef Documentation

Definition at line 45 of file Trajectory.h.

Definition at line 44 of file Trajectory.h.

Definition at line 46 of file Trajectory.h.

Constructor & Destructor Documentation

Trajectory::Trajectory ( )
inline

Default constructor of an empty trajectory with undefined seed and undefined direction. This constructor is necessary in order to transiently copy vector<Trajectory> in the edm::Event

Definition at line 53 of file Trajectory.h.

Trajectory::Trajectory ( const TrajectorySeed seed)
inlineexplicit

Constructor of an empty trajectory with undefined direction. The direction will be defined at the moment of the push of a second measurement, from the relative radii of the first and second measurements.

Definition at line 77 of file Trajectory.h.

Trajectory::Trajectory ( const TrajectorySeed seed,
PropagationDirection  dir 
)
inline

Constructor of an empty trajectory with defined direction. No check is made in the push method that measurements are added in the correct direction.

Definition at line 98 of file Trajectory.h.

Trajectory::Trajectory ( const boost::shared_ptr< const TrajectorySeed > &  seed,
PropagationDirection  dir 
)
inline

Constructor of an empty trajectory with defined direction. No check is made in the push method that measurements are added in the correct direction.

Definition at line 119 of file Trajectory.h.

Trajectory::Trajectory ( PropagationDirection  dir)
inlineexplicit

Constructor of an empty trajectory with defined direction. No check is made in the push method that measurements are added in the correct direction.

Definition at line 140 of file Trajectory.h.

Trajectory::Trajectory ( Trajectory const &  rh)
default
Trajectory::Trajectory ( Trajectory &&  rh)
inline

Definition at line 161 of file Trajectory.h.

Member Function Documentation

bool Trajectory::badForCCC ( const TrajectoryMeasurement tm)
private

Definition at line 162 of file Trajectory.cc.

int Trajectory::cccBadHits ( ) const
inline

Number of hits that are not compatible with the CCC used during patter recognition. Used mainly as a criteria for abandoning a trajectory candidate during trajectory building.

Definition at line 292 of file Trajectory.h.

float Trajectory::cccThreshold ( ) const
inline

Definition at line 380 of file Trajectory.h.

void Trajectory::check ( void  ) const
private

Definition at line 130 of file Trajectory.cc.

float Trajectory::chiSquared ( ) const
inline
  • Trajectories with at least 1 valid hit: value of the raw Chi2 of the trajectory, not normalised to the N.D.F. (evaluated using only valid hits)
  • Trajectories with only invalid hits: raw Chi2 (not norm.) of invalid hits w.r.t. the "default" trajectory (traj. containing only the seed information)

Definition at line 307 of file Trajectory.h.

Referenced by cms::CompareTrajLay::operator()(), cms::CompareTrajChi::operator()(), and ConversionTrackFinder::ExtractChi2::operator()().

TrajectoryMeasurement const & Trajectory::closestMeasurement ( GlobalPoint  point) const

Definition at line 232 of file Trajectory.cc.

DataContainer const& Trajectory::data ( ) const
inline

obsolete name, use measurements() instead.

Definition at line 254 of file Trajectory.h.

PropagationDirection const & Trajectory::direction ( ) const

Direction of "growing" of the trajectory. Possible values are alongMomentum (outwards) and oppositeToMomentum (inwards).

Definition at line 125 of file Trajectory.cc.

Referenced by KFSplittingFitter::fitOne(), TransientInitialStateEstimator::innerState(), ConversionHitChecker::nHitsBeforeVtx(), Traj2TrackHits::operator()(), TrajAnnealing::TrajAnnealing(), and trajectoryToResiduals().

float Trajectory::dPhiCacheForLoopersReconstruction ( ) const
inline

accessor to the delta phi angle betweem the directions of the two measurements on the last two layers crossed by the trajectory

Definition at line 378 of file Trajectory.h.

bool Trajectory::empty ( void  ) const
inline

True if trajectory has no measurements.

Definition at line 299 of file Trajectory.h.

Referenced by KFSplittingFitter::fitOne().

TrajectoryMeasurement const& Trajectory::firstMeasurement ( ) const
inline

Access to the first measurement. It is the least precise one in a trajectory before smoothing. It is precise in a smoothed trajectory. It's the innermost measurement if direction() == alongMomentum, the outermost one if direction() == oppositeToMomentum.

Definition at line 241 of file Trajectory.h.

Referenced by KFSplittingFitter::fitOne(), and TransientInitialStateEstimator::innerState().

int Trajectory::foundHits ( ) const
inline

Number of valid RecHits used to determine the trajectory. Can be less than the number of measurements in data() since detector layers crossed without using RecHits from them are also stored as measurements.

Definition at line 279 of file Trajectory.h.

Referenced by lessByFoundHits(), TrajectoryLessByFoundHits::operator()(), cms::CompareTrajLay::operator()(), cms::CompareTrajChi::operator()(), ConversionTrackFinder::ExtractNumOfHits::operator()(), ThresholdPtTrajectoryFilter::qualityFilter(), MinPtTrajectoryFilter::qualityFilter(), ThresholdPtTrajectoryFilter::toBeContinued(), and MinPtTrajectoryFilter::toBeContinued().

TrajectoryStateOnSurface Trajectory::geometricalInnermostState ( ) const

Definition at line 195 of file Trajectory.cc.

static bool Trajectory::inactive ( )
inlinestatic

Definition of inactive Det from the Trajectory point of view.

Definition at line 335 of file Trajectory.h.

void Trajectory::incrementLoops ( )
inline

Definition at line 390 of file Trajectory.h.

void Trajectory::invalidate ( )
inline

Method to invalidate a trajectory. Useful during ambiguity resolution.

Definition at line 327 of file Trajectory.h.

Referenced by TrajectoryCleanerBySharedHits::clean().

bool Trajectory::isBad ( const TrackingRecHit hit)
static

Returns true if the hit type is TrackingRecHit::bad Used in stand-alone trajectory construction

Definition at line 151 of file Trajectory.cc.

bool Trajectory::isLooper ( ) const
inline

Definition at line 386 of file Trajectory.h.

bool Trajectory::isValid ( void  ) const
inline

Returns true if the Trajectory is valid. Trajectories are invalidated e.g. during ambiguity resolution.

Definition at line 324 of file Trajectory.h.

Referenced by TransientInitialStateEstimator::innerState(), ChargeSignificanceTrajectoryFilter::qualityFilter(), core.AutoHandle.AutoHandle::ReallyLoad(), and TrajectorySmoother::trajectories().

const DetLayer* Trajectory::lastLayer ( ) const
inline

Redundant method, returns the layer of lastMeasurement() .

Definition at line 349 of file Trajectory.h.

TrajectoryMeasurement const& Trajectory::lastMeasurement ( ) const
inline

Access to the last measurement. It's the most precise one in a trajectory before smoothing. It's the outermost measurement if direction() == alongMomentum, the innermost one if direction() == oppositeToMomentum.

Definition at line 228 of file Trajectory.h.

Referenced by TransientInitialStateEstimator::innerState(), ThresholdPtTrajectoryFilter::qualityFilter(), MinPtTrajectoryFilter::qualityFilter(), StandAloneMuonRefitter::singleRefit(), ThresholdPtTrajectoryFilter::toBeContinued(), and MinPtTrajectoryFilter::toBeContinued().

bool Trajectory::lost ( const TrackingRecHit hit)
static

Definition of what it means for a hit to be "lost". This definition is also used by the TrajectoryBuilder.

Definition at line 135 of file Trajectory.cc.

Referenced by MaxConsecLostHitsTrajectoryFilter::TBC().

int Trajectory::lostHits ( ) const
inline

Number of detector layers crossed without valid RecHits. Used mainly as a criteria for abandoning a trajectory candidate during trajectory building.

Definition at line 286 of file Trajectory.h.

Referenced by TrajectoryCleanerBySharedHits::clean().

DataContainer const& Trajectory::measurements ( ) const
inline
DataContainer& Trajectory::measurements ( )
inline

Definition at line 251 of file Trajectory.h.

int Trajectory::ndof ( bool  bon = true) const

Number of dof of the trajectory. The method accepts a bool in order to properly take into account the presence of magnetic field in the dof computation. By default the MF is considered ON.

Definition at line 85 of file Trajectory.cc.

signed char Trajectory::nLoops ( ) const
inline

Definition at line 387 of file Trajectory.h.

Referenced by TransientInitialStateEstimator::innerState().

int Trajectory::numberOfCCCBadHits ( float  ccc_threshold)

Definition at line 190 of file Trajectory.cc.

Trajectory& Trajectory::operator= ( Trajectory const &  rh)
default
Trajectory& Trajectory::operator= ( Trajectory &&  rh)
inline

Definition at line 179 of file Trajectory.h.

void Trajectory::pop ( )

Remove the last measurement from the trajectory.

Definition at line 16 of file Trajectory.cc.

void Trajectory::push ( const TrajectoryMeasurement tm)

Add a new measurement to a Trajectory. The Chi2 of the trajectory is incremented by the value of tm.estimate() .

Definition at line 35 of file Trajectory.cc.

Referenced by MuonMillepedeTrackRefitter::produce(), and TempTrajectory::toTrajectory().

void Trajectory::push ( const TrajectoryMeasurement tm,
double  chi2Increment 
)

same as the one-argument push, but the trajectory Chi2 is incremented by chi2Increment. Useful e.g. in trajectory smoothing.

Definition at line 46 of file Trajectory.cc.

void Trajectory::push ( TrajectoryMeasurement &&  tm)

Definition at line 40 of file Trajectory.cc.

void Trajectory::push ( TrajectoryMeasurement &&  tm,
double  chi2Increment 
)

Definition at line 50 of file Trajectory.cc.

void Trajectory::pushAux ( double  chi2Increment)
private

Definition at line 55 of file Trajectory.cc.

ConstRecHitContainer Trajectory::recHits ( void  ) const
inline
void Trajectory::reserve ( unsigned int  n)
inline

Reserves space in the vector to avoid lots of allocations when push_back-ing measurements

Definition at line 204 of file Trajectory.h.

Referenced by TempTrajectory::toTrajectory().

void Trajectory::reverse ( )

Reverse the propagation direction and the order of the trajectory measurements. It doesn't reverse the forward and backward predicted states within each trajectory measurement

Definition at line 239 of file Trajectory.cc.

TrajectorySeed const& Trajectory::seed ( ) const
inline

Access to the seed used to reconstruct the Trajectory.

Definition at line 330 of file Trajectory.h.

Referenced by KFSplittingFitter::fitOne(), and StandAloneMuonRefitter::singleRefit().

unsigned int Trajectory::seedNHits ( ) const
inline

Definition at line 295 of file Trajectory.h.

edm::RefToBase<TrajectorySeed> Trajectory::seedRef ( void  ) const
inline

return the Reference to the trajectory seed in the original seeds collection. If the collection has been dropped from the Event, the reference may be invalid. Its validity should be tested, before the reference is actually used.

Definition at line 361 of file Trajectory.h.

void Trajectory::setDPhiCacheForLoopersReconstruction ( float  dphi)
inline

method to set the delta phi angle betweem the directions of the two measurements on the last two layers crossed by the trajectory

Definition at line 384 of file Trajectory.h.

void Trajectory::setNLoops ( signed char  value)
inline

Definition at line 389 of file Trajectory.h.

Referenced by TempTrajectory::toTrajectory().

void Trajectory::setSeedRef ( const edm::RefToBase< TrajectorySeed > &  seedRef)
inline

Definition at line 363 of file Trajectory.h.

void Trajectory::setSharedSeed ( const boost::shared_ptr< const TrajectorySeed > &  seed)
inline

Definition at line 374 of file Trajectory.h.

void Trajectory::setStopReason ( StopReason  s)
inline
const boost::shared_ptr<const TrajectorySeed>& Trajectory::sharedSeed ( ) const
inline

Definition at line 373 of file Trajectory.h.

StopReason Trajectory::stopReason ( ) const
inline

Definition at line 393 of file Trajectory.h.

void Trajectory::updateBadForCCC ( float  ccc_threshold)
private

Definition at line 175 of file Trajectory.cc.

void Trajectory::validRecHits ( ConstRecHitContainer cont) const

Just valid hits..

Definition at line 117 of file Trajectory.cc.

Member Data Documentation

edm::RefToBase<TrajectorySeed> Trajectory::seedRef_
private

Definition at line 404 of file Trajectory.h.

StopReason Trajectory::stopReason_
private

Definition at line 421 of file Trajectory.h.

float Trajectory::theCCCThreshold_
private

Definition at line 419 of file Trajectory.h.

float Trajectory::theChiSquared
private

Definition at line 407 of file Trajectory.h.

float Trajectory::theChiSquaredBad
private

Definition at line 408 of file Trajectory.h.

DataContainer Trajectory::theData
private

Definition at line 406 of file Trajectory.h.

PropagationDirection Trajectory::theDirection
private

Definition at line 414 of file Trajectory.h.

bool Trajectory::theDirectionValidity
private

Definition at line 415 of file Trajectory.h.

float Trajectory::theDPhiCache
private

Definition at line 418 of file Trajectory.h.

signed char Trajectory::theNLoops
private

Definition at line 420 of file Trajectory.h.

signed short Trajectory::theNumberOfCCCBadHits_
private

Definition at line 412 of file Trajectory.h.

signed short Trajectory::theNumberOfFoundHits
private

Definition at line 410 of file Trajectory.h.

signed short Trajectory::theNumberOfLostHits
private

Definition at line 411 of file Trajectory.h.

boost::shared_ptr<const TrajectorySeed> Trajectory::theSeed
private

Definition at line 403 of file Trajectory.h.

bool Trajectory::theValid
private

Definition at line 416 of file Trajectory.h.