Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:21

0001 /* Copyright 2008-2010, Technische Universitaet Muenchen,
0002    Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
0003 
0004    This file is part of GENFIT.
0005 
0006    GENFIT is free software: you can redistribute it and/or modify
0007    it under the terms of the GNU Lesser General Public License as published
0008    by the Free Software Foundation, either version 3 of the License, or
0009    (at your option) any later version.
0010 
0011    GENFIT is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014    GNU Lesser General Public License for more details.
0015 
0016    You should have received a copy of the GNU Lesser General Public License
0017    along with GENFIT.  If not, see <http://www.gnu.org/licenses/>.
0018 */
0019 
0020 /** @addtogroup genfit
0021  * @{
0022  */
0023 
0024 #ifndef genfit_AbsFitterInfo_h
0025 #define genfit_AbsFitterInfo_h
0026 
0027 #include "MeasurementOnPlane.h"
0028 #include "FitStatus.h"
0029 
0030 #include <TObject.h>
0031 #include <TVectorD.h>
0032 
0033 
0034 namespace genfit {
0035 
0036 class AbsTrackRep;
0037 class TrackPoint;
0038 
0039 /**
0040  *  @brief This class collects all information needed and produced by a specific  AbsFitter and is specific to one AbsTrackRep of the Track.
0041  */
0042 class AbsFitterInfo : public TObject {
0043 
0044  public:
0045 
0046   AbsFitterInfo();
0047   AbsFitterInfo(const TrackPoint* trackPoint, const AbsTrackRep* rep);
0048 
0049   virtual ~AbsFitterInfo() {};
0050 
0051   //! Deep copy ctor for polymorphic class.
0052   virtual AbsFitterInfo* clone() const = 0;
0053 
0054   const TrackPoint* getTrackPoint() const {return trackPoint_;}
0055   const AbsTrackRep* getRep() const {return rep_;}
0056 
0057   void setTrackPoint(const TrackPoint *tp) {trackPoint_ = tp;}
0058   virtual void setRep(const AbsTrackRep* rep) {rep_ = rep;}
0059 
0060   virtual bool hasMeasurements() const = 0;
0061   virtual bool hasReferenceState() const = 0;
0062   virtual bool hasForwardPrediction() const = 0;
0063   virtual bool hasBackwardPrediction() const = 0;
0064   virtual bool hasPrediction(int direction) const {if (direction >=0) return hasForwardPrediction(); return hasBackwardPrediction();}
0065   virtual bool hasForwardUpdate() const = 0;
0066   virtual bool hasBackwardUpdate() const = 0;
0067   virtual bool hasUpdate(int direction) const {if (direction >=0) return hasForwardUpdate(); return hasBackwardUpdate();}
0068 
0069   virtual void deleteForwardInfo() = 0;
0070   virtual void deleteBackwardInfo() = 0;
0071   virtual void deleteReferenceInfo() = 0;
0072   virtual void deleteMeasurementInfo() = 0;
0073 
0074   const SharedPlanePtr& getPlane() const {return sharedPlane_;}
0075   virtual const MeasuredStateOnPlane& getFittedState(bool biased = true) const = 0;
0076   virtual MeasurementOnPlane getResidual(unsigned int iMeasurement = 0, bool biased = true, bool onlyMeasurementErrors = false) const = 0;
0077 
0078   void setPlane(const SharedPlanePtr& plane) {sharedPlane_ = plane;}
0079 
0080   virtual void Print(const Option_t* = "") const {;}
0081 
0082   virtual bool checkConsistency(const PruneFlags* = nullptr) const = 0;
0083 
0084  protected:
0085 
0086   /** Pointer to TrackPoint where the FitterInfo belongs to
0087    */
0088   const TrackPoint* trackPoint_; //! No ownership
0089 
0090   /** Pointer to AbsTrackRep with respect to which the FitterInfo is defined
0091    */
0092   const AbsTrackRep* rep_; //! No ownership
0093 
0094   SharedPlanePtr sharedPlane_; //! Shared ownership.  '!' shuts up ROOT.
0095 
0096 
0097  private:
0098   AbsFitterInfo(const AbsFitterInfo&); // copy constructor
0099   AbsFitterInfo& operator=(const AbsFitterInfo&); // assignment operator
0100 
0101 
0102  public:
0103   ClassDef(AbsFitterInfo,1)
0104 
0105 };
0106 
0107 //! Needed for boost cloneability:
0108 inline AbsFitterInfo* new_clone( const AbsFitterInfo & a)
0109 {
0110   return a.clone();
0111 }
0112 
0113 } /* End of namespace genfit */
0114 /** @} */
0115 
0116 #endif // genfit_AbsFitterInfo_h