BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
Consistency Class Reference

#include <Consistency.h>

+ Inheritance diagram for Consistency:

Public Types

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

◆ ConsistentSign

Enumerator
left 
unknown 
right 

Definition at line 114 of file Consistency.h.

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

◆ ConsistentStatus

Enumerator
OK 
noMeasure 
underFlow 
unPhysical 

Definition at line 94 of file Consistency.h.

Constructor & Destructor Documentation

◆ Consistency() [1/3]

Consistency::Consistency ( )

Definition at line 54 of file Consistency.cxx.

56{
57}
double _value
Definition: Consistency.h:134
double _likelihood
Definition: Consistency.h:135
ConsistentSign _sign
Definition: Consistency.h:133
ConsistentStatus _stat
Definition: Consistency.h:132

◆ Consistency() [2/3]

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

Definition at line 59 of file Consistency.cxx.

61{
62}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35

◆ Consistency() [3/3]

Consistency::Consistency ( const Consistency rhs)

Definition at line 64 of file Consistency.cxx.

65 : _stat(rhs._stat), _value(rhs._value)
67{
68}

◆ ~Consistency()

virtual Consistency::~Consistency ( )
inlinevirtual

Definition at line 66 of file Consistency.h.

66{}

Member Function Documentation

◆ badMeasurement()

const Consistency & Consistency::badMeasurement ( )
static

Definition at line 172 of file Consistency.cxx.

173{
174 static Consistency bad(1.,1.);
175 bad.setStatus(noMeasure);
176
177 return bad;
178}

◆ consistency()

double Consistency::consistency ( ) const
inline

Definition at line 91 of file Consistency.h.

91{ return _value; }

◆ genealogy()

const ConsistencySet * Consistency::genealogy ( ) const
virtual

Definition at line 132 of file Consistency.cxx.

133{
134 return 0;
135}

◆ likelihood()

double Consistency::likelihood ( ) const
inline

Definition at line 86 of file Consistency.h.

86{ return _likelihood;}

◆ operator<()

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

Definition at line 97 of file Consistency.cxx.

99{
100 //
101 // this is not unique...
102 //
103
104 bool answer = false;
105 if (_stat == OK && rhs._stat == OK ) {
106 //
107 // Dare to use consistency for comparison.
108 // Likelihood may give a different answer
109 //
110 if (_value < rhs._value) {
111 answer = true;
112 }
113 } else {
114 if (rhs._stat == OK) {
115 answer = true;
116 }
117 }
118
119 return answer;
120}

◆ operator=()

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

Definition at line 72 of file Consistency.cxx.

73{
74 if(this != &rhs){
75 _stat=rhs._stat;
76 _value=rhs._value;
78 _sign=rhs._sign;
79 }
80 return *this;
81}

Referenced by ChisqConsistency::operator=().

◆ operator==()

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

Definition at line 84 of file Consistency.cxx.

85{
86 bool answer = false;
87 if (_stat == rhs._stat &&
88 _value == rhs._value &&
89 _likelihood == rhs._likelihood &&
90 _sign == rhs._sign) {
91 answer = true;
92 }
93
94 return answer;
95}

◆ operator>()

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

Definition at line 123 of file Consistency.cxx.

124{
125 // ghm
126 if( *this==rhs ) return false;
127 return( ! (*this<rhs) );
128}

◆ print()

void Consistency::print ( std::ostream &  ) const
virtual

Definition at line 139 of file Consistency.cxx.

140{
141 os << "Likelihood = ";
142 os << setiosflags(ios::fixed) << setw(7) << setprecision(4);
143 os << _likelihood;
144 os << "\t SignificanceLevel = ";
145 os << setiosflags(ios::fixed) << setw(7) << setprecision(4);
146 os << _value;
147 os << "\t Status ";
148 switch( status() ) {
149 case Consistency::OK :
150 os << "OK";
151 break;
153 os << "noMeasure";
154 break;
156 os << "underFlow";
157 break;
159 os << "unPhysical";
160 break;
161 default:
162 os << "unknown";
163 }
164 os << endl;
165}
ConsistentStatus status() const
Definition: Consistency.h:106

◆ setSign()

void Consistency::setSign ( ConsistentSign  s)
inline

Definition at line 118 of file Consistency.h.

118{ _sign = s; }
XmlRpcServer s
Definition: HelloServer.cpp:11

◆ setStatus()

void Consistency::setStatus ( ConsistentStatus  s)
inline

Definition at line 107 of file Consistency.h.

107{ _stat = s; }

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

◆ sign()

ConsistentSign Consistency::sign ( ) const
inline

Definition at line 117 of file Consistency.h.

117{return _sign; }

◆ significanceLevel()

double Consistency::significanceLevel ( ) const
inline

Definition at line 85 of file Consistency.h.

85{ return _value; }

◆ status()

ConsistentStatus Consistency::status ( ) const
inline

Definition at line 106 of file Consistency.h.

106{return _stat;}

Referenced by print().

Member Data Documentation

◆ _likelihood

double Consistency::_likelihood
protected

◆ _sign

ConsistentSign Consistency::_sign
protected

Definition at line 133 of file Consistency.h.

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

◆ _stat

ConsistentStatus Consistency::_stat
protected

Definition at line 132 of file Consistency.h.

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

◆ _value

double Consistency::_value
protected

The documentation for this class was generated from the following files: