00001 //--------------------------------------// 00002 // Authors: A. Cervera 00003 // JJ. Gomez-Cadenas 00004 // JA. Hernando 00005 // M. Ellis 00006 // 00007 // Last update 25/09/03 by G. Prior: 00008 // - setState for non const IState 00009 // - non const measurement (by ME) 00010 // - non const m_surface (by ME) 00011 //--------------------------------------// 00012 00013 #ifndef PointB_h 00014 #define PointB_h 1 00015 00016 #include "Kalman/Interface_IPoint.h" 00017 #include "Kalman/Interface_ITrajectoryFactory.h" 00018 00019 00020 //! This is a General base class for a IPoint 00021 /*! A Basic implementation of IPoint 00022 It constains a private ITrajectory factory to create states 00023 */ 00024 class PointB : public IPoint 00025 { 00026 public: 00027 //! default constructor 00028 PointB(); 00029 00030 //! constructor providing a trajectory factory 00031 PointB(ITrajectoryFactory& fact); 00032 00033 //! default destructor 00034 virtual ~PointB(); 00035 00036 //! copy a naked point 00037 virtual void copy(const IPoint& ip); 00038 00039 //! copy the full point (including state, residual, surface) 00040 virtual void copyFitResults(const IPoint& ip); 00041 00042 00043 //-------- Set and Get methods ----------------- 00044 00045 00046 //! the surface of the point (this field is NULL before the fit is performed) 00047 virtual const ISurface& surface() const {return *m_surface;} 00048 virtual void setSurface(const ISurface& surf); 00049 00050 //! return true if the point it is used for fits 00051 virtual bool isUsed() const {return m_isUsed;} 00052 virtual void setIsUsed(bool t) {m_isUsed=t;} 00053 00054 00055 //! return true if the point it is updated 00056 virtual bool isUpdated() const {return m_isUpdated;} 00057 virtual void setIsUpdated(bool t) {m_isUpdated=t;} 00058 00059 //! returns the quality of the point (tipically the local chi2) 00060 virtual std::map<std::string, double> qualityMap() const {return m_qualityMap;} 00061 //! set the quality map 00062 virtual void setQuality(std::string name, double value) {m_qualityMap[name]=value;} 00063 00064 //! Returns the projected hypervector 00065 virtual const HyperVector& projectionHV() const {return m_projectionHV;} 00066 //! Set the projection HVector 00067 virtual void setProjectionHV(const HyperVector& hv) {m_projectionHV=hv;} 00068 00069 //! Returns the residual HVector 00070 virtual const HyperVector& residualHV() const {return m_residualHV;} 00071 //! Set the residual HVector 00072 virtual void setResidualHV(const HyperVector& hv) {m_residualHV=hv;} 00073 00074 //! Returns the state 00075 virtual const IState& state() const {return *m_state;} 00076 //! Returns a non constant reference to the state 00077 virtual IState& state() {return *m_state;} 00078 //! Set the state. It will make a copy 00079 virtual void setState(const IState& is); 00080 virtual void setState(IState& is); 00081 00082 //! Returns the measurement 00083 virtual const IMeasurement& measurement() const {return *m_meas;}; 00084 virtual IMeasurement& measurement() { return (IMeasurement&) *m_meas; };// ME added this 00085 //! Sets a measurement 00086 virtual void setMeasurement(const IMeasurement& im) {m_meas=&im;}; 00087 00088 00089 //! path length from the first point used in the fit 00090 virtual const HyperDouble lengthFromFirstPointUpdated() const {return m_lengthFromFirstPointUpdated;}; 00091 virtual void setLengthFromFirstPointUpdated(const HyperDouble& hd) {m_lengthFromFirstPointUpdated = hd;} 00092 00093 00094 00095 00096 //-------- Global acctions ----------------- 00097 00098 //! reset the point 00099 //! (delete the measurements inside) 00100 virtual void hardReset(); 00101 00102 //! reset the point 00103 virtual void reset(); 00104 //! strip the point (keep only the measurement) 00105 virtual void strip(); 00106 00107 //! prints point information 00108 virtual void info(int verb) const; 00109 00110 protected: 00111 00112 //! is used for fits 00113 bool m_isUsed; 00114 00115 //! is updated flag 00116 bool m_isUpdated; 00117 00118 //! quality 00119 std::map<std::string, double> m_qualityMap; 00120 00121 //! state 00122 IState* m_state; 00123 00124 //! measurement 00125 const IMeasurement* m_meas; 00126 00127 //! projection of the state 00128 HyperVector m_projectionHV; 00129 00130 //! residual 00131 HyperVector m_residualHV; 00132 00133 //! path length from the first point used in the fit 00134 HyperDouble m_lengthFromFirstPointUpdated; 00135 00136 //! Surface associated to the point 00137 ISurface* m_surface; //ME removed const 00138 00139 protected: 00140 00141 //! internal factory to create the trajectory owned points and state 00142 ITrajectoryFactory* m_factory; 00143 00144 }; 00145 #endif 00146 00147 00148
1.4.7