CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 value() const
its value
Definition: CalibCoeff.cc:25
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
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 MetTreeProducer::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, and reco::return().

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)

set its value and turn into good the coefficient

Definition at line 55 of file CalibCoeff.cc.

References m_difference, m_isGood, m_value, reco::return(), and funct::true.

Referenced by Vispa.Views.PropertyView.StringProperty::buttonClicked(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), Vispa.Views.PropertyView.FileVectorProperty::buttonClicked(), Vispa.Views.PropertyView.TextEditWithButtonProperty::keyPressEvent(), and Vispa.Views.PropertyView.TextEditWithButtonProperty::setMultiline().

56 {
57  m_value = val ;
59  m_isGood = true ;
60  return ;
61 }
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
return(e1-e2)*(e1-e2)+dp *dp
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().