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

virtual 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)
 
virtual 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

Definition at line 21 of file KFSplittingFitter.h.

Definition at line 18 of file KFSplittingFitter.h.

Definition at line 22 of file KFSplittingFitter.h.

Definition at line 20 of file KFSplittingFitter.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file KFSplittingFitter.h.

Referenced by clone().

28  :
29  fitter(aPropagator, aUpdator, aEstimator) {}
KFTrajectoryFitter fitter
KFSplittingFitter::KFSplittingFitter ( const Propagator aPropagator,
const TrajectoryStateUpdator aUpdator,
const MeasurementEstimator aEstimator 
)
inline

Definition at line 32 of file KFSplittingFitter.h.

34  :
35  fitter(aPropagator, aUpdator, aEstimator) {}
KFTrajectoryFitter fitter

Member Function Documentation

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

Implements TrajectoryFitter.

Definition at line 37 of file KFSplittingFitter.h.

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

37  {
38  return std::unique_ptr<TrajectoryFitter>(
40  fitter.updator(),
41  fitter.estimator()));
42  }
const TrajectoryStateUpdator * updator() const
const MeasurementEstimator * estimator() const
KFSplittingFitter(const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator)
KFTrajectoryFitter fitter
const Propagator * propagator() const
Trajectory KFSplittingFitter::fitOne ( const Trajectory aTraj,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 27 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().

Referenced by clone().

27  {
28 
29  if(aTraj.empty()) return Trajectory();
30 
31  TM firstTM = aTraj.firstMeasurement();
32  TSOS firstTsos =
33  TrajectoryStateWithArbitraryError()(firstTM.predictedState());
34 
35  RecHitContainer const & hits = aTraj.recHits();
37  sorter(hits,aTraj.direction(),result);
38 
39 
40  return fitter.fitOne(aTraj.seed(), result, firstTsos,type);
41 
42 }
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:254
type
Definition: HCALResponse.h:21
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:285
ConstRecHitContainer recHits() const
Definition: Trajectory.h:204
Trajectory fitOne(const Trajectory &aTraj, fitType) const override
PropagationDirection const & direction() const
Definition: Trajectory.cc:140
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:187
TrajectoryMeasurement TM
Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 44 of file KFSplittingFitter.cc.

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

46  {
47 
49  sorter(hits,aSeed.direction(),result);
50 
51 
52  return fitter.fitOne(aSeed, result, type);
53 
54 
55 }
PropagationDirection direction() const
type
Definition: HCALResponse.h:21
Trajectory fitOne(const Trajectory &aTraj, fitType) const override
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
const TSOS firstPredTsos,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 57 of file KFSplittingFitter.cc.

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

59  {
60 
62  sorter(hits,aSeed.direction(),result);
63 
64 
65  return fitter.fitOne(aSeed, result, firstPredTsos,type);
66 
67 }
PropagationDirection direction() const
type
Definition: HCALResponse.h:21
Trajectory fitOne(const Trajectory &aTraj, fitType) const override
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
virtual void KFSplittingFitter::setHitCloner ( TkCloner const *  hc)
inlineoverridevirtual

Implements TrajectoryFitter.

Definition at line 54 of file KFSplittingFitter.h.

References dir, fitter, mps_fire::result, KFTrajectoryFitter::setHitCloner(), and sorter().

54  {
56  }
virtual void setHitCloner(TkCloner const *hc) override
KFTrajectoryFitter fitter
susybsm::HSCParticleCollection hc
Definition: classes.h:25
void KFSplittingFitter::sorter ( const RecHitContainer hits,
PropagationDirection  dir,
RecHitContainer result 
) const
private

Definition at line 8 of file KFSplittingFitter.cc.

References RecHitSorter::sortHits(), and RecHitSplitter::split().

Referenced by fitOne(), and setHitCloner().

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

Member Data Documentation

KFTrajectoryFitter KFSplittingFitter::fitter
private

Definition at line 62 of file KFSplittingFitter.h.

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