CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CalibCoeff Class Reference

intercalibration coefficient More...

#include <CalibCoeff.h>

Public Member Functions

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

Private Attributes

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

Detailed Description

intercalibration coefficient

Definition at line 10 of file CalibCoeff.h.

Constructor & Destructor Documentation

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

ctor

Definition at line 7 of file CalibCoeff.cc.

8  :
9  m_value (value),
10  m_isGood (isGood),
12  {}
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:39
Definition: value.py:1
bool m_isGood
if it is good
Definition: CalibCoeff.h:37
double m_value
the actual value
Definition: CalibCoeff.h:35
CalibCoeff::~CalibCoeff ( )

dtor

Definition at line 18 of file CalibCoeff.cc.

18 {}

Member Function Documentation

double CalibCoeff::difference ( ) const

the abs difference wrt prev value

Definition at line 35 of file CalibCoeff.cc.

References m_difference, and m_isGood.

36 {
37  return m_isGood * m_difference - !m_isGood ;
38 }
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:39
bool m_isGood
if it is good
Definition: CalibCoeff.h:37
double CalibCoeff::operator*= ( const double &  var)

update the value and turn into good the coefficient

Definition at line 79 of file CalibCoeff.cc.

References m_difference, m_isGood, m_value, funct::true, and JetChargeProducer_cfi::var.

80 {
81  double oldval = m_value ;
82  m_value *= var ;
83  m_difference = fabs (m_value - oldval) ;
84  m_isGood = true ;
85  return m_value ;
86 }
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:39
bool m_isGood
if it is good
Definition: CalibCoeff.h:37
double m_value
the actual value
Definition: CalibCoeff.h:35
void CalibCoeff::setStatus ( const bool &  stat)

set its value and turn into good the coefficient

Definition at line 68 of file CalibCoeff.cc.

References m_isGood, reco::return(), and trackingPlots::stat.

69 {
70  m_isGood = stat ;
71  return ;
72 }
bool m_isGood
if it is good
Definition: CalibCoeff.h:37
return(e1-e2)*(e1-e2)+dp *dp
void CalibCoeff::setValue ( const double &  val)
bool CalibCoeff::status ( ) const

its status

Definition at line 45 of file CalibCoeff.cc.

References m_isGood.

46 {
47  return m_isGood ;
48 }
bool m_isGood
if it is good
Definition: CalibCoeff.h:37
double CalibCoeff::value ( ) const

Member Data Documentation

double CalibCoeff::m_difference
private

the difference with the previous value

Definition at line 39 of file CalibCoeff.h.

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

bool CalibCoeff::m_isGood
private

if it is good

Definition at line 37 of file CalibCoeff.h.

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

double CalibCoeff::m_value
private

the actual value

Definition at line 35 of file CalibCoeff.h.

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