CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
KFSplittingFitter Class Referencefinal

#include <KFSplittingFitter.h>

Inheritance diagram for KFSplittingFitter:
TrajectoryFitter

Public Member Functions

std::unique_ptr< TrajectoryFitterclone () const override
 
Trajectory fitOne (const Trajectory &aTraj, fitType type) const override
 
Trajectory fitOne (const TrajectorySeed &aSeed, const RecHitContainer &hits, fitType type) const override
 
Trajectory fitOne (const TrajectorySeed &aSeed, const RecHitContainer &hits, const TSOS &firstPredTsos, fitType type) const override
 
 KFSplittingFitter (const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator)
 
 KFSplittingFitter (const Propagator *aPropagator, const TrajectoryStateUpdator *aUpdator, const MeasurementEstimator *aEstimator)
 
void setHitCloner (TkCloner const *hc) override
 
- Public Member Functions inherited from TrajectoryFitter
std::vector< Trajectoryfit (const Trajectory &traj, fitType type=standard) const
 
std::vector< Trajectoryfit (const TrajectorySeed &seed, const RecHitContainer &hits, fitType type=standard) const
 
std::vector< Trajectoryfit (const TrajectorySeed &seed, const RecHitContainer &hits, const TrajectoryStateOnSurface &tsos, fitType type=standard) const
 
virtual ~TrajectoryFitter ()
 

Private Types

typedef FreeTrajectoryState FTS
 
typedef RecHitSplitter::RecHitContainer RecHitContainer
 
typedef TrajectoryMeasurement TM
 
typedef TrajectoryStateOnSurface TSOS
 

Private Member Functions

