Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbsFitterInfo.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file AbsFitterInfo.h
1 /* Copyright 2008-2010, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert & 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 */
19 
24 #ifndef genfit_AbsFitterInfo_h
25 #define genfit_AbsFitterInfo_h
26 
27 #include "MeasurementOnPlane.h"
28 #include "FitStatus.h"
29 
30 #include <TObject.h>
31 #include <TVectorD.h>
32 
33 
34 namespace genfit {
35 
36 class AbsTrackRep;
37 class TrackPoint;
38 
42 class AbsFitterInfo : public TObject {
43 
44  public:
45 
46  AbsFitterInfo();
47  AbsFitterInfo(const TrackPoint* trackPoint, const AbsTrackRep* rep);
48 
49  virtual ~AbsFitterInfo() {};
50 
52  virtual AbsFitterInfo* clone() const = 0;
53 
54  const TrackPoint* getTrackPoint() const {return trackPoint_;}
55  const AbsTrackRep* getRep() const {return rep_;}
56 
58  virtual void setRep(const AbsTrackRep* rep) {rep_ = rep;}
59 
60  virtual bool hasMeasurements() const = 0;
61  virtual bool hasReferenceState() const = 0;
62  virtual bool hasForwardPrediction() const = 0;
63  virtual bool hasBackwardPrediction() const = 0;
64  virtual bool hasPrediction(int direction) const {if (direction >=0) return hasForwardPrediction(); return hasBackwardPrediction();}
65  virtual bool hasForwardUpdate() const = 0;
66  virtual bool hasBackwardUpdate() const = 0;
67  virtual bool hasUpdate(int direction) const {if (direction >=0) return hasForwardUpdate(); return hasBackwardUpdate();}
68 
69  virtual void deleteForwardInfo() = 0;
70  virtual void deleteBackwardInfo() = 0;
71  virtual void deleteReferenceInfo() = 0;
72  virtual void deleteMeasurementInfo() = 0;
73 
74  const SharedPlanePtr& getPlane() const {return sharedPlane_;}
75  virtual const MeasuredStateOnPlane& getFittedState(bool biased = true) const = 0;
76  virtual MeasurementOnPlane getResidual(unsigned int iMeasurement = 0, bool biased = true, bool onlyMeasurementErrors = false) const = 0;
77 
79 
80  virtual void Print(const Option_t* = "") const {;}
81 
82  virtual bool checkConsistency(const PruneFlags* = nullptr) const = 0;
83 
84  protected:
85 
89 
92  const AbsTrackRep* rep_;
93 
95 
96 
97  private:
98  AbsFitterInfo(const AbsFitterInfo&); // copy constructor
99  AbsFitterInfo& operator=(const AbsFitterInfo&); // assignment operator
100 
101 
102  public:
103  ClassDef(AbsFitterInfo,1)
104 
105 };
106 
109 {
110  return a.clone();
111 }
112 
113 } /* End of namespace genfit */
116 #endif // genfit_AbsFitterInfo_h