CMS 3D CMS Logo

KFTrajectorySmoother.h
Go to the documentation of this file.
1 #ifndef CD_KFTrajectorySmoother_H_
2 #define CD_KFTrajectorySmoother_H_
3 
19 
21 private:
25 
26 public:
27  KFTrajectorySmoother(const Propagator& aPropagator,
28  const TrajectoryStateUpdator& aUpdator,
29  const MeasurementEstimator& aEstimator,
30  float errorRescaling = 100.f,
31  int minHits = 3)
32  : theAlongPropagator(nullptr),
33  theOppositePropagator(nullptr),
34  theUpdator(aUpdator.clone()),
35  theEstimator(aEstimator.clone()),
38  // to be fixed. Why this first constructor is needed? who is using it? Can it be removed?
39  theGeometry(nullptr) {
40  if (!theGeometry)
42  auto p = aPropagator.clone();
43  p->setPropagationDirection(alongMomentum);
45  p = aPropagator.clone();
46  p->setPropagationDirection(oppositeToMomentum);
48  }
49 
50  KFTrajectorySmoother(const Propagator* aPropagator,
51  const TrajectoryStateUpdator* aUpdator,
52  const MeasurementEstimator* aEstimator,
53  float errorRescaling = 100.f,
54  int minHits = 3,
55  const DetLayerGeometry* detLayerGeometry = nullptr,
56  TkCloner const* hc = nullptr)
57  : theAlongPropagator(nullptr),
58  theOppositePropagator(nullptr),
59  theUpdator(aUpdator->clone()),
60  theEstimator(aEstimator->clone()),
61  theHitCloner(hc),
64  theGeometry(detLayerGeometry) {
65  if (!theGeometry)
67  auto p = aPropagator->clone();
68  p->setPropagationDirection(alongMomentum);
70  p = aPropagator->clone();
71  p->setPropagationDirection(oppositeToMomentum);
73  }
74 
75  ~KFTrajectorySmoother() override;
76 
77  Trajectory trajectory(const Trajectory& aTraj) const override;
78 
79  const Propagator* alongPropagator() const { return theAlongPropagator; }
81 
82  const TrajectoryStateUpdator* updator() const { return theUpdator; }
83  const MeasurementEstimator* estimator() const { return theEstimator; }
84 
85  KFTrajectorySmoother* clone() const override {
86  return new KFTrajectorySmoother(
88  }
89 
90  // FIXME a prototype: final inplementaiton may differ
91  void setHitCloner(TkCloner const* hc) override { theHitCloner = hc; }
92 
93 private:
99  TkCloner const* theHitCloner = nullptr;
101  int minHits_;
103 };
104 
105 #endif //CD_KFTrajectorySmoother_H_
const DetLayerGeometry dummyGeometry
Trajectory trajectory(const Trajectory &aTraj) const override
const DetLayerGeometry * theGeometry
TrajectoryStateOnSurface TSOS
virtual Propagator * clone() const =0
KFTrajectorySmoother * clone() const override
KFTrajectorySmoother(const Propagator *aPropagator, const TrajectoryStateUpdator *aUpdator, const MeasurementEstimator *aEstimator, float errorRescaling=100.f, int minHits=3, const DetLayerGeometry *detLayerGeometry=nullptr, TkCloner const *hc=nullptr)
KFTrajectorySmoother(const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator, float errorRescaling=100.f, int minHits=3)
const Propagator * alongPropagator() const
double f[11][100]
const MeasurementEstimator * theEstimator
const TrajectoryStateUpdator * theUpdator
TrajectoryMeasurement TM
FreeTrajectoryState FTS
const MeasurementEstimator * estimator() const
const TrajectoryStateUpdator * updator() const
void setHitCloner(TkCloner const *hc) override
const Propagator * theAlongPropagator
const Propagator * theOppositePropagator
const Propagator * oppositePropagator() const
TkCloner const * theHitCloner