Consistency Class Reference

#include <Consistency.h>

Inheritance diagram for Consistency:

ChisqConsistency List of all members.

Public Types

 OK = 0
 noMeasure
 underFlow
 unPhysical
 left = -1
 unknown = 0
 right = 1
enum  ConsistentStatus { OK = 0, noMeasure, underFlow, unPhysical }
enum  ConsistentSign { left = -1, unknown = 0, right = 1 }

Public Member Functions

 Consistency ()
 Consistency (double consistency, double likelihood=0.)
 Consistency (const Consistency &rhs)
virtual ~Consistency ()
Consistencyoperator= (const Consistency &rhs)
bool operator== (const Consistency &rhs) const
bool operator< (const Consistency &rhs) const
bool operator> (const Consistency &rhs) const
double significanceLevel () const
double likelihood () const
double consistency () const
ConsistentStatus status () const
void setStatus (ConsistentStatus s)
ConsistentSign sign () const
void setSign (ConsistentSign s)
virtual const ConsistencySet * genealogy () const
virtual void print (std::ostream &) const

Static Public Member Functions

static const ConsistencybadMeasurement ()

Protected Attributes

ConsistentStatus _stat
ConsistentSign _sign
double _value
double _likelihood

Detailed Description

Definition at line 53 of file Consistency.h.


Member Enumeration Documentation

enum Consistency::ConsistentSign

Enumerator:
left 
unknown 
right 

Definition at line 114 of file Consistency.h.

00114 { left=-1, unknown=0, right=1 };

enum Consistency::ConsistentStatus

Enumerator:
OK 
noMeasure 
underFlow 
unPhysical 

Definition at line 94 of file Consistency.h.

00094 { OK=0, noMeasure, underFlow, unPhysical };


Constructor & Destructor Documentation

Consistency::Consistency (  ) 

Definition at line 54 of file Consistency.cxx.

00055   : _stat(noMeasure), _value(0), _likelihood(1.), _sign(unknown)
00056 {
00057 }

Consistency::Consistency ( double  consistency,
double  likelihood = 0. 
)

Definition at line 59 of file Consistency.cxx.

00060   : _stat(OK), _value(v), _likelihood(l), _sign(unknown)
00061 {
00062 }

Consistency::Consistency ( const Consistency rhs  ) 

Definition at line 64 of file Consistency.cxx.

00065   : _stat(rhs._stat), _value(rhs._value)
00066   , _likelihood(rhs._likelihood), _sign(rhs._sign)
00067 {
00068 }

virtual Consistency::~Consistency (  )  [inline, virtual]

Definition at line 66 of file Consistency.h.

00066 {}


Member Function Documentation

const Consistency & Consistency::badMeasurement (  )  [static]

Definition at line 172 of file Consistency.cxx.

References noMeasure, and setStatus().

00173 {
00174   static Consistency bad(1.,1.);
00175   bad.setStatus(noMeasure);
00176 
00177   return bad;
00178 }

double Consistency::consistency (  )  const [inline]

Definition at line 91 of file Consistency.h.

References _value.

00091 { return _value; }

const ConsistencySet * Consistency::genealogy (  )  const [virtual]

Definition at line 132 of file Consistency.cxx.

00133 {
00134   return 0;
00135 }

double Consistency::likelihood (  )  const [inline]

Definition at line 86 of file Consistency.h.

References _likelihood.

00086 { return  _likelihood;}

bool Consistency::operator< ( const Consistency rhs  )  const

Definition at line 98 of file Consistency.cxx.

References _stat, _value, and OK.

00099 {
00100   //
00101   // this is not unique...
00102   //
00103 
00104   bool answer = false;
00105   if (_stat == OK && rhs._stat == OK ) {
00106     //
00107     // Dare to use consistency for comparison. 
00108     // Likelihood may give a different answer
00109     //
00110     if (_value < rhs._value) {
00111       answer = true;
00112     }
00113   } else {
00114     if (rhs._stat == OK) {
00115       answer = true;
00116     }
00117   }
00118 
00119   return answer;
00120 }

Consistency & Consistency::operator= ( const Consistency rhs  ) 

Definition at line 72 of file Consistency.cxx.

References _likelihood, _sign, _stat, and _value.

Referenced by ChisqConsistency::operator=().

00073 {
00074   if(this != &rhs){
00075     _stat=rhs._stat;
00076     _value=rhs._value;
00077     _likelihood=rhs._likelihood;
00078     _sign=rhs._sign;
00079   }
00080   return *this;
00081 }

bool Consistency::operator== ( const Consistency rhs  )  const

Definition at line 84 of file Consistency.cxx.

References _likelihood, _sign, _stat, and _value.

00085 {
00086   bool answer = false;
00087   if (_stat       == rhs._stat &&
00088       _value      == rhs._value &&
00089       _likelihood == rhs._likelihood &&
00090       _sign       == rhs._sign) {
00091     answer = true;
00092   }
00093 
00094   return answer;
00095 }

bool Consistency::operator> ( const Consistency rhs  )  const

Definition at line 123 of file Consistency.cxx.

00124 {
00125   // ghm
00126   if( *this==rhs ) return false;
00127   return( ! (*this<rhs) );
00128 }

virtual void Consistency::print ( std::ostream  )  const [virtual]

void Consistency::setSign ( ConsistentSign  s  )  [inline]

Definition at line 118 of file Consistency.h.

References _sign.

00118 { _sign = s; }

void Consistency::setStatus ( ConsistentStatus  s  )  [inline]

Definition at line 107 of file Consistency.h.

References _stat.

Referenced by badMeasurement(), and ChisqConsistency::ChisqConsistency().

00107 { _stat = s; }

ConsistentSign Consistency::sign (  )  const [inline]

Definition at line 117 of file Consistency.h.

References _sign.

00117 {return _sign; }

double Consistency::significanceLevel (  )  const [inline]

Definition at line 85 of file Consistency.h.

References _value.

00085 { return _value; }

ConsistentStatus Consistency::status ( void   )  const [inline]

Definition at line 106 of file Consistency.h.

References _stat.

00106 {return _stat;}


Member Data Documentation

double Consistency::_likelihood [protected]

Definition at line 135 of file Consistency.h.

Referenced by ChisqConsistency::ChisqConsistency(), likelihood(), operator=(), and operator==().

ConsistentSign Consistency::_sign [protected]

Definition at line 133 of file Consistency.h.

Referenced by operator=(), operator==(), setSign(), and sign().

ConsistentStatus Consistency::_stat [protected]

Definition at line 132 of file Consistency.h.

Referenced by operator<(), operator=(), operator==(), setStatus(), and status().

double Consistency::_value [protected]

Definition at line 134 of file Consistency.h.

Referenced by ChisqConsistency::ChisqConsistency(), consistency(), operator<(), operator=(), operator==(), and significanceLevel().


Generated on Tue Nov 29 23:18:08 2016 for BOSS_7.0.2 by  doxygen 1.4.7