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, const TSOS &firstPredTsos, fitType type) const override
 
Trajectory fitOne (const TrajectorySeed &aSeed, const RecHitContainer &hits, 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, const TrajectoryStateOnSurface &tsos, fitType type=standard) const
 
std::vector< Trajectoryfit (const TrajectorySeed &seed, const RecHitContainer &hits, 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.

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

Referenced by clone().

◆ 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) {}

Member Function Documentation

◆ clone()

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

Implements TrajectoryFitter.

Definition at line 33 of file KFSplittingFitter.h.

33  {
34  return std::unique_ptr<TrajectoryFitter>(
36  }

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

◆ fitOne() [1/3]

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

Implements TrajectoryFitter.

Definition at line 24 of file KFSplittingFitter.cc.

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 }

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

◆ fitOne() [2/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.

48  {
50  sorter(hits, aSeed.direction(), result);
51 
52  return fitter.fitOne(aSeed, result, firstPredTsos, type);
53 }

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

◆ fitOne() [3/3]

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

Implements TrajectoryFitter.

Definition at line 38 of file KFSplittingFitter.cc.

38  {
40  sorter(hits, aSeed.direction(), result);
41 
42  return fitter.fitOne(aSeed, result, type);
43 }

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

◆ setHitCloner()

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

Implements TrajectoryFitter.

Definition at line 45 of file KFSplittingFitter.h.

45 { fitter.setHitCloner(hc); }

References fitter, and KFTrajectoryFitter::setHitCloner().

◆ sorter()

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

Definition at line 6 of file KFSplittingFitter.cc.

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 }

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

Referenced by fitOne().

Member Data Documentation

◆ fitter

KFTrajectoryFitter KFSplittingFitter::fitter
private

Definition at line 50 of file KFSplittingFitter.h.

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

hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
Trajectory::direction
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
RecHitSplitter
Definition: RecHitSplitter.h:13
TrajectoryStateWithArbitraryError
Definition: TrajectoryStateWithArbitraryError.h:15
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
KFTrajectoryFitter::updator
const TrajectoryStateUpdator * updator() const
Definition: KFTrajectoryFitter.h:83
KFSplittingFitter::RecHitContainer
RecHitSplitter::RecHitContainer RecHitContainer
Definition: KFSplittingFitter.h:16
KFSplittingFitter::sorter
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
Definition: KFSplittingFitter.cc:6
RecHitSplitter::split
RecHitContainer split(const RecHitContainer &hits) const
Definition: RecHitSplitter.cc:3
KFSplittingFitter::KFSplittingFitter
KFSplittingFitter(const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator)
Definition: KFSplittingFitter.h:23
KFSplittingFitter::fitter
KFTrajectoryFitter fitter
Definition: KFSplittingFitter.h:50
KFTrajectoryFitter::fitOne
Trajectory fitOne(const Trajectory &aTraj, fitType) const override
Definition: KFTrajectoryFitter.cc:14
TrajectorySeed::direction
PropagationDirection direction() const
Definition: TrajectorySeed.h:54
KFTrajectoryFitter::propagator
const Propagator * propagator() const
Definition: KFTrajectoryFitter.h:82
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
KFTrajectoryFitter::setHitCloner
void setHitCloner(TkCloner const *hc) override
Definition: KFTrajectoryFitter.h:94
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
RecHitSorter
Definition: RecHitSorter.h:13
Trajectory::recHits
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
KFSplittingFitter::TM
TrajectoryMeasurement TM
Definition: KFSplittingFitter.h:20
Trajectory::firstMeasurement
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
Trajectory
Definition: Trajectory.h:38
Trajectory::seed
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:263
KFTrajectoryFitter::estimator
const MeasurementEstimator * estimator() const
Definition: KFTrajectoryFitter.h:84
mps_fire.result
result
Definition: mps_fire.py:311
RecHitSorter::sortHits
RecHitContainer sortHits(const RecHitContainer &hits, const PropagationDirection &dir) const
Definition: RecHitSorter.cc:6
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
Trajectory::empty
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:233