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

Measurement Class Reference

#include <Measurement.h>

Inheritance diagram for Measurement:

ITMeasurement OTMeasurement VeloPhiMeasurement VeloRMeasurement List of all members.

Public Types

enum  Type {
  Unknown, Muon, OT, ST,
  TT, VeloR, VeloPhi
}
 enumerator for the type of Measurement More...

Public Member Functions

 Measurement ()
 Default Constructor.
virtual ~Measurement ()
 Default Destructor.
double errMeasure2 () const
 return the error squared
Type type () const
 Retrieve measurement type.
virtual Measurementclone () const
 Clone the Measurement.
void setType (const Type &value)
 Update measurement type.
bool checkType (const Type &value) const
 Check measurement type.
double z () const
 Retrieve const the z-position of the measurement.
void setZ (double value)
 Update the z-position of the measurement.
double measure () const
 Retrieve const the measurement value.
void setMeasure (double value)
 Update the measurement value.
double errMeasure () const
 Retrieve const the measurement error.
void setErrMeasure (double value)
 Update the measurement error.
const LHCbIDlhcbID () const
 Retrieve const the corresponding LHCbID.
LHCbIDlhcbID ()
 Retrieve the corresponding LHCbID.
void setLhcbID (const LHCbID &value)
 Update the corresponding LHCbID.

Protected Types

enum  mtypeBits { typeBits = 0 }
 Offsets of bitfield mtype. More...
enum  mtypeMasks { typeMask = 0x3FL }
 Bitmasks for bitfield mtype. More...

Protected Attributes

unsigned int m_mtype
 the variety of measurement types
double m_z
 the z-position of the measurement
double m_measure
 the measurement value
double m_errMeasure
 the measurement error
LHCbID m_lhcbID
 the corresponding LHCbID

Detailed Description

Measurement is the base class for offline and online measurements.

Author:
Jose Hernando, Eduardo Rodrigues created Tue Apr 19 13:51:09 2005

Definition at line 35 of file Measurement.h.


Member Enumeration Documentation

enum Measurement::mtypeBits [protected]
 

Offsets of bitfield mtype.

Enumeration values:
typeBits 

Definition at line 103 of file Measurement.h.

00103 {typeBits = 0};

enum Measurement::mtypeMasks [protected]
 

Bitmasks for bitfield mtype.

Enumeration values:
typeMask 

Definition at line 106 of file Measurement.h.

00106 {typeMask = 0x3FL};

enum Measurement::Type
 

enumerator for the type of Measurement

Enumeration values:
Unknown 
Muon 
OT 
ST 
TT 
VeloR 
VeloPhi 

Definition at line 40 of file Measurement.h.

00040            { Unknown,
00041              Muon,
00042              OT,
00043              ST,
00044              TT,
00045              VeloR,
00046              VeloPhi };


Constructor & Destructor Documentation

Measurement::Measurement  )  [inline]
 

Default Constructor.

Definition at line 49 of file Measurement.h.

References m_errMeasure, m_lhcbID, m_measure, m_mtype, and m_z.

Referenced by clone().

00049                 : m_mtype(0),
00050                   m_z(0.0),
00051                   m_measure(0.0),
00052                   m_errMeasure(0.0),
00053                   m_lhcbID() {}

virtual Measurement::~Measurement  )  [inline, virtual]
 

Default Destructor.

Definition at line 56 of file Measurement.h.

00056 {}


Member Function Documentation

bool Measurement::checkType const Type value  )  const [inline]
 

Check measurement type.

Definition at line 132 of file Measurement.h.

References m_mtype, typeBits, and typeMask.

00133 {
00134   unsigned int val = (unsigned int)value;
00135   return 0 != ( m_mtype & typeMask & ( val << typeBits ));
00136 }

Measurement * Measurement::clone  )  const [inline, virtual]
 

Clone the Measurement.

Reimplemented in ITMeasurement, OTMeasurement, VeloPhiMeasurement, and VeloRMeasurement.

Definition at line 197 of file Measurement.h.

References Measurement().

00198 {
00199 
00200   Measurement* me = new Measurement(); *me = *this; return me;
00201         
00202 }

