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_measure(0.0),
00048                   m_errMeasure(0.0),
00049                   m_lhcbID() {}
00050 
00052   virtual ~Measurement() {}
00053 
00055   virtual double z() const;
00056 
00058   virtual Measurement* clone() const;
00059 
00061   void setType(const Type& value);
00062 
00064   bool checkType(const Type& value) const;
00065 
00067   double measure() const;
00068 
00070   void setMeasure(double value);
00071 
00073   double errMeasure() const;
00074 
00076   void setErrMeasure(double value);
00077 
00079   const LHCbID& lhcbID() const;
00080 
00082   LHCbID& lhcbID();
00083 
00085   void setLhcbID(const LHCbID& value);
00086 
00087 protected:
00088 
00090   enum mtypeBits{typeBits = 0};
00091 
00093   enum mtypeMasks{typeMask = 0x3FL};
00094 
00095 
00096   unsigned int m_mtype; 
00097 
00098 private:
00099 
00100   double m_measure;    
00101   double m_errMeasure; 
00102   LHCbID m_lhcbID;     
00103 
00104 };
00105 
00106 // -----------------------------------------------------------------------------
00107 //   end of class
00108 // -----------------------------------------------------------------------------
00109 
00110 // Including forward declarations
00111 
00112 inline void Measurement::setType(const Type& value)
00113 {
00114   unsigned int val = (unsigned int)value;
00115   m_mtype &= ~typeMask;
00116   m_mtype |= ((((unsigned int)val) << typeBits) & typeMask);
00117 }
00118 
00119 inline bool Measurement::checkType(const Type& value) const
00120 {
00121   unsigned int val = (unsigned int)value;
00122   return 0 != ( m_mtype & typeMask & ( val << typeBits ));
00123 }
00124 
00125 inline double Measurement::measure() const 
00126 {
00127   return m_measure;
00128 }
00129 
00130 inline void Measurement::setMeasure(double value) 
00131 {
00132   m_measure = value;
00133 }
00134 
00135 inline double Measurement::errMeasure() const 
00136 {
00137   return m_errMeasure;
00138 }
00139 
00140 inline void Measurement::setErrMeasure(double value) 
00141 {
00142   m_errMeasure = value;
00143 }
00144 
00145 inline const LHCbID& Measurement::lhcbID() const 
00146 {
00147   return m_lhcbID;
00148 }
00149 
00150 inline LHCbID& Measurement::lhcbID() 
00151 {
00152   return m_lhcbID;
00153 }
00154 
00155 inline void Measurement::setLhcbID(const LHCbID& value) 
00156 {
00157   m_lhcbID = value;
00158 }
00159 
00160 inline Measurement* Measurement::clone() const 
00161 {
00162 
00163   Measurement* me = new Measurement(); *me = *this; return me;
00164         
00165 }
00166 
00167 
00168 #endif 

Generated on Mon Apr 4 12:38:51 2005 for New Track Event Model by doxygen 1.4.1