CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KFTrajectoryFitter.h
Go to the documentation of this file.
1 #ifndef CD_KFTrajectoryFitter_H_
2 #define CD_KFTrajectoryFitter_H_
3 
21 
23 
24 private:
25 
29 
30 public:
31 
32 
33  // backward compatible (too many places it uses as such...)
34  KFTrajectoryFitter(const Propagator& aPropagator,
35  const TrajectoryStateUpdator& aUpdator,
36  const MeasurementEstimator& aEstimator,
37  int minHits = 3,
38  const DetLayerGeometry* detLayerGeometry=0) :
39  thePropagator(aPropagator.clone()),
40  theUpdator(aUpdator.clone()),
41  theEstimator(aEstimator.clone()),
42  theGeometry(detLayerGeometry),
43  minHits_(minHits),
44  owner(true){
46  // FIXME. Why this first constructor is needed? who is using it? Can it be removed?
47  // it is uses in many many places
48  }
49 
50 
51  KFTrajectoryFitter(const Propagator* aPropagator,
52  const TrajectoryStateUpdator* aUpdator,
53  const MeasurementEstimator* aEstimator,
54  int minHits = 3,
55  const DetLayerGeometry* detLayerGeometry=0) :
56  thePropagator(aPropagator),
57  theUpdator(aUpdator),
58  theEstimator(aEstimator),
59  theGeometry(detLayerGeometry),
60  minHits_(minHits),
61  owner(false){
63  }
64 
66  if (owner) {
67  delete thePropagator;
68  delete theUpdator;
69  delete theEstimator;
70  }
71  }
72 
73  virtual std::vector<Trajectory> fit(const Trajectory& aTraj) const;
74  virtual std::vector<Trajectory> fit(const TrajectorySeed& aSeed,
75  const RecHitContainer& hits) const;
76 
77  virtual std::vector<Trajectory> fit(const TrajectorySeed& aSeed,
78  const RecHitContainer& hits,
79  const TSOS& firstPredTsos) const;
80 
81  const Propagator* propagator() const {return thePropagator;}
82  const TrajectoryStateUpdator* updator() const {return theUpdator;}
83  const MeasurementEstimator* estimator() const {return theEstimator;}
84 
85  virtual KFTrajectoryFitter* clone() const
86  {
87  return owner ?
90  }
91 
92 private:
94 
95 
101  int minHits_;
102  bool owner;
103 };
104 
105 #endif //CD_KFTrajectoryFitter_H_
FreeTrajectoryState FTS
const TrajectoryStateUpdator * updator() const
KFTrajectoryFitter(const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator, int minHits=3, const DetLayerGeometry *detLayerGeometry=0)
const MeasurementEstimator * estimator() const
const MeasurementEstimator * theEstimator
virtual KFTrajectoryFitter * clone() const
TrajectoryMeasurement TM
const TrajectoryStateUpdator * theUpdator
static const DetLayerGeometry dummyGeometry
virtual std::vector< Trajectory > fit(const Trajectory &aTraj) const
KFTrajectoryFitter(const Propagator *aPropagator, const TrajectoryStateUpdator *aUpdator, const MeasurementEstimator *aEstimator, int minHits=3, const DetLayerGeometry *detLayerGeometry=0)
TrajectoryStateOnSurface TSOS
const DetLayerGeometry * theGeometry
const Propagator * propagator() const
const Propagator * thePropagator
Trajectory::RecHitContainer RecHitContainer