double Measurement::errMeasure  )  const [inline]
 

Retrieve const the measurement error.

Definition at line 158 of file Measurement.h.

References m_errMeasure.

00159 {
00160   return m_errMeasure;
00161 }

double Measurement::errMeasure2  )  const [inline]
 

return the error squared

Definition at line 183 of file Measurement.h.

References m_errMeasure.

00184 {
00185 
00186   return m_errMeasure*m_errMeasure;
00187         
00188 }

LHCbID & Measurement::lhcbID  )  [inline]
 

Retrieve the corresponding LHCbID.

Definition at line 173 of file Measurement.h.

References m_lhcbID.

00174 {
00175   return m_lhcbID;
00176 }

const LHCbID & Measurement::lhcbID  )  const [inline]
 

Retrieve const the corresponding LHCbID.

Definition at line 168 of file Measurement.h.

References m_lhcbID.

00169 {
00170   return m_lhcbID;
00171 }

double Measurement::measure  )  const [inline]
 

Retrieve const the measurement value.

Definition at line 148 of file Measurement.h.

References m_measure.

Referenced by TrackVeloRProjector::project(), TrackVeloPhiProjector::project(), and TrackOTProjector::project().

00149 {
00150   return m_measure;
00151 }

void Measurement::setErrMeasure double  value  )  [inline]
 

Update the measurement error.

Definition at line 163 of file Measurement.h.

References m_errMeasure.

00164 {
00165   m_errMeasure = value;
00166 }

void Measurement::setLhcbID const LHCbID value  )  [inline]
 

Update the corresponding LHCbID.

Definition at line 178 of file Measurement.h.

References m_lhcbID.

Referenced by MeasurementProvider::measurement().

00179 {
00180   m_lhcbID = value;
00181 }

void Measurement::setMeasure double  value  )  [inline]
 

Update the measurement value.

Definition at line 153 of file Measurement.h.

References m_measure.

00154 {
00155   m_measure = value;
00156 }

void Measurement::setType const Type value  )  [inline]
 

Update measurement type.

Definition at line 125 of file Measurement.h.

References m_mtype, typeBits, and typeMask.

00126 {
00127   unsigned int val = (unsigned int)value;
00128   m_mtype &= ~typeMask;
00129   m_mtype |= ((((unsigned int)val) << typeBits) & typeMask);
00130 }

void Measurement::setZ double  value  )  [inline]
 

Update the z-position of the measurement.

Definition at line 143 of file Measurement.h.

References m_z.

00144 {
00145   m_z = value;
00146 }

Measurement::Type Measurement::type  )  const [inline]
 

Retrieve measurement type.

Definition at line 190 of file Measurement.h.

References m_mtype, typeBits, and typeMask.

00191 {
00192 
00193   return (Measurement::Type)((m_mtype & typeMask) >> typeBits);
00194         
00195 }

double Measurement::z  )  const [inline]
 

Retrieve const the z-position of the measurement.

Definition at line 138 of file Measurement.h.

References m_z.

00139 {
00140   return m_z;
00141 }


Member Data Documentation

double Measurement::m_errMeasure [protected]
 

the measurement error

Definition at line 112 of file Measurement.h.

Referenced by errMeasure(), errMeasure2(), Measurement(), and setErrMeasure().

LHCbID Measurement::m_lhcbID [protected]
 

the corresponding LHCbID

Definition at line 113 of file Measurement.h.

Referenced by lhcbID(), Measurement(), and setLhcbID().

double Measurement::m_measure [protected]
 

the measurement value

Definition at line 111 of file Measurement.h.

Referenced by measure(), Measurement(), and setMeasure().

unsigned int Measurement::m_mtype [protected]
 

the variety of measurement types

Definition at line 109 of file Measurement.h.

Referenced by checkType(), Measurement(), setType(), and type().

double Measurement::m_z [protected]
 

the z-position of the measurement

Definition at line 110 of file Measurement.h.

Referenced by Measurement(), setZ(), and z().


The documentation for this class was generated from the following file:
Generated on Wed May 4 11:52:38 2005 for New Track Event Model by doxygen 1.4.1