Base_MeasurementB.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 MeasurementB_h
00005 #define MeasurementB_h 1
00006 
00007 #include "Kalman/Interface_IMeasurement.h"
00008 
00009 //! Base Class for a measurement implementig a IMeasurement
00010 /*! The string "detector" specifies the
00011     apparatus that performed the measurement
00012 */
00013 class MeasurementB : public IMeasurement  
00014 {
00015  public:
00016 
00017   //! default constructor
00018   MeasurementB(){}
00019 
00020   //! Constructor providing type, surface, and measHV
00021   MeasurementB(const ISurface& surf, const HyperVector& measHV, const std::string type =""){
00022     setMeasHV(measHV);setType(type);setSurface(surf); setVolumeName(surf.volumeName());
00023   }
00024 
00025   //! Constructor providing type, volume name and measHV
00026   MeasurementB(const std::string volName, const HyperVector& measHV, const std::string type ="")
00027     {setMeasHV(measHV);setType(type); setVolumeName(volName); m_surface =NULL; }
00028 
00029   //! copy constructor
00030   MeasurementB(const IMeasurement& m){
00031     setMeasHV(m.measHV());setType(m.type());setSurface(m.surface()); 
00032     setVolumeName(m.volumeName());
00033   }
00034   
00035   //! default destructor
00036   virtual ~MeasurementB(){}
00037   
00038   //!   The tracking measurement is tipically a space point
00039   //!   (x,y,z) and its covariance matrix
00040   virtual const HyperVector& measHV () const {return m_measHV;}
00041   
00042   //!   The type of measurement
00043   virtual std::string type() const {return m_type;}
00044   
00045   //!   The surface where this measurement was done (e.g, a
00046   //!   drift chamber plane)
00047   virtual const ISurface& surface() const {return *m_surface;}
00048 
00049   //! functions related with the Volume
00050   virtual std::string volumeName() const {return m_volumeName;}
00051   virtual void setVolumeName(std::string name){m_volumeName = name;}    
00052   
00053   //! prints measurement information
00054   virtual void info(int verb) const;
00055 
00056  public:
00057 
00058   //!   The tracking measurement is tipically a space point
00059   //!   (x,y,z) and its covariance matrix
00060   virtual void setMeasHV (const HyperVector& value){m_measHV=value;}
00061   
00062   //!   The type of measurement, in this case "track measurement"
00063   virtual void setType (const std::string value){m_type=value;}
00064   
00065   //!   The surface where this measurement was done (e.g, a
00066   //!   drift chamber plane)
00067   virtual void setSurface (const ISurface& surf){ 
00068     m_surface=&surf; m_volumeName = surf.volumeName();
00069   }
00070   
00071  protected:
00072   
00073   std::string m_type;
00074 
00075   std::string m_volumeName; 
00076 
00077   HyperVector m_measHV;
00078   
00079   const ISurface* m_surface;
00080   
00081 
00082 };
00083 
00084 #endif
00085 

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