CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KFTrajectorySmoother.h
Go to the documentation of this file.
1 #ifndef CD_KFTrajectorySmoother_H_
2 #define CD_KFTrajectorySmoother_H_
3 
19 
21 
22 private:
23 
27 
28 public:
29 
30  KFTrajectorySmoother(const Propagator& aPropagator,
31  const TrajectoryStateUpdator& aUpdator,
32  const MeasurementEstimator& aEstimator,
33  float errorRescaling = 100.f,
34  int minHits = 3) :
35  theAlongPropagator(nullptr),
36  theOppositePropagator(nullptr),
37  theUpdator(aUpdator.clone()),
38  theEstimator(aEstimator.clone()),
39  theErrorRescaling(errorRescaling),
40  minHits_(minHits),
41  theGeometry(nullptr){ // to be fixed. Why this first constructor is needed? who is using it? Can it be removed?
42  if(!theGeometry) theGeometry = &dummyGeometry;
43  auto p = aPropagator.clone();
44  p->setPropagationDirection(alongMomentum);
45  theAlongPropagator = p;
46  p = aPropagator.clone();
47  p->setPropagationDirection(oppositeToMomentum);
48  theOppositePropagator = p;
49  }
50 
51 
52  KFTrajectorySmoother(const Propagator* aPropagator,
53  const TrajectoryStateUpdator* aUpdator,
54  const MeasurementEstimator* aEstimator,
55  float errorRescaling = 100.f,
56  int minHits = 3,
57  const DetLayerGeometry* detLayerGeometry=nullptr,
58  TkCloner const * hc=nullptr) :
59  theAlongPropagator(nullptr),
60  theOppositePropagator(nullptr),
61  theUpdator(aUpdator->clone()),
62  theEstimator(aEstimator->clone()),
63  theHitCloner(hc),
64  theErrorRescaling(errorRescaling),
65  minHits_(minHits),
66  theGeometry(detLayerGeometry){
67  if(!theGeometry) theGeometry = &dummyGeometry;
68  auto p = aPropagator->clone();
69  p->setPropagationDirection(alongMomentum);
70  theAlongPropagator = p;
71  p = aPropagator->clone();
72  p->setPropagationDirection(oppositeToMomentum);
73  theOppositePropagator = p;
74  }
75 
76  virtual ~KFTrajectorySmoother();
77 
78  virtual Trajectory trajectory(const Trajectory& aTraj) const override;
79 
80  const Propagator* alongPropagator() const { return theAlongPropagator;}
81  const Propagator* oppositePropagator() const {return theOppositePropagator;}
82 
83  const TrajectoryStateUpdator* updator() const {return theUpdator;}
84  const MeasurementEstimator* estimator() const {return theEstimator;}
85 
86  virtual KFTrajectorySmoother* clone() const override{
87  return new KFTrajectorySmoother(theAlongPropagator,theUpdator,theEstimator,theErrorRescaling,minHits_,theGeometry,theHitCloner);
88  }
89 
90  // FIXME a prototype: final inplementaiton may differ
91  virtual void setHitCloner(TkCloner const * hc) { theHitCloner = hc;}
92 
93 
94 private:
95  const DetLayerGeometry dummyGeometry;
98  const TrajectoryStateUpdator* theUpdator;
99  const MeasurementEstimator* theEstimator;
100  TkCloner const * theHitCloner=nullptr;
101  float theErrorRescaling;
102  int minHits_;
103  const DetLayerGeometry* theGeometry;
104 };
105 
106 #endif //CD_KFTrajectorySmoother_H_
const TrajectoryStateUpdator * updator() const
#define nullptr
TrajectoryMeasurement TM
virtual Propagator * clone() const =0
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
virtual void setHitCloner(TkCloner const *hc)
virtual KFTrajectorySmoother * clone() const override
double f[11][100]
const Propagator * theAlongPropagator
TrajectoryStateOnSurface TSOS
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
const MeasurementEstimator * estimator() const
const Propagator * oppositePropagator() const
susybsm::HSCParticleCollection hc
Definition: classes.h:25
FreeTrajectoryState FTS
const Propagator * theOppositePropagator
Unlimited (trivial) bounds.