CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KFFittingSmoother.h
Go to the documentation of this file.
1 #ifndef CD_KFFittingSmoother_H_
2 #define CD_KFFittingSmoother_H_
3 
16 
18 
19 public:
22  const TrajectorySmoother& aSmoother,
23  double estimateCut = -1,
24  double logPixelProbabilityCut = -16.0,
25  int minNumberOfHits = 5,
26  bool rejectTracks = false,
27  bool BreakTrajWith2ConsecutiveMissing = false,
28  bool NoInvalidHitsBeginEnd = false) :
29  theFitter(aFitter.clone()),
30  theSmoother(aSmoother.clone()),
31  theEstimateCut(estimateCut),
32 
33  // ggiurgiu@fnal.gov
34  theLogPixelProbabilityCut( logPixelProbabilityCut ),
35 
36  theMinNumberOfHits(minNumberOfHits),
37  rejectTracksFlag(rejectTracks),
38  breakTrajWith2ConsecutiveMissing(BreakTrajWith2ConsecutiveMissing),
39  noInvalidHitsBeginEnd(NoInvalidHitsBeginEnd) {}
40 
41  virtual ~KFFittingSmoother() {}
42 
43  Trajectory fitOne(const Trajectory& t, fitType type) const;
44  Trajectory fitOne(const TrajectorySeed& aSeed,
45  const RecHitContainer& hits,
46  const TrajectoryStateOnSurface& firstPredTsos, fitType type) const;
47  Trajectory fitOne(const TrajectorySeed& aSeed,
48  const RecHitContainer& hits, fitType type) const;
49 
50  const TrajectoryFitter* fitter() const {return theFitter.get();}
51  const TrajectorySmoother* smoother() const {return theSmoother.get();}
52 
53  std::unique_ptr<TrajectoryFitter> clone() const override {
54  return std::unique_ptr<TrajectoryFitter>(
55  new KFFittingSmoother(*theFitter,
56  *theSmoother,
57  theEstimateCut,theLogPixelProbabilityCut,
58  theMinNumberOfHits,rejectTracksFlag,
59  breakTrajWith2ConsecutiveMissing,noInvalidHitsBeginEnd));
60  }
61 
62 
63  virtual void setHitCloner(TkCloner const * hc) {
64  theFitter->setHitCloner(hc);
65  theSmoother->setHitCloner(hc);
66  }
67 
68 
69 private:
70 
71  Trajectory smoothingStep(Trajectory const & fitted) const {return theSmoother->trajectory(fitted);}
72 
73 private:
74 
75  const std::unique_ptr<TrajectoryFitter> theFitter;
76  const std::unique_ptr<TrajectorySmoother> theSmoother;
78 
79  double theLogPixelProbabilityCut; // ggiurgiu@fnal.gov
80 
85 
87 
89  bool checkForNans(const Trajectory &theTraj) const;
90 
91 };
92 
93 #endif //CD_KFFittingSmoother_H_
type
Definition: HCALResponse.h:21
bool breakTrajWith2ConsecutiveMissing
KFFittingSmoother(const TrajectoryFitter &aFitter, const TrajectorySmoother &aSmoother, double estimateCut=-1, double logPixelProbabilityCut=-16.0, int minNumberOfHits=5, bool rejectTracks=false, bool BreakTrajWith2ConsecutiveMissing=false, bool NoInvalidHitsBeginEnd=false)
constructor with predefined fitter and smoother and propagator
TrajectoryStateWithArbitraryError tsosWithError
const std::unique_ptr< TrajectoryFitter > theFitter
bool noInvalidHitsBeginEnd
double theEstimateCut
virtual void setHitCloner(TkCloner const *hc)
const TrajectorySmoother * smoother() const
const TrajectoryFitter * fitter() const
virtual ~KFFittingSmoother()
std::unique_ptr< TrajectoryFitter > clone() const override
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
double theLogPixelProbabilityCut
susybsm::HSCParticleCollection hc
Definition: classes.h:25
Trajectory smoothingStep(Trajectory const &fitted) const
const std::unique_ptr< TrajectorySmoother > theSmoother
Unlimited (trivial) bounds.