GraphSysErr
0.10-2
A class to hold results with statistical and systematic errors A class to hold results with statistical and systematic errors
|
Combining measurements. More...
Classes | |
struct | Observation |
An experimental observation. More... | |
struct | Result |
The final result. More... | |
Public Types | |
typedef Double_t(* | Wrapper_t) (Double_t *, Double_t *) |
Public Member Functions | |
Combiner () | |
Constructor. More... | |
virtual | ~Combiner () |
Virtual destructor. More... | |
virtual Double_t | W (const Observation &r) const =0 |
Calculate the weight. More... | |
virtual Double_t | StepW (Double_t guess, const Observation &r) const =0 |
Calculate the weight based on a guess of best . More... | |
virtual Double_t | StepOffset (Double_t guess, const Observation &r) const =0 |
Calculate the bias. More... | |
virtual Double_t | VarTerm (Double_t guess, const Observation &r) const =0 |
Calculate the contribution variance to the with the guess . More... | |
Double_t | ChiTerm (Double_t guess, const Observation &r) const |
Calculate the contribution variance to the with the guess . More... | |
Double_t | F (Double_t guess, Double_t chi2) const |
Calculate the where is current guess at the observation. More... | |
Double_t | E (UShort_t nIter, Int_t sign, Double_t best, Double_t chi2, Double_t s) |
Try to find best error. More... | |
Double_t | X (UShort_t nIter, Double_t lowest, Double_t highest) |
Find best estimate of . More... | |
Result * | Calculate (UShort_t nIter=50) |
Do the calculation. More... | |
virtual Wrapper_t | Wrapper () const =0 |
Return function pointer to wrapper. More... | |
TF1 * | MakeF (const Observation &r, Int_t j) const |
Make a function that represents to Log-likehood for a given observation. More... | |
TLine * | MakeL (TF1 *f) const |
Make a line that represents the best found errors. More... | |
void | Draw (Option_t *option="") |
ClassDef (Combiner, 1) | |
The data store | |
void | Clear (Option_t *option="") |
Clear the internal data. More... | |
void | Add (const Observation &r) |
Add an obervation. More... | |
void | Add (Double_t x, Double_t el, Double_t eh) |
Add an observation. More... | |
void | Print (Option_t *option="") const |
Print content of the list. More... | |
Public Attributes | |
TClonesArray | fData |
Result * | fResult |
Combining measurements.
From http://www.slac.stanford.edu/~barlow/java/
Definition at line 4901 of file GraphSysErr.C.
typedef Double_t(* GraphSysErr::Combiner::Wrapper_t) (Double_t *, Double_t *) |
Definition at line 4903 of file GraphSysErr.C.
|
inline |
Constructor.
Definition at line 5067 of file GraphSysErr.C.
|
inlinevirtual |
|
inline |
Add an obervation.
r | Observation |
Definition at line 5096 of file GraphSysErr.C.
References GraphSysErr::Combiner::Observation::fEh, GraphSysErr::Combiner::Observation::fEl, and GraphSysErr::Combiner::Observation::fX.
Referenced by GraphSysErr::Average(), and GraphSysErr::FWHM().
|
inline |
Add an observation.
x | |
el | |
eh |
Definition at line 5107 of file GraphSysErr.C.
References GraphSysErr::Combiner::Observation::Observation().
|
inline |
Do the calculation.
nIter | How many iterations to do. |
Definition at line 5300 of file GraphSysErr.C.
References E(), F(), GraphSysErr::Combiner::Observation::fEh, GraphSysErr::Combiner::Observation::fEl, fResult, GraphSysErr::Combiner::Observation::High(), GraphSysErr::Combiner::Observation::Low(), Wrapper(), and X().
Referenced by GraphSysErr::Average(), and GraphSysErr::FWHM().
|
inline |
Calculate the contribution variance to the with the guess .
where is the term variance
guess | |
r | Obersvation |
Definition at line 5173 of file GraphSysErr.C.
References GraphSysErr::Combiner::Observation::fX, and VarTerm().
Referenced by F().
GraphSysErr::Combiner::ClassDef | ( | Combiner | , |
1 | |||
) |
|
inline |
Clear the internal data.
option | Not used |
Definition at line 5085 of file GraphSysErr.C.
References fResult.
|
inline |
Definition at line 5372 of file GraphSysErr.C.
References GraphSysErr::Combiner::Observation::ClassDef(), GraphSysErr::Combiner::Result::High(), GraphSysErr::Combiner::Result::Low(), MakeF(), and MakeL().
|
inline |
Try to find best error.
nIter | Number of iterations |
sign | Direction (-1 is low, +1 is high) |
best | Current best value |
chi2 | of current best value |
s | Summed weights in the direction |
Definition at line 5212 of file GraphSysErr.C.
References F(), GraphSysErr::Combiner::Observation::fEh, and GraphSysErr::Combiner::Observation::fEl.
Referenced by Calculate().
|
inline |
Calculate the where is current guess at the observation.
guess | Current guess |
chi2 | Optional old from best value |
Definition at line 5189 of file GraphSysErr.C.
References ChiTerm().
Referenced by Calculate(), and E().
|
inline |
Make a function that represents to Log-likehood for a given observation.
r | Observation |
j | Serial number |
Definition at line 5345 of file GraphSysErr.C.
References GraphSysErr::Combiner::Observation::fEh, GraphSysErr::Combiner::Observation::fEl, GraphSysErr::Combiner::Observation::fX, GraphSysErr::Combiner::Observation::High(), GraphSysErr::Combiner::Observation::Low(), and Wrapper().
Referenced by Draw().
|
inline |
Make a line that represents the best found errors.
f | Log-likelyhood function to make it from |
Definition at line 5362 of file GraphSysErr.C.
Referenced by Draw().
|
inline |
Print content of the list.
option | not used |
Definition at line 5119 of file GraphSysErr.C.
References GraphSysErr::Combiner::Observation::Print(), StepOffset(), StepW(), VarTerm(), and W().
Referenced by GraphSysErr::FWHM().
|
pure virtual |
Calculate the bias.
Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.
|
pure virtual |
Calculate the weight based on a guess of best .
guess | Current guess |
r | Observation |
Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.
Referenced by Print(), GraphSysErr::LinearSigmaCombiner::W(), and X().
|
pure virtual |
Calculate the contribution variance to the with the guess .
Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.
|
pure virtual |
Calculate the weight.
r | Observation |
Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.
Referenced by Print().
|
pure virtual |
Return function pointer to wrapper.
Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.
Referenced by Calculate(), and MakeF().
|
inline |
Find best estimate of .
nIter | Number of iterations |
lowest | Lower bound |
highest | Upper bound |
Definition at line 5262 of file GraphSysErr.C.
References GraphSysErr::Combiner::Observation::fX, StepOffset(), and StepW().
Referenced by Calculate().
TClonesArray GraphSysErr::Combiner::fData |
Definition at line 5061 of file GraphSysErr.C.
Referenced by GraphSysErr::ExportPoint(), GraphSysErr::GetYandError(), GraphSysErr::MakeDataGraph(), and GraphSysErr::MakeMulti().
Result* GraphSysErr::Combiner::fResult |
Definition at line 5062 of file GraphSysErr.C.
Referenced by GraphSysErr::Average(), Calculate(), Clear(), and ~Combiner().