#include <ValueErr.h>
Public Member Functions | |
| ValueErr (T value=0, T err=0) | |
| ValueErr (const ValueErr< T > &rhs) | |
| virtual | ~ValueErr () |
| void | Set (T value, T err=0) |
| void | Set (const ValueErr< T > &rhs) |
| void | SetValueError2 (T value, T err2) |
| void | SetValue (T value) |
| void | SetError (T error) |
| void | SetError2 (T error2) |
| void | SetFracError (T frac) |
| T | operator() () const |
| T | GetValue () const |
| T | GetValue2 () const |
| T | Get () const |
| T | GetError () const |
| T | GetError2 () const |
| T | GetFracError () const |
| T | GetFracError2 () const |
| T | GetPosError () const |
| T | GetNegError () const |
| ValueErr< T > | operator= (const T &value) |
| operator T () const | |
| ValueErr< T > & | operator++ () |
| ValueErr< T > | operator++ (int) |
| ValueErr< T > & | operator-- () |
| ValueErr< T > | operator-- (int) |
| ValueErr< T > & | operator+= (const ValueErr< T > &x) |
| ValueErr< T > & | operator-= (const ValueErr< T > &x) |
| ValueErr< T > & | operator *= (const ValueErr< T > &x) |
| ValueErr< T > & | operator/= (const ValueErr< T > &x) |
| void | Print (Option_t *option="") const |
| const char * | AsString (Option_t *option="") const |
| ValueErr (T value=0, T err=0) | |
| ValueErr (const ValueErr< T > &rhs) | |
| virtual | ~ValueErr () |
| void | Set (T value, T err=0) |
| void | Set (const ValueErr< T > &rhs) |
| void | SetValueError2 (T value, T err2) |
| void | SetValue (T value) |
| void | SetError (T error) |
| void | SetError2 (T error2) |
| void | SetFracError (T frac) |
| T | operator() () const |
| T | GetValue () const |
| T | GetValue2 () const |
| T | Get () const |
| T | GetError () const |
| T | GetError2 () const |
| T | GetFracError () const |
| T | GetFracError2 () const |
| T | GetPosError () const |
| T | GetNegError () const |
| ValueErr< T > | operator= (const T &value) |
| operator T () const | |
| ValueErr< T > & | operator++ () |
| ValueErr< T > | operator++ (int) |
| ValueErr< T > & | operator-- () |
| ValueErr< T > | operator-- (int) |
| ValueErr< T > & | operator+= (const ValueErr< T > &x) |
| ValueErr< T > & | operator-= (const ValueErr< T > &x) |
| ValueErr< T > & | operator *= (const ValueErr< T > &x) |
| ValueErr< T > & | operator/= (const ValueErr< T > &x) |
| void | Print (Option_t *option="") const |
| const char * | AsString (Option_t *option="") const |
Static Private Member Functions | |
| ValueErr< T > | valueErr2 (T value, T err2) |
| ValueErr< T > | valueErr2 (T value, T err2) |
Private Attributes | |
| T | fValue |
| T | fError2 |
Friends | |
| template<class L> | |
| ValueErr< L > | operator+ (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator+ (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator+ (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator- (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator- (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator- (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator * (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator * (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator * (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator/ (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator/ (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator/ (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator+ (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator+ (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator+ (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator- (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator- (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator- (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator * (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator * (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator * (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator/ (const L &lhs, const ValueErr< L > &rhs) |
| template<class L> | |
| ValueErr< L > | operator/ (const ValueErr< L > &lhs, const L &rhs) |
| template<class L> | |
| ValueErr< L > | operator/ (const ValueErr< L > &lhs, const ValueErr< L > &rhs) |
|
||||||||||||||||
|
Definition at line 37 of file Calibrator/ValueErr.h. 00037 { Set(value,err); };
|
|
||||||||||
|
Definition at line 38 of file Calibrator/ValueErr.h.
|
|
|||||||||
|
Definition at line 39 of file Calibrator/ValueErr.h. 00039 {};
|
|
||||||||||||||||
|
Definition at line 37 of file RootUtil/ValueErr.h. 00037 { Set(value,err); };
|
|
||||||||||
|
Definition at line 38 of file RootUtil/ValueErr.h.
|
|
|||||||||
|
Definition at line 39 of file RootUtil/ValueErr.h. 00039 {};
|
|
||||||||||
|
|
|
||||||||||
|
Definition at line 41 of file Calibrator/ValueErr.cxx. References ValueErr< T >::GetError(), ValueErr< T >::GetValue(), and kPlusMinus. Referenced by MuonDriftCalScheme::DoReset(). 00042 {
00043 static char buffer[100];
00044 sprintf(buffer,"%f%s%f",GetValue(), kPlusMinus, GetError());
00045 return buffer;
00046 }
|
|
||||||||||
|
Definition at line 51 of file RootUtil/ValueErr.h. 00051 { return fValue; };
|
|
|||||||||
|
Definition at line 51 of file Calibrator/ValueErr.h. 00051 { return fValue; };
|
|
|||||||||
|
Definition at line 52 of file RootUtil/ValueErr.h. 00052 { return TMath::Sqrt(fError2); };
|
|
|||||||||
|
|||||||||
|
Definition at line 53 of file RootUtil/ValueErr.h. 00053 { return fError2; };
|
|
|||||||||
|
Definition at line 53 of file Calibrator/ValueErr.h. Referenced by QuadLinearityCalScheme::DecalLinearity(), QuadLinearityCalScheme::GetLinearized(), operator *(), ValueErr< T >::operator *=(), operator+(), ValueErr< T >::operator+=(), operator-(), ValueErr< T >::operator-=(), operator/(), and ValueErr< T >::operator/=(). 00053 { return fError2; };
|
|
|||||||||
|
Definition at line 54 of file RootUtil/ValueErr.h.
|
|
|||||||||
|
|||||||||
|
Definition at line 55 of file RootUtil/ValueErr.h.
|
|
|||||||||
|
Definition at line 55 of file Calibrator/ValueErr.h. Referenced by operator *().
|
|
|||||||||
|
Definition at line 57 of file RootUtil/ValueErr.h. 00057 { return GetError(); };
|
|
|||||||||
|
Definition at line 57 of file Calibrator/ValueErr.h. 00057 { return GetError(); };
|
|
|||||||||
|
Definition at line 56 of file RootUtil/ValueErr.h. 00056 { return GetError(); };
|
|
|||||||||
|
Definition at line 56 of file Calibrator/ValueErr.h. 00056 { return GetError(); };
|
|
|||||||||
|
Definition at line 49 of file RootUtil/ValueErr.h. 00049 { return fValue; };
|
|
|||||||||
|
|||||||||
|
Definition at line 50 of file RootUtil/ValueErr.h. 00050 { return fValue*fValue; };
|
|
|||||||||
|
Definition at line 50 of file Calibrator/ValueErr.h. Referenced by ValueErr< T >::operator *=(), and operator/(). 00050 { return fValue*fValue; };
|
|
||||||||||
|
|
|
||||||||||
|
Definition at line 60 of file Calibrator/ValueErr.cxx. References ValueErr< T >::GetError2(), ValueErr< T >::GetValue(), ValueErr< T >::GetValue2(), and ValueErr< T >::Set(). 00061 {
00062 T x = this->GetValue() * rhs.GetValue();
00063 T err;
00064 if(x!=0)
00065 err = TMath::Abs(x) * TMath::Sqrt((this->GetError2()/this->GetValue2()) + (rhs.GetError2()/rhs.GetValue2()));
00066 else
00067 err = kValueErr_Big;
00068 Set(x,err);
00069 return *this;
00070 }
|
|
|||||||||
|
Definition at line 63 of file RootUtil/ValueErr.h. 00063 { return GetValue(); };
|
|
|||||||||
|
Definition at line 63 of file Calibrator/ValueErr.h. 00063 { return GetValue(); };
|
|
||||||||||
|
Definition at line 48 of file RootUtil/ValueErr.h. 00048 { return fValue; };
|
|
|||||||||
|
Definition at line 48 of file Calibrator/ValueErr.h. 00048 { return fValue; };
|
|
||||||||||
|
|
|
|||||||||
|
|
|
||||||||||
|
Definition at line 207 of file Calibrator/ValueErr.h. 00208 { ValueErr<T> ans = *this; ++fValue; return ans; }
|
|
|||||||||
|
Definition at line 205 of file Calibrator/ValueErr.h. 00206 { ++fValue; return *this; }
|
|
||||||||||
|
|
|
||||||||||
|
Definition at line 220 of file Calibrator/ValueErr.h. References ValueErr< T >::GetError2(), ValueErr< T >::GetValue(), ValueErr< T >::SetError2(), and ValueErr< T >::SetValue(). 00221 {
00222 this->SetValue(this->GetValue() + rhs.GetValue());
00223 this->SetError2(this->GetError2() + rhs.GetError2());
00224 return *this;
00225 }
|
|
||||||||||
|
|
|
|||||||||
|
|
|
||||||||||
|
Definition at line 211 of file Calibrator/ValueErr.h. 00212 { ValueErr<T> ans = *this; --fValue; return ans; }
|
|
|||||||||
|
Definition at line 209 of file Calibrator/ValueErr.h. 00210 { --fValue; return *this; }
|
|
||||||||||
|
|
|
||||||||||
|
Definition at line 231 of file Calibrator/ValueErr.h. References ValueErr< T >::GetError2(), ValueErr< T >::GetValue(), ValueErr< T >::SetError2(), and ValueErr< T >::SetValue(). 00232 {
00233 this->SetValue ( this->GetValue() - rhs.GetValue() );
00234 this->SetError2( this->GetError2() + rhs.GetError2() );
00235 return *this;
00236 }
|
|
||||||||||
|
|
|
||||||||||
|
Definition at line 247 of file Calibrator/ValueErr.h. References ValueErr< T >::GetError2(), ValueErr< T >::GetValue(), and ValueErr< T >::SetValueError2(). 00248 {
00249 // Note: doesn't trap rhs=0.
00250 T x = this->GetValue();
00251 T y = rhs.GetValue();
00252 T f = x/y;
00253 T y2 = y*y;
00254 T x2 = x*x;
00255 // err = x/y * sqrt( dx2/x2 + dy2/y2) // This works, but has a div-by-zero for x=0
00256 T err2 = ( this->GetError2()/y2
00257 + rhs.GetError2()*x2/(y2*y2) );
00258
00259 SetValueError2(f,err2);
00260 return (*this);
00261 }
|
|
||||||||||
|
Definition at line 60 of file RootUtil/ValueErr.h. 00060 { Set(value,0); return (*this);};
|
|
||||||||||
|
Definition at line 60 of file Calibrator/ValueErr.h. 00060 { Set(value,0); return (*this);};
|
|
||||||||||
|
|
|
||||||||||
|
Definition at line 35 of file Calibrator/ValueErr.cxx. References ValueErr< T >::GetError(), ValueErr< T >::GetValue(), and kPlusMinus. Referenced by errproptest(). 00036 {
00037 cout << "ValueErr: " << GetValue() << kPlusMinus << GetError() << endl;
00038 }
|
|
||||||||||
|
Definition at line 42 of file RootUtil/ValueErr.h.
|
|
||||||||||||||||
|
Definition at line 41 of file RootUtil/ValueErr.h.
|
|
||||||||||
|
Definition at line 42 of file Calibrator/ValueErr.h.
|
|
||||||||||||||||
|
||||||||||
|
Definition at line 45 of file RootUtil/ValueErr.h. 00045 { fError2 = error*error; };
|
|
||||||||||
|
||||||||||
|
Definition at line 46 of file RootUtil/ValueErr.h. 00046 { fError2 = error2; };
|
|
||||||||||
|
Definition at line 46 of file Calibrator/ValueErr.h. Referenced by ValueErr< T >::operator+=(), and ValueErr< T >::operator-=(). 00046 { fError2 = error2; };
|
|
||||||||||
|
Definition at line 47 of file RootUtil/ValueErr.h.
|
|
||||||||||
|
Definition at line 47 of file Calibrator/ValueErr.h.
|
|
||||||||||
|
Definition at line 44 of file RootUtil/ValueErr.h. 00044 { fValue = value; };
|
|
||||||||||
|
Definition at line 44 of file Calibrator/ValueErr.h. Referenced by ValueErr< T >::operator+=(), and ValueErr< T >::operator-=(). 00044 { fValue = value; };
|
|
||||||||||||||||
|
Definition at line 43 of file RootUtil/ValueErr.h.
|
|
||||||||||||||||
|
Definition at line 43 of file Calibrator/ValueErr.h. Referenced by QuadLinearityCalScheme::DecalLinearity(), QuadLinearityCalScheme::GetLinearized(), and ValueErr< T >::operator/=().
|
|
||||||||||||||||
|
Definition at line 34 of file RootUtil/ValueErr.h. 00034 { ValueErr<T> result(value); result.SetError2(err2); return result; };
|
|
||||||||||||||||
|
Definition at line 34 of file Calibrator/ValueErr.h. Referenced by operator *(), operator+(), operator-(), and operator/(). 00034 { ValueErr<T> result(value); result.SetError2(err2); return result; };
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|||||
|
Definition at line 33 of file RootUtil/ValueErr.h. Referenced by ValueErr< float >::Set(). |
|
|||||
|
Definition at line 32 of file RootUtil/ValueErr.h. Referenced by ValueErr< float >::Set(). |
1.3.9.1