CMS 3D CMS Logo

CalibCoeff Class Reference

intercalibration coefficient More...

#include <Calibration/Tools/interface/CalibCoeff.h>

List of all members.

Public Member Functions

 CalibCoeff (const double &value=1., const bool &isGood=0)
 ctor
double difference () const
 the abs difference wrt prev value
double operator *= (const double &var)
 update the value and turn into good the coefficient
void setStatus (const bool &stat)
 set its value and turn into good the coefficient
void setValue (const double &val)
 set its value and turn into good the coefficient
bool status () const
 its status
double value () const
 its value
 ~CalibCoeff ()
 dtor

Private Attributes

double m_difference
 the difference with the previous value
bool m_isGood
 if it is good
double m_value
 the actual value


Detailed Description

intercalibration coefficient

Date
2008/02/25 16:46:55
Revision
1.2
Id
CalibCoeff.h,v 1.2 2008/02/25 16:46:55 malberti Exp
Author:
Author
malberti

Definition at line 14 of file CalibCoeff.h.


Constructor & Destructor Documentation

CalibCoeff::CalibCoeff ( const double &  value = 1.,
const bool isGood = 0 
)

ctor

Date
2008/02/25 17:41:51
Revision
1.2
Id
CalibCoeff.cc,v 1.2 2008/02/25 17:41:51 malberti Exp

Author:
Author
malberti

Definition at line 11 of file CalibCoeff.cc.

00012                                              :
00013   m_value (value),
00014   m_isGood (isGood),
00015   m_difference (m_value)
00016   {}

CalibCoeff::~CalibCoeff (  ) 

dtor

Definition at line 22 of file CalibCoeff.cc.

00022 {}


Member Function Documentation

double CalibCoeff::difference (  )  const

the abs difference wrt prev value

Definition at line 39 of file CalibCoeff.cc.

References m_difference, and m_isGood.

00040 {
00041   return m_isGood * m_difference - !m_isGood ;
00042 }

double CalibCoeff::operator *= ( const double &  var  ) 

update the value and turn into good the coefficient

Definition at line 83 of file CalibCoeff.cc.

References m_difference, m_isGood, m_value, and true.

00084 {
00085   double oldval = m_value ;
00086   m_value *= var ;
00087   m_difference = fabs (m_value - oldval) ;
00088   m_isGood = true ;
00089   return m_value ;
00090 }

void CalibCoeff::setStatus ( const bool stat  ) 

set its value and turn into good the coefficient

Definition at line 72 of file CalibCoeff.cc.

References m_isGood.

00073 {
00074   m_isGood = stat ;
00075   return ;
00076 }

void CalibCoeff::setValue ( const double &  val  ) 

set its value and turn into good the coefficient

Definition at line 59 of file CalibCoeff.cc.

References m_difference, m_isGood, m_value, and true.

00060 {
00061   m_value = val ;
00062   m_difference = m_value ;
00063   m_isGood = true ;
00064   return ;
00065 }

bool CalibCoeff::status (  )  const

its status

Definition at line 49 of file CalibCoeff.cc.

References m_isGood.

00050 {
00051   return m_isGood ;
00052 }

double CalibCoeff::value (  )  const

its value

Definition at line 29 of file CalibCoeff.cc.

References m_isGood, and m_value.

00030 {
00031   return m_isGood * m_value + !m_isGood ;
00032 }


Member Data Documentation

double CalibCoeff::m_difference [private]

the difference with the previous value

Definition at line 43 of file CalibCoeff.h.

Referenced by difference(), operator *=(), and setValue().

bool CalibCoeff::m_isGood [private]

if it is good

Definition at line 41 of file CalibCoeff.h.

Referenced by difference(), operator *=(), setStatus(), setValue(), status(), and value().

double CalibCoeff::m_value [private]

the actual value

Definition at line 39 of file CalibCoeff.h.

Referenced by operator *=(), setValue(), and value().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:15:37 2009 for CMSSW by  doxygen 1.5.4