Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Measurement.h

Go to the documentation of this file.
00001 
00002 //   **************************************************************************
00003 //   *                                                                        *
00004 //   *                      ! ! ! A T T E N T I O N ! ! !                     *
00005 //   *                                                                        *
00006 //   *  This file was created automatically by GaudiObjDesc, please do not    *
00007 //   *  delete it or edit it by hand.                                         *
00008 //   *                                                                        *
00009 //   *  If you want to change this file, first change the corresponding       *
00010 //   *  xml-file and rerun the tools from GaudiObjDesc (or run make if you    *
00011 //   *  are using it from inside a Gaudi-package).                            *
00012 //   *                                                                        *
00013 //   **************************************************************************
00014 
00015 #ifndef TrackEvent_Measurement_H
00016 #define TrackEvent_Measurement_H 1
00017 
00018 // Include files
00019 #include "Kernel/LHCbID.h"
00020 
00021 
00022 // Forward declarations
00023 
00033 class Measurement
00034 {
00035 public:
00036 
00038   enum Type{ Muon,
00039              OT,
00040              ST,
00041              TT,
00042              VeloR,
00043              VeloPhi };
00044 
00046   Measurement() : m_mtype(0),
00047                   m_z(0.0),
00048                   m_measure(0.0),
00049                   m_errMeasure(0.0),
00050                   m_lhcbID() {}
00051 
00053   virtual ~Measurement() {}
00054 
00056   virtual Measurement* clone() const;
00057 
00059   void setType(const Type& value);
00060 
00062   bool checkType(const Type& value) const;
00063 
00065   double z() const;
00066 
00068   void setZ(double value);
00069 
00071   double measure() const;
00072 
00074   void setMeasure(double value);
00075 
00077   double errMeasure() const;
00078 
00080   void setErrMeasure(double value);
00081 
00083   const LHCbID& lhcbID() const;
00084 
00086   LHCbID& lhcbID();
00087 
00089   void setLhcbID(const LHCbID& value);
00090 
00091 protected:
00092 
00094   enum mtypeBits{typeBits = 0};
00095 
00097   enum mtypeMasks{typeMask = 0x3FL};
00098 
00099 
00100   unsigned int m_mtype;      
00101   double   m_z;          
00102   double   m_measure;    
00103   double   m_errMeasure; 
00104   LHCbID   m_lhcbID;     
00105 
00106 private:
00107 
00108 };
00109 
00110 // -----------------------------------------------------------------------------
00111 //   end of class
00112 // -----------------------------------------------------------------------------
00113 
00114 // Including forward declarations
00115 
00116 inline void Measurement::setType(const Type& value)
00117 {
00118   unsigned int val = (unsigned int)value;
00119   m_mtype &= ~typeMask;
00120   m_mtype |= ((((unsigned int)val) << typeBits) & typeMask);
00121 }
00122 
00123 inline bool Measurement::checkType(const Type& value) const
00124 {
00125   unsigned int val = (unsigned int)value;
00126   return 0 != ( m_mtype & typeMask & ( val << typeBits ));
00127 }
00128 
00129 inline double Measurement::z() const 
00130 {
00131   return m_z;
00132 }
00133 
00134 inline void Measurement::setZ(double value) 
00135 {
00136   m_z = value;
00137 }
00138 
00139 inline double Measurement::measure() const 
00140 {
00141   return m_measure;
00142 }
00143 
00144 inline void Measurement::setMeasure(double value) 
00145 {
00146   m_measure = value;
00147 }
00148 
00149 inline double Measurement::errMeasure() const 
00150 {
00151   return m_errMeasure;
00152 }
00153 
00154 inline void Measurement::setErrMeasure(double value) 
00155 {
00156   m_errMeasure = value;
00157 }
00158 
00159 inline const LHCbID& Measurement::lhcbID() const 
00160 {
00161   return m_lhcbID;
00162 }
00163 
00164 inline LHCbID& Measurement::lhcbID() 
00165 {
00166   return m_lhcbID;
00167 }
00168 
00169 inline void Measurement::setLhcbID(const LHCbID& value) 
00170 {
00171   m_lhcbID = value;
00172 }
00173 
00174 inline Measurement* Measurement::clone() const 
00175 {
00176 
00177   Measurement* me = new Measurement(); *me = *this; return me;
00178         
00179 }
00180 
00181 
00182 #endif 

Generated on Thu Apr 7 22:43:27 2005 for New Track Event Model by doxygen 1.4.1