Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

XANAGSUtil Class Reference

Some utilities for analysing histograms (of residuals). More...

#include <XANAGSUtil.h>

List of all members.

Public Methods

 XANAGSUtil (const UInt_t nComp, const Float_t *weights, const Float_t *parameters, const Float_t *errors)
 constructor from pointer to existing histogram. More...

 ~XANAGSUtil ()
Float_t quantile (const Float_t) const
 normalised integral from -inf to x (taking into account under- & overflows). More...

Float_t mode () const
 mode. More...

Double_t pdf (const Double_t &) const
 value of the pdf. More...

Double_t cdf (const Double_t &) const
 value of integral(pdf). More...

Double_t dpdf1 (const Double_t &) const
 first derivative of pdf. More...

Double_t dpdf2 (const Double_t &) const
 second derivative of pdf. More...

Double_t combinedMean () const
 mean value of combined state. More...

Float_t MaxWeight () const

Private Methods

Double_t gauss (const Double_t &, const Double_t &, const Double_t &) const
 value of gaussian distribution. More...

Double_t gaussInt (const Double_t &, const Double_t &, const Double_t &) const
 integrated value of gaussian distribution. More...

Double_t findMode (const Double_t) const
 mean value of combined state Double_t combinedMean() const; mode from starting value. More...


Private Attributes

UInt_t theNComp
Float_t * theWeights
Float_t * theParameters
Float_t * theErrors


Detailed Description

Some utilities for analysing histograms (of residuals).

The class keeps a pointer to the original histogram (don't delete before this object is deleted!).

Definition at line 11 of file XANAGSUtil.h.


Constructor & Destructor Documentation

XANAGSUtil::XANAGSUtil const UInt_t    nComp,
const Float_t *    weights,
const Float_t *    parameters,
const Float_t *    errors
[inline]
 

constructor from pointer to existing histogram.

Definition at line 14 of file XANAGSUtil.h.

References theErrors, theNComp, theParameters, and theWeights.

00015                                                                  :
00016     theNComp(nComp),
00017     theWeights(0),
00018     theParameters(0),
00019     theErrors(0)
00020   {
00021     if ( theNComp ) {
00022       theWeights = new Float_t[theNComp];
00023       theParameters = new Float_t[theNComp];
00024       theErrors = new Float_t[theNComp];
00025     }
00026     const Float_t* wPtr1(weights);
00027     const Float_t* pPtr1(parameters);
00028     const Float_t* ePtr1(errors);
00029     Float_t* wPtr2(theWeights);
00030     Float_t* pPtr2(theParameters);
00031     Float_t* ePtr2(theErrors);
00032     for ( UInt_t i=0; i<theNComp; i++ ) {
00033       *(wPtr2++) = weights ? *(wPtr1++) : 1.;
00034       *(pPtr2++) = *(pPtr1++);
00035       *(ePtr2++) = *(ePtr1++);
00036     }
00037   } 

XANAGSUtil::~XANAGSUtil   [inline]
 

Definition at line 38 of file XANAGSUtil.h.

References theErrors, theParameters, and theWeights.

00039   {
00040     delete [] theWeights;
00041     delete [] theParameters;
00042     delete [] theErrors;
00043   }


Member Function Documentation

Double_t XANAGSUtil::cdf const Double_t &    const
 

value of integral(pdf).

Double_t XANAGSUtil::combinedMean   const
 

mean value of combined state.

Double_t XANAGSUtil::dpdf1 const Double_t &    const
 

first derivative of pdf.

Double_t XANAGSUtil::dpdf2 const Double_t &    const
 

second derivative of pdf.

Double_t XANAGSUtil::findMode const    Double_t const [private]
 

mean value of combined state Double_t combinedMean() const; mode from starting value.

Double_t XANAGSUtil::gauss const Double_t &   ,
const Double_t &   ,
const Double_t &   
const [private]
 

value of gaussian distribution.

Double_t XANAGSUtil::gaussInt const Double_t &   ,
const Double_t &   ,
const Double_t &   
const [private]
 

integrated value of gaussian distribution.

Float_t XANAGSUtil::MaxWeight   const
 

Float_t XANAGSUtil::mode   const
 

mode.

Double_t XANAGSUtil::pdf const Double_t &    const
 

value of the pdf.

Float_t XANAGSUtil::quantile const    Float_t const
 

normalised integral from -inf to x (taking into account under- & overflows).


Member Data Documentation

Float_t* XANAGSUtil::theErrors [private]
 

Definition at line 79 of file XANAGSUtil.h.

Referenced by XANAGSUtil, and ~XANAGSUtil.

UInt_t XANAGSUtil::theNComp [private]
 

Definition at line 76 of file XANAGSUtil.h.

Referenced by XANAGSUtil.

Float_t* XANAGSUtil::theParameters [private]
 

Definition at line 78 of file XANAGSUtil.h.

Referenced by XANAGSUtil, and ~XANAGSUtil.

Float_t* XANAGSUtil::theWeights [private]
 

Definition at line 77 of file XANAGSUtil.h.

Referenced by XANAGSUtil, and ~XANAGSUtil.


The documentation for this class was generated from the following file:
Generated on Tue May 10 10:01:38 2005 for XANADOO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002