AliPhysics  114179e (114179e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GraphSysErr::Combiner Struct Referenceabstract
Inheritance diagram for GraphSysErr::Combiner:

Classes

struct  Observation
 
struct  Result
 

Public Types

typedef Double_t(* Wrapper_t )(Double_t *, Double_t *)
 

Public Member Functions

 Combiner ()
 
virtual ~Combiner ()
 
virtual Double_t W (const Observation &r) const =0
 
virtual Double_t StepW (Double_t guess, const Observation &r) const =0
 
virtual Double_t StepOffset (Double_t guess, const Observation &r) const =0
 
virtual Double_t VarTerm (Double_t guess, const Observation &r) const =0
 
Double_t ChiTerm (Double_t guess, const Observation &r) const
 
Double_t F (Double_t guess, Double_t chi2) const
 
Double_t E (UShort_t nIter, Int_t sign, Double_t best, Double_t chi2, Double_t s)
 
Double_t X (UShort_t nIter, Double_t lowest, Double_t highest)
 
ResultCalculate (UShort_t nIter=50)
 
virtual Wrapper_t Wrapper () const =0
 
TF1 * MakeF (const Observation &r, Int_t j) const
 
TLine * MakeL (TF1 *f) const
 
void Draw (Option_t *option="")
 
 ClassDef (Combiner, 1)
 
The data store
void Clear (Option_t *option="")
 
void Add (const Observation &r)
 
void Add (Double_t x, Double_t el, Double_t eh)
 
void Print (Option_t *option="") const
 

Public Attributes

TClonesArray fData
 
ResultfResult
 

Detailed Description

Combining measurements

From http://www.slac.stanford.edu/~barlow/java/

Definition at line 4911 of file GraphSysErr.C.

Member Typedef Documentation

typedef Double_t(* GraphSysErr::Combiner::Wrapper_t)(Double_t *, Double_t *)

Definition at line 4913 of file GraphSysErr.C.

Constructor & Destructor Documentation

GraphSysErr::Combiner::Combiner ( )
inline

Constructor

Definition at line 5077 of file GraphSysErr.C.

virtual GraphSysErr::Combiner::~Combiner ( )
inlinevirtual

Virtual destructor

Definition at line 5085 of file GraphSysErr.C.

Member Function Documentation

void GraphSysErr::Combiner::Add ( const Observation r)
inline

Add an obervation

Parameters
rObservation

Definition at line 5106 of file GraphSysErr.C.

Referenced by GraphSysErr::Average(), and GraphSysErr::FWHM().

void GraphSysErr::Combiner::Add ( Double_t  x,
Double_t  el,
Double_t  eh 
)
inline

Add an observation

Parameters
x\( x_i\)
el\( \sigma_i^-\)
eh\( \sigma_i^+\)

Definition at line 5117 of file GraphSysErr.C.

Result* GraphSysErr::Combiner::Calculate ( UShort_t  nIter = 50)
inline

Do the calculation

Parameters
nIterHow many iterations to do.
Returns
The best estimate of \( x\) and associated errors

Definition at line 5310 of file GraphSysErr.C.

Referenced by GraphSysErr::Average(), and GraphSysErr::FWHM().

Double_t GraphSysErr::Combiner::ChiTerm ( Double_t  guess,
const Observation r 
) const
inline

Calculate the contribution variance to the \(\chi^2\) with the guess \( x'\).

\[ t_i(x') = (x' - x_i)^2 / v_i(x') \]

where \( v_i(x')\) is the term variance

Parameters
guess\( x'\)
rObersvation
Returns
\( t(x')\)

Definition at line 5183 of file GraphSysErr.C.

Referenced by F().

GraphSysErr::Combiner::ClassDef ( Combiner  ,
 
)
void GraphSysErr::Combiner::Clear ( Option_t option = "")
inline

Clear the internal data

Parameters
optionNot used

Definition at line 5095 of file GraphSysErr.C.

void GraphSysErr::Combiner::Draw ( Option_t option = "")
inline

Definition at line 5382 of file GraphSysErr.C.

Double_t GraphSysErr::Combiner::E ( UShort_t  nIter,
Int_t  sign,
Double_t  best,
Double_t  chi2,
Double_t  s 
)
inline

Try to find best error

Parameters
nIterNumber of iterations
signDirection (-1 is low, +1 is high)
bestCurrent best \( x\) value
chi2\( \chi^2\) of current best \( x\) value
sSummed weights in the direction
Returns
The error in the chosen direction

Definition at line 5222 of file GraphSysErr.C.

Referenced by Calculate().

Double_t GraphSysErr::Combiner::F ( Double_t  guess,
Double_t  chi2 
) const
inline

Calculate the \( \chi^2(x')\) where \( x'\) is current guess at the observation.

Parameters
guessCurrent guess \( x'\)
chi2Optional old \( \chi^2\) from best \( x\) value
Returns
\( \chi^2(x')\)

Definition at line 5199 of file GraphSysErr.C.

Referenced by Calculate(), and E().

TF1* GraphSysErr::Combiner::MakeF ( const Observation r,
Int_t  j 
) const
inline

Make a function that represents to Log-likehood for a given observation.

Parameters
rObservation
jSerial number
Returns
Pointer to newly allocated function object

Definition at line 5355 of file GraphSysErr.C.

Referenced by Draw().

TLine* GraphSysErr::Combiner::MakeL ( TF1 *  f) const
inline

Make a line that represents the best found errors

Parameters
fLog-likelyhood function to make it from
Returns

Definition at line 5372 of file GraphSysErr.C.

Referenced by Draw().

void GraphSysErr::Combiner::Print ( Option_t option = "") const
inline

Print content of the list

Parameters
optionnot used

Definition at line 5129 of file GraphSysErr.C.

Referenced by GraphSysErr::FWHM().

virtual Double_t GraphSysErr::Combiner::StepOffset ( Double_t  guess,
const Observation r 
) const
pure virtual

Calculate the bias.

Returns
\(\delta(x')\)

Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.

Referenced by X().

virtual Double_t GraphSysErr::Combiner::StepW ( Double_t  guess,
const Observation r 
) const
pure virtual

Calculate the weight based on a guess of best \( x'\)

Parameters
guessCurrent guess \( x'\)
rObservation
Returns
\( W(x')\)

Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.

Referenced by X().

virtual Double_t GraphSysErr::Combiner::VarTerm ( Double_t  guess,
const Observation r 
) const
pure virtual

Calculate the contribution variance to the \(\chi^2\) with the guess \(x'\).

Returns
\( v(x')\)

Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.

Referenced by ChiTerm().

virtual Double_t GraphSysErr::Combiner::W ( const Observation r) const
pure virtual

Calculate the weight

Parameters
rObservation
Returns
\( W\)

Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.

virtual Wrapper_t GraphSysErr::Combiner::Wrapper ( ) const
pure virtual

Return function pointer to wrapper

Returns
Function pointer

Implemented in GraphSysErr::LinearVarianceCombiner, and GraphSysErr::LinearSigmaCombiner.

Referenced by MakeF().

Double_t GraphSysErr::Combiner::X ( UShort_t  nIter,
Double_t  lowest,
Double_t  highest 
)
inline

Find best estimate of \( x\)

Parameters
nIterNumber of iterations
lowestLower bound
highestUpper bound
Returns
\( x\)

Definition at line 5272 of file GraphSysErr.C.

Referenced by Calculate().

Member Data Documentation

TClonesArray GraphSysErr::Combiner::fData

Definition at line 5071 of file GraphSysErr.C.

Referenced by Add(), Calculate(), Clear(), Combiner(), Draw(), E(), F(), Print(), X(), and ~Combiner().

Result* GraphSysErr::Combiner::fResult

Definition at line 5072 of file GraphSysErr.C.

Referenced by GraphSysErr::Average(), Calculate(), Clear(), Draw(), and ~Combiner().


The documentation for this struct was generated from the following file: