FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
RhoDoubleErr Class Reference

#include <RhoDoubleErr.h>

Inheritance diagram for RhoDoubleErr:

Public Member Functions

 RhoDoubleErr ()
 
 RhoDoubleErr (Double_t val)
 
 RhoDoubleErr (Double_t val, Double_t cov)
 
 RhoDoubleErr (const RhoDoubleErr &)
 
virtual ~RhoDoubleErr ()
 
RhoDoubleErroperator= (const RhoDoubleErr &)
 
Double_t Value () const
 
Double_t Covariance () const
 
Double_t DetermineChisq (Double_t ref) const
 
RhoDoubleErr operator- ()
 
RhoDoubleErr operator- (const RhoDoubleErr &)
 
RhoDoubleErr operator+ (const RhoDoubleErr &)
 
RhoDoubleErr operator* (const RhoDoubleErr &)
 
RhoDoubleErr operator/ (const RhoDoubleErr &)
 
void SetValue (Double_t val)
 
void SetCovariance (Double_t cov)
 
RhoDoubleErroperator+= (const RhoDoubleErr &)
 
RhoDoubleErroperator-= (const RhoDoubleErr &)
 
RhoDoubleErroperator*= (const RhoDoubleErr &)
 
RhoDoubleErroperator/= (const RhoDoubleErr &)
 
Bool_t operator== (const RhoDoubleErr &other) const
 
Bool_t operator< (const RhoDoubleErr &other) const
 

Private Attributes

Double_t fValue
 
Double_t fCovariance
 

Detailed Description

Definition at line 33 of file RhoDoubleErr.h.

Constructor & Destructor Documentation

RhoDoubleErr::RhoDoubleErr ( )
inline

Definition at line 38 of file RhoDoubleErr.h.

Referenced by operator*(), operator+(), operator-(), and operator/().

38 : fValue ( 0.0 ), fCovariance ( 0.0 ) {};
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr::RhoDoubleErr ( Double_t  val)
inline

Definition at line 39 of file RhoDoubleErr.h.

39 : fValue ( val ), fCovariance ( 0.0 ) {};
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr::RhoDoubleErr ( Double_t  val,
Double_t  cov 
)
inline

Definition at line 40 of file RhoDoubleErr.h.

40 : fValue ( val ), fCovariance ( cov ) {};
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr::RhoDoubleErr ( const RhoDoubleErr original)

Definition at line 30 of file RhoDoubleErr.cxx.

30  :
31 TObject(original)
32 {
33  *this = original;
34 }
virtual RhoDoubleErr::~RhoDoubleErr ( )
inlinevirtual

Definition at line 46 of file RhoDoubleErr.h.

46 {}

Member Function Documentation

Double_t RhoDoubleErr::Covariance ( ) const
inline

Definition at line 55 of file RhoDoubleErr.h.

References fCovariance.

Referenced by operator<<().

55  {
56  return fCovariance;
57  }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t RhoDoubleErr::DetermineChisq ( Double_t  ref) const

Definition at line 44 of file RhoDoubleErr.cxx.

References Double_t, fCovariance, and fValue.

45 {
46  if ( 0 >= fCovariance ) {
47  return -1.;
48  } else {
49  Double_t diff = ( ref - fValue );
50  return ( diff * diff ) / fCovariance;
51  }
52 }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr RhoDoubleErr::operator* ( const RhoDoubleErr bde)

Definition at line 69 of file RhoDoubleErr.cxx.

References fCovariance, fValue, and RhoDoubleErr().

70 {
71  return RhoDoubleErr ( fValue * bde.fValue,
72  fCovariance * bde.fValue * bde.fValue +
73  bde.fCovariance * fValue * fValue );
74 }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr & RhoDoubleErr::operator*= ( const RhoDoubleErr bde)

Definition at line 97 of file RhoDoubleErr.cxx.

98 {
99  *this = *this * bde;
100  return *this;
101 }
RhoDoubleErr RhoDoubleErr::operator+ ( const RhoDoubleErr bde)

