FairRoot/PandaRoot
KalmanFitter.h
Go to the documentation of this file.
1 /* Copyright 2013, Ludwig-Maximilians Universität München,
2  Authors: Tobias Schlüter & Johannes Rauch
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
23 #ifndef genfit_KalmanFitter_h
24 #define genfit_KalmanFitter_h
25 
26 #include "AbsKalmanFitter.h"
27 
28 #ifndef __CINT__
29 #include <boost/scoped_ptr.hpp>
30 #endif
31 
32 
33 namespace genfit {
34 
35 class KalmanFitterInfo;
36 class MeasuredStateOnPlane;
37 class TrackPoint;
38 
42 class KalmanFitter : public AbsKalmanFitter {
43 
44  private:
45 
46  // These private functions are needed, otherwise strange things happen, no idea why!
47  KalmanFitter(const KalmanFitter&);
49 
50  public:
51 
52  KalmanFitter(unsigned int maxIterations = 4, double deltaPval = 1e-3, double blowUpFactor = 1e3, bool squareRootFormalism = false)
53  : AbsKalmanFitter(maxIterations, deltaPval, blowUpFactor), currentState_(NULL),
54  squareRootFormalism_(squareRootFormalism)
55  {}
56 
58 
60  void processTrackWithRep(Track* tr, const AbsTrackRep* rep, bool resortHits = false);
61 
64  void processTrackPartially(Track* tr, const AbsTrackRep* rep, int startId = 0, int endId = -1);
65 
66  void useSquareRootFormalism(bool squareRootFormalism = true) {squareRootFormalism_ = squareRootFormalism;}
67 
68  private:
69  bool fitTrack(Track* tr, const AbsTrackRep* rep, double& chi2, double& ndf, int startId, int endId, int& nFailedHits);
71  const AbsTrackRep* rep, double& chi2, double& ndf, int direction);
72 
73 #ifndef __CINT__
74  boost::scoped_ptr<MeasuredStateOnPlane> currentState_;
75 #else
77 #endif
78 
80 
81  public:
82  ClassDef(KalmanFitter,1)
83 
84 };
85 
86 } /* End of namespace genfit */
89 #endif //genfit_KalmanFitter_h
void useSquareRootFormalism(bool squareRootFormalism=true)
Definition: KalmanFitter.h:66
Simple Kalman filter implementation.
Definition: KalmanFitter.h:42
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
Definition: Track.h:71
Abstract base class for a track representation.
Definition: AbsTrackRep.h:66
StateOnPlane with additional covariance matrix.
Abstract base class for Kalman fitter and derived fitting algorithms.
KalmanFitter(const KalmanFitter &)
bool fitTrack(Track *tr, const AbsTrackRep *rep, double &chi2, double &ndf, int startId, int endId, int &nFailedHits)
KalmanFitter & operator=(KalmanFitter const &)
Object containing AbsMeasurement and AbsFitterInfo objects.
Definition: TrackPoint.h:50
void processTrackPartially(Track *tr, const AbsTrackRep *rep, int startId=0, int endId=-1)
void processTrackPoint(TrackPoint *tp, const AbsTrackRep *rep, double &chi2, double &ndf, int direction)
void processTrackWithRep(Track *tr, const AbsTrackRep *rep, bool resortHits=false)
Hit resorting currently NOT supported.
KalmanFitter(unsigned int maxIterations=4, double deltaPval=1e-3, double blowUpFactor=1e3, bool squareRootFormalism=false)
Definition: KalmanFitter.h:52
boost::scoped_ptr< MeasuredStateOnPlane > currentState_
Definition: KalmanFitter.h:74