Base_FitterB.h

Go to the documentation of this file.
00001 //! \author{Anselmo Cervera, Juan J. Gomez-Cadenas and Jose Angel Hernando}
00002 //! \date{11/01}
00003 
00004 #ifndef FitterB_h
00005 #define FitterB_h 1
00006 
00007 #include "Kalman/Interface_IFitter.h"
00008 #include "Kalman/Base_Navigator.h"
00009 
00010 //! Basic implementation for a Fitter
00011 /*!
00012     The only addition it the set/return a navigator
00013 */
00014 class FitterB : public IFitter
00015 {
00016 
00017   public:
00018 
00019   //! Defaul constructor. The defauld vervosity is zero
00020   FitterB(Navigator* p){m_navigator = p; m_verbosity=0;}
00021 
00022   //! Virtual destructor  
00023   virtual ~FitterB(){};
00024 
00025   //! Fits a trajectory using the selected method (Kalman, Lsq, etc)  
00026   virtual bool fit (ITrajectory& Traject)=0;
00027   //! The user must provide a initial seed state (useful for methods as Kalman Filter)
00028   virtual bool fit (ITrajectory& Traject, IState& seed)
00029   {
00030     std::cout << "FitterB::fit called with:" << std::endl;
00031     Traject.info(2);
00032     seed.info(2);
00033     return true;
00034   };  // ME - added return and warning cout
00035 
00036   virtual bool fit (ITrajectory& Traject, std::string modelName)
00037   {
00038     std::cout << "FitterB::fit called with:" << modelName << std::endl;
00039     Traject.info(2);
00040     return true;
00041   };  // ME - added return and warning cout
00042 
00043   virtual bool fit (IVertex& vertex, const HyperVector& seedPosHV, const ISurface& seedSurf)
00044   {
00045     std::cout << "FitterB::fit called with: " << seedPosHV << std::endl;
00046     vertex.info(2);
00047     seedSurf.info(2);
00048     return true;
00049   }; //ME added return and warning cout
00050 
00051   //--------
00052 
00053   //! returns specific fitter properties
00054   virtual std::string fitterProperties() 
00055     {cout << "There are not specific properties !!!" <<endl; return "";}
00056   //! set properties of the fitter in the case there is a choice
00057   virtual void setFitterProperties(void* prop)
00058     { std::cout << "You cannot select specific properties !!!" << (int)prop << std::endl;};  //ME added address of prop
00059 
00060   //---------
00061   
00062  protected:
00063 
00064   //! return the navigator
00065   virtual Navigator& navigator() const {return *m_navigator;}
00066   //! set the navigator
00067   virtual void setNavigator(Navigator& p) {m_navigator = &p;};
00068   
00069 
00070   //! set fitter verbosity 
00071   virtual void setVerbosity(int v){m_verbosity=v;}
00072   //! return fitter verbosity 
00073   virtual int verbosity() {return m_verbosity;}  
00074 
00075 protected:
00076 
00077   Navigator* m_navigator;
00078   int m_verbosity;
00079 
00080 };
00081 
00082 #endif
00083 

Generated on Mon Nov 23 08:01:43 2009 for MIPP(E907) by  doxygen 1.4.7