void sorter (const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
 

Private Attributes

KFTrajectoryFitter fitter
 

Additional Inherited Members

- Public Types inherited from TrajectoryFitter
enum  fitType { standard = 0, looper = 1 }
 
typedef Trajectory::RecHitContainer RecHitContainer
 
typedef TrajectoryFitterRecord Record
 

Detailed Description

Definition at line 14 of file KFSplittingFitter.h.

Member Typedef Documentation

◆ FTS

Definition at line 19 of file KFSplittingFitter.h.

◆ RecHitContainer

Definition at line 16 of file KFSplittingFitter.h.

◆ TM

Definition at line 20 of file KFSplittingFitter.h.

◆ TSOS

Definition at line 18 of file KFSplittingFitter.h.

Constructor & Destructor Documentation

◆ KFSplittingFitter() [1/2]

KFSplittingFitter::KFSplittingFitter ( const Propagator aPropagator,
const TrajectoryStateUpdator aUpdator,
const MeasurementEstimator aEstimator 
)
inline

Definition at line 23 of file KFSplittingFitter.h.

Referenced by clone().

26  : fitter(aPropagator, aUpdator, aEstimator) {}
KFTrajectoryFitter fitter

◆ KFSplittingFitter() [2/2]

KFSplittingFitter::KFSplittingFitter ( const Propagator aPropagator,
const TrajectoryStateUpdator aUpdator,
const MeasurementEstimator aEstimator 
)
inline

Definition at line 28 of file KFSplittingFitter.h.

31  : fitter(aPropagator, aUpdator, aEstimator) {}
KFTrajectoryFitter fitter

Member Function Documentation

◆ clone()

std::unique_ptr<TrajectoryFitter> KFSplittingFitter::clone ( void  ) const
inlineoverridevirtual

Implements TrajectoryFitter.

Definition at line 33 of file KFSplittingFitter.h.

References KFTrajectoryFitter::estimator(), fitter, KFSplittingFitter(), KFTrajectoryFitter::propagator(), and KFTrajectoryFitter::updator().

33  {
34  return std::unique_ptr<TrajectoryFitter>(
36  }
const MeasurementEstimator * estimator() const
KFSplittingFitter(const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator)
KFTrajectoryFitter fitter
const TrajectoryStateUpdator * updator() const
const Propagator * propagator() const

◆ fitOne() [1/3]

Trajectory KFSplittingFitter::fitOne ( const Trajectory aTraj,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 24 of file KFSplittingFitter.cc.

References Trajectory::direction(), Trajectory::empty(), Trajectory::firstMeasurement(), KFTrajectoryFitter::fitOne(), fitter, hfClusterShapes_cfi::hits, TrajectoryMeasurement::predictedState(), Trajectory::recHits(), mps_fire::result, Trajectory::seed(), and sorter().

24  {
25  if (aTraj.empty())
26  return Trajectory();
27 
28  const TM& firstTM = aTraj.firstMeasurement();
29  TSOS firstTsos = TrajectoryStateWithArbitraryError()(firstTM.predictedState());
30 
31  RecHitContainer const& hits = aTraj.recHits();
33  sorter(hits, aTraj.direction(), result);
34 
35  return fitter.fitOne(aTraj.seed(), result, firstTsos, type);
36 }
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
KFTrajectoryFitter fitter
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:263
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:233
TrajectoryMeasurement TM
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
Trajectory fitOne(const Trajectory &aTraj, fitType) const override

◆ fitOne() [2/3]

Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 38 of file KFSplittingFitter.cc.

References TrajectorySeed::direction(), KFTrajectoryFitter::fitOne(), fitter, hfClusterShapes_cfi::hits, mps_fire::result, and sorter().

38  {
40  sorter(hits, aSeed.direction(), result);
41 
42  return fitter.fitOne(aSeed, result, type);
43 }
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
PropagationDirection direction() const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
Trajectory fitOne(const Trajectory &aTraj, fitType) const override

◆ fitOne() [3/3]

Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
const TSOS firstPredTsos,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 45 of file KFSplittingFitter.cc.

References TrajectorySeed::direction(), KFTrajectoryFitter::fitOne(), fitter, hfClusterShapes_cfi::hits, mps_fire::result, and sorter().

48  {
50  sorter(hits, aSeed.direction(), result);
51 
52  return fitter.fitOne(aSeed, result, firstPredTsos, type);
53 }
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
PropagationDirection direction() const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
Trajectory fitOne(const Trajectory &aTraj, fitType) const override

◆ setHitCloner()

void KFSplittingFitter::setHitCloner ( TkCloner const *  hc)
inlineoverridevirtual

Implements TrajectoryFitter.

Definition at line 45 of file KFSplittingFitter.h.

References fitter, and KFTrajectoryFitter::setHitCloner().

45 { fitter.setHitCloner(hc); }
KFTrajectoryFitter fitter
void setHitCloner(TkCloner const *hc) override

◆ sorter()

void KFSplittingFitter::sorter ( const RecHitContainer hits,
PropagationDirection  dir,
RecHitContainer result 
) const
private

Definition at line 6 of file KFSplittingFitter.cc.

References DeadROC_duringRun::dir, hfClusterShapes_cfi::hits, mps_fire::result, RecHitSorter::sortHits(), and RecHitSplitter::split().

Referenced by fitOne().

6  {
7  result.reserve(hits.size());
8  for (RecHitContainer::const_iterator ihit = hits.begin(); ihit != hits.end(); ihit++) {
9  if (!(**ihit).isValid())
10  result.push_back(*ihit);
11  else if ((**ihit).transientHits().size() == 1)
12  result.push_back(*ihit);
13  else {
14  RecHitContainer splitted = RecHitSplitter().split((**ihit).transientHits());
15  RecHitContainer sorted = RecHitSorter().sortHits(splitted, dir);
16  for (RecHitContainer::iterator srt = sorted.begin(); srt != sorted.end(); srt++) {
17  result.push_back(*srt);
18  // result.insert(result.end(), sorted.begin(), sorted.end());
19  }
20  }
21  }
22 }
RecHitContainer split(const RecHitContainer &hits) const
RecHitSplitter::RecHitContainer RecHitContainer
RecHitContainer sortHits(const RecHitContainer &hits, const PropagationDirection &dir) const
Definition: RecHitSorter.cc:6

Member Data Documentation

◆ fitter

KFTrajectoryFitter KFSplittingFitter::fitter
private

Definition at line 50 of file KFSplittingFitter.h.

Referenced by clone(), fitOne(), and setHitCloner().