ROOT logo
AliRoot » STEER » STEERBASE » AliMathBase

class AliMathBase: public TObject

 Class AliMathBase

 Subset of  matheamtical functions  not included in the TMath

Function Members (Methods)

public:
AliMathBase()
AliMathBase(const AliMathBase&)
virtual~AliMathBase()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
static Double_tBetheBlochAleph(Double_t bg, Double_t kp1 = 0.76176e-1, Double_t kp2 = 10.632, Double_t kp3 = 0.13279e-4, Double_t kp4 = 1.8631, Double_t kp5 = 1.9479)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
static Double_tErfcFast(Double_t x)
static Double_tErfFast(Double_t x)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
static voidEvaluateUni(Int_t nvectors, Double_t* data, Double_t& mean, Double_t& sigma, Int_t hh)
static voidEvaluateUniExternal(Int_t nvectors, Double_t* data, Double_t& mean, Double_t& sigma, Int_t hh, Float_t externalfactor = 1)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
static Double_tFitGaus(TH1F* his, TVectorD* param = 0, TMatrixD* matrix = 0, Float_t xmin = 0, Float_t xmax = 0, Bool_t verbose = kFALSE)
static Double_tFitGaus(Float_t* arr, Int_t nBins, Float_t xMin, Float_t xMax, TVectorD* param = 0, TMatrixD* matrix = 0, Bool_t verbose = kFALSE)
static Int_tFreq(Int_t n, const Int_t* inlist, Int_t* outlist, Bool_t down)
static Double_tGamma(Double_t k = 0)
static Float_tGetCOG(Short_t* arr, Int_t nBins, Float_t xMin, Float_t xMax, Float_t* rms = 0, Float_t* sum = 0)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
static voidLTM(TH1F* his, TVectorD* param = 0, Float_t fraction = 1, Bool_t verbose = kFALSE)
static TGraph*MakeStat1D(TH3* his, Int_t delta1, Int_t type)
static TGraph2D*MakeStat2D(TH3* his, Int_t delta0, Int_t delta1, Int_t type)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AliMathBase&operator=(const AliMathBase&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
static voidTestGausFit(Int_t nhistos = 5000)
static Double_tTruncatedGaus(Double_t mean, Double_t sigma, Double_t cutat)
static Double_tTruncatedGaus(Double_t mean, Double_t sigma, Double_t leftCut, Double_t rightCut)
static voidTruncatedMean(TH1F* his, TVectorD* param, Float_t down = 0, Float_t up = 1.0, Bool_t verbose = kFALSE)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

Class Charts

Inheritance Chart:
TObject
AliMathBase

Function documentation

AliMathBase()
 Default constructor

~AliMathBase()
 Destructor

void EvaluateUni(Int_t nvectors, Double_t* data, Double_t& mean, Double_t& sigma, Int_t hh)
 Robust estimator in 1D case MI version - (faster than ROOT version)

 For the univariate case
 estimates of location and scatter are returned in mean and sigma parameters
 the algorithm works on the same principle as in multivariate case -
 it finds a subset of size hh with smallest sigma, and then returns mean and
 sigma of this subset

void EvaluateUniExternal(Int_t nvectors, Double_t* data, Double_t& mean, Double_t& sigma, Int_t hh, Float_t externalfactor = 1)
 Modified version of ROOT robust EvaluateUni
 robust estimator in 1D case MI version
 added external factor to include precision of external measurement

Int_t Freq(Int_t n, const Int_t* inlist, Int_t* outlist, Bool_t down)
  Sort eleements according occurancy
  The size of output array has is 2*n

void TruncatedMean(TH1F* his, TVectorD* param, Float_t down = 0, Float_t up = 1.0, Bool_t verbose = kFALSE)


void LTM(TH1F* his, TVectorD* param = 0, Float_t fraction = 1, Bool_t verbose = kFALSE)
 LTM

Double_t FitGaus(TH1F* his, TVectorD* param = 0, TMatrixD* matrix = 0, Float_t xmin = 0, Float_t xmax = 0, Bool_t verbose = kFALSE)
  Fit histogram with gaussian function

  Prameters:
       return value- chi2 - if negative ( not enough points)
       his        -  input histogram
       param      -  vector with parameters
       xmin, xmax -  range to fit - if xmin=xmax=0 - the full histogram range used
  Fitting:
  1. Step - make logarithm
  2. Linear  fit (parabola) - more robust - always converge
  3. In case of small statistic bins are averaged

Double_t FitGaus(Float_t* arr, Int_t nBins, Float_t xMin, Float_t xMax, TVectorD* param = 0, TMatrixD* matrix = 0, Bool_t verbose = kFALSE)
  Fit histogram with gaussian function

  Prameters:
     nbins: size of the array and number of histogram bins
     xMin, xMax: histogram range
     param: paramters of the fit (0-Constant, 1-Mean, 2-Sigma, 3-Sum)
     matrix: covariance matrix -- not implemented yet, pass dummy matrix!!!

  Return values:
    >0: the chi2 returned by TLinearFitter
    -3: only three points have been used for the calculation - no fitter was used
    -2: only two points have been used for the calculation - center of gravity was uesed for calculation
    -1: only one point has been used for the calculation - center of gravity was uesed for calculation
    -4: invalid result!!

  Fitting:
  1. Step - make logarithm
  2. Linear  fit (parabola) - more robust - always converge

Float_t GetCOG(Short_t* arr, Int_t nBins, Float_t xMin, Float_t xMax, Float_t* rms = 0, Float_t* sum = 0)
  calculate center of gravity rms and sum for array 'arr' with nBins an a x range xMin to xMax
  return COG; in case of failure return xMin

Double_t ErfcFast(Double_t x)
 Fast implementation of the complementary error function
 The error of the approximation is |eps(x)| < 5E-4
 See Abramowitz and Stegun, p.299, 7.1.27
void TestGausFit(Int_t nhistos = 5000)
 Test performance of the parabolic - gaussian fit - compare it with
 ROOT gauss fit
  nhistos - number of histograms to be used for test

TGraph2D * MakeStat2D(TH3* his, Int_t delta0, Int_t delta1, Int_t type)


 delta - number of bins to integrate
 type - 0 - mean value
TGraph * MakeStat1D(TH3* his, Int_t delta1, Int_t type)


 delta - number of bins to integrate
 type - 0 - mean value
Double_t TruncatedGaus(Double_t mean, Double_t sigma, Double_t cutat)
 return number generated according to a gaussian distribution N(mean,sigma) truncated at cutat

Double_t TruncatedGaus(Double_t mean, Double_t sigma, Double_t leftCut, Double_t rightCut)
 return number generated according to a gaussian distribution N(mean,sigma)
 truncated at leftCut and rightCut

Double_t BetheBlochAleph(Double_t bg, Double_t kp1 = 0.76176e-1, Double_t kp2 = 10.632, Double_t kp3 = 0.13279e-4, Double_t kp4 = 1.8631, Double_t kp5 = 1.9479)
 This is the empirical ALEPH parameterization of the Bethe-Bloch formula.
 It is normalized to 1 at the minimum.

 bg - beta*gamma

 The default values for the kp* parameters are for ALICE TPC.
 The returned value is in MIP units

Double_t Gamma(Double_t k = 0)
 from
 Hisashi Tanizaki
 http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.158.3866&rep=rep1&type=pdf
 A. Morsch 14/01/2014
AliMathBase()
Double_t ErfFast(Double_t x)
{return 1-ErfcFast(x);}