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 
19 
21 
22 private:
23 
27 
28 public:
29 
30 
31  // backward compatible (too many places it uses as such...)
32  KFTrajectoryFitter(const Propagator& aPropagator,
33  const TrajectoryStateUpdator& aUpdator,
34  const MeasurementEstimator& aEstimator,
35  int minHits = 3,
36  const DetLayerGeometry* detLayerGeometry=0) :
37  thePropagator(aPropagator.clone()),
38  theUpdator(aUpdator.clone()),
39  theEstimator(aEstimator.clone()),
40  theGeometry(detLayerGeometry),
41  minHits_(minHits),
42  owner(true){
43  if(!theGeometry) theGeometry = &dummyGeometry;
44  // FIXME. Why this first constructor is needed? who is using it? Can it be removed?
45  // it is uses in many many places
46  }
47 
48 
49  KFTrajectoryFitter(const Propagator* aPropagator,
50  const TrajectoryStateUpdator* aUpdator,
51  const MeasurementEstimator* aEstimator,
52  int minHits = 3,
53  const DetLayerGeometry* detLayerGeometry=0) :
54  thePropagator(aPropagator),
55  theUpdator(aUpdator),
56  theEstimator(aEstimator),
57  theGeometry(detLayerGeometry),
58  minHits_(minHits),
59  owner(false){
60  if(!theGeometry) theGeometry = &dummyGeometry;
61  }
62 
64  if (owner) {
65  delete thePropagator;
66  delete theUpdator;
67  delete theEstimator;
68  }
69  }
70 
71  Trajectory fitOne(const Trajectory& aTraj,fitType) const;
72  Trajectory fitOne(const TrajectorySeed& aSeed,
73  const RecHitContainer& hits,fitType) const;
74 
75  Trajectory fitOne(const TrajectorySeed& aSeed,
76  const RecHitContainer& hits,
77  const TSOS& firstPredTsos,fitType) const;
78 
79  const Propagator* propagator() const {return thePropagator;}
80  const TrajectoryStateUpdator* updator() const {return theUpdator;}
81  const MeasurementEstimator* estimator() const {return theEstimator;}
82 
83  virtual KFTrajectoryFitter* clone() const
84  {
85  return owner ?
86  new KFTrajectoryFitter(*thePropagator,*theUpdator,*theEstimator,minHits_,theGeometry) :
87  new KFTrajectoryFitter(thePropagator,theUpdator,theEstimator,minHits_,theGeometry);
88  }
89 
90 private:
92 
93 
95  const Propagator* thePropagator;
96  const TrajectoryStateUpdator* theUpdator;
97  const MeasurementEstimator* theEstimator;
98  const DetLayerGeometry* theGeometry;
99  int minHits_;
100  bool owner;
101 };
102 
103 #endif //CD_KFTrajectoryFitter_H_
const TrajectoryStateUpdator * updator() const
KFTrajectoryFitter(const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator, int minHits=3, const DetLayerGeometry *detLayerGeometry=0)
static const DetLayerGeometry dummyGeometry
TrajectoryMeasurement TM
virtual KFTrajectoryFitter * clone() const
TrajectoryStateOnSurface TSOS
const MeasurementEstimator * estimator() const
tuple clone
Definition: statics.py:58
volatile std::atomic< bool > shutdown_flag false
FreeTrajectoryState FTS
KFTrajectoryFitter(const Propagator *aPropagator, const TrajectoryStateUpdator *aUpdator, const MeasurementEstimator *aEstimator, int minHits=3, const DetLayerGeometry *detLayerGeometry=0)
const Propagator * propagator() const
Unlimited (trivial) bounds.