Definition at line 64 of file RhoDoubleErr.cxx.

References fCovariance, fValue, and RhoDoubleErr().

65 {
66  return RhoDoubleErr ( fValue + bde.fValue, fCovariance + bde.fCovariance );
67 }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr & RhoDoubleErr::operator+= ( const RhoDoubleErr bde)

Definition at line 85 of file RhoDoubleErr.cxx.

86 {
87  *this = *this + bde;
88  return *this;
89 }
RhoDoubleErr RhoDoubleErr::operator- ( )

Definition at line 54 of file RhoDoubleErr.cxx.

References fCovariance, fValue, and RhoDoubleErr().

55 {
56  return RhoDoubleErr ( -fValue, fCovariance );
57 }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr RhoDoubleErr::operator- ( const RhoDoubleErr bde)

Definition at line 59 of file RhoDoubleErr.cxx.

References fCovariance, fValue, and RhoDoubleErr().

60 {
61  return RhoDoubleErr ( fValue - bde.fValue, fCovariance - bde.fCovariance );
62 }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr & RhoDoubleErr::operator-= ( const RhoDoubleErr bde)

Definition at line 91 of file RhoDoubleErr.cxx.

92 {
93  *this = *this - bde;
94  return *this;
95 }
RhoDoubleErr RhoDoubleErr::operator/ ( const RhoDoubleErr bde)

Definition at line 76 of file RhoDoubleErr.cxx.

References Double_t, fCovariance, fValue, and RhoDoubleErr().

77 {
78  Double_t bde2 = bde.fValue * bde.fValue;
79 
80  return RhoDoubleErr ( fValue / bde.fValue,
81  fCovariance / bde2 +
82  bde.fCovariance * fValue * fValue / ( bde2 * bde2 ) );
83 }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr & RhoDoubleErr::operator/= ( const RhoDoubleErr bde)

Definition at line 103 of file RhoDoubleErr.cxx.

104 {
105  *this = *this / bde;
106  return *this;
107 }
Bool_t RhoDoubleErr::operator< ( const RhoDoubleErr other) const
inline

Definition at line 89 of file RhoDoubleErr.h.

References fValue.

89  {
90  return ( fValue < other.fValue );
91  }
Double_t fValue
Definition: RhoDoubleErr.h:96
RhoDoubleErr & RhoDoubleErr::operator= ( const RhoDoubleErr original)

Definition at line 36 of file RhoDoubleErr.cxx.

References fCovariance, and fValue.

37 {
38  fValue = original.fValue;
39  fCovariance = original.fCovariance;
40  return *this;
41 }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
Bool_t RhoDoubleErr::operator== ( const RhoDoubleErr other) const
inline

Definition at line 86 of file RhoDoubleErr.h.

References fCovariance, and fValue.

86  {
87  return ( fValue == other.fValue && fCovariance == other.fCovariance );
88  }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
Double_t fValue
Definition: RhoDoubleErr.h:96
void RhoDoubleErr::SetCovariance ( Double_t  cov)
inline

Definition at line 76 of file RhoDoubleErr.h.

References fCovariance.

76  {
77  fCovariance = cov;
78  }
Double_t fCovariance
Definition: RhoDoubleErr.h:97
void RhoDoubleErr::SetValue ( Double_t  val)
inline

Definition at line 73 of file RhoDoubleErr.h.

References fValue, and val.

73  {
74  fValue = val;
75  }
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
Double_t fValue
Definition: RhoDoubleErr.h:96
Double_t RhoDoubleErr::Value ( ) const
inline

Definition at line 52 of file RhoDoubleErr.h.

References fValue.

Referenced by operator<<().

52  {
53  return fValue;
54  }
Double_t fValue
Definition: RhoDoubleErr.h:96

Member Data Documentation

Double_t RhoDoubleErr::fCovariance
private
Double_t RhoDoubleErr::fValue
private

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