PandaRoot
AbsFitterInfo.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /* Copyright 2008-2010, Technische Universitaet Muenchen,
14  Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
15 
16  This file is part of GENFIT.
17 
18  GENFIT is free software: you can redistribute it and/or modify
19  it under the terms of the GNU Lesser General Public License as published
20  by the Free Software Foundation, either version 3 of the License, or
21  (at your option) any later version.
22 
23  GENFIT is distributed in the hope that it will be useful,
24  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  GNU Lesser General Public License for more details.
27 
28  You should have received a copy of the GNU Lesser General Public License
29  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
30 */
31 
36 #ifndef genfit_AbsFitterInfo_h
37 #define genfit_AbsFitterInfo_h
38 
39 #include "MeasurementOnPlane.h"
40 #include "FitStatus.h"
41 
42 #include <TObject.h>
43 #include <TVectorD.h>
44 
45 namespace genfit {
46 
47 class AbsTrackRep;
48 class TrackPoint;
49 
53 class AbsFitterInfo : public TObject {
54 
55  public:
56  AbsFitterInfo();
57  AbsFitterInfo(const TrackPoint *trackPoint, const AbsTrackRep *rep);
58 
59  virtual ~AbsFitterInfo(){};
60 
62  virtual AbsFitterInfo *clone() const = 0;
63 
64  const TrackPoint *getTrackPoint() const { return trackPoint_; }
65  const AbsTrackRep *getRep() const { return rep_; }
66 
67  void setTrackPoint(const TrackPoint *tp) { trackPoint_ = tp; }
68  virtual void setRep(const AbsTrackRep *rep) { rep_ = rep; }
69 
70  virtual bool hasMeasurements() const = 0;
71  virtual bool hasReferenceState() const = 0;
72  virtual bool hasForwardPrediction() const = 0;
73  virtual bool hasBackwardPrediction() const = 0;
74  virtual bool hasPrediction(int direction) const
75  {
76  if (direction >= 0)
77  return hasForwardPrediction();
78  return hasBackwardPrediction();
79  }
80  virtual bool hasForwardUpdate() const = 0;
81  virtual bool hasBackwardUpdate() const = 0;
82  virtual bool hasUpdate(int direction) const
83  {
84  if (direction >= 0)
85  return hasForwardUpdate();
86  return hasBackwardUpdate();
87  }
88 
89  virtual void deleteForwardInfo() = 0;
90  virtual void deleteBackwardInfo() = 0;
91  virtual void deleteReferenceInfo() = 0;
92  virtual void deleteMeasurementInfo() = 0;
93 
94  const SharedPlanePtr &getPlane() const { return sharedPlane_; }
95  virtual const MeasuredStateOnPlane &getFittedState(bool biased = true) const = 0;
96  virtual MeasurementOnPlane getResidual(unsigned int iMeasurement = 0, bool biased = true, bool onlyMeasurementErrors = false) const = 0;
97 
98  void setPlane(const SharedPlanePtr &plane) { sharedPlane_ = plane; }
99 
100  virtual void Print(const Option_t * = "") const { ; }
101 
102  virtual bool checkConsistency(const PruneFlags * = nullptr) const = 0;
103 
104  protected:
108 
111  const AbsTrackRep *rep_;
112 
114 
115  private:
116  AbsFitterInfo(const AbsFitterInfo &); // copy constructor
117  AbsFitterInfo &operator=(const AbsFitterInfo &); // assignment operator
118 
119  public:
120  ClassDef(AbsFitterInfo, 1)
121 };
122 
125 {
126  return a.clone();
127 }
128 
129 } /* End of namespace genfit */
132 #endif // genfit_AbsFitterInfo_h
void setPlane(const SharedPlanePtr &plane)
Definition: AbsFitterInfo.h:98
virtual bool hasUpdate(int direction) const
Definition: AbsFitterInfo.h:82
virtual void Print(const Option_t *="") const
virtual bool hasForwardUpdate() const =0
virtual bool hasMeasurements() const =0
virtual bool hasBackwardPrediction() const =0
Info which information has been pruned from the Track.
Definition: FitStatus.h:57
Abstract base class for a track representation.
Definition: AbsTrackRep.h:74
StateOnPlane with additional covariance matrix.
SharedPlanePtr sharedPlane_
No ownership.
This class collects all information needed and produced by a specific AbsFitter and is specific to on...
Definition: AbsFitterInfo.h:53
virtual void deleteBackwardInfo()=0
virtual void deleteReferenceInfo()=0
virtual void deleteMeasurementInfo()=0
const AbsTrackRep * rep_
No ownership.
void setTrackPoint(const TrackPoint *tp)
Definition: AbsFitterInfo.h:67
Measured coordinates on a plane.
virtual bool hasForwardPrediction() const =0
Object containing AbsMeasurement and AbsFitterInfo objects.
Definition: TrackPoint.h:61
virtual void setRep(const AbsTrackRep *rep)
Definition: AbsFitterInfo.h:68
virtual bool hasBackwardUpdate() const =0
const TrackPoint * trackPoint_
const TrackPoint * getTrackPoint() const
Definition: AbsFitterInfo.h:64
virtual bool hasReferenceState() const =0
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
virtual void deleteForwardInfo()=0
virtual AbsFitterInfo * clone() const =0
Deep copy ctor for polymorphic class.
const AbsTrackRep * getRep() const
Definition: AbsFitterInfo.h:65
virtual MeasurementOnPlane getResidual(unsigned int iMeasurement=0, bool biased=true, bool onlyMeasurementErrors=false) const =0
virtual bool checkConsistency(const PruneFlags *=nullptr) const =0
virtual bool hasPrediction(int direction) const
Definition: AbsFitterInfo.h:74
virtual const MeasuredStateOnPlane & getFittedState(bool biased=true) const =0
AbsFitterInfo * new_clone(const AbsFitterInfo &a)
Needed for boost cloneability:
Matrix inversion tools.
Definition: AbsBField.h:40
const SharedPlanePtr & getPlane() const
Definition: AbsFitterInfo.h:94