3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
18 class AliMathBase : public TObject
22 virtual ~AliMathBase();
23 static void EvaluateUni(Int_t nvectors, Double_t *data, Double_t &mean, Double_t &sigma, Int_t hh);
24 static void EvaluateUniExternal(Int_t nvectors, Double_t *data, Double_t &mean, Double_t &sigma, Int_t hh, Float_t externalfactor=1);
25 static Int_t Freq(Int_t n, const Int_t *inlist, Int_t *outlist, Bool_t down);
26 static void TruncatedMean(TH1F * his, TVectorD *param, Float_t down=0, Float_t up=1.0, Bool_t verbose=kFALSE);
27 static void LTM(TH1F * his, TVectorD *param=0 , Float_t fraction=1, Bool_t verbose=kFALSE);
28 static Double_t FitGaus(TH1F* his, TVectorD *param=0, TMatrixD *matrix=0, Float_t xmin=0, Float_t xmax=0, Bool_t verbose=kFALSE);
29 static 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);
30 static Float_t GetCOG(Short_t *arr, Int_t nBins, Float_t xMin, Float_t xMax, Float_t *rms=0, Float_t *sum=0);
32 static Double_t TruncatedGaus(Double_t mean, Double_t sigma, Double_t cutat);
33 static Double_t TruncatedGaus(Double_t mean, Double_t sigma, Double_t leftCut, Double_t rightCut);
35 static TGraph2D * MakeStat2D(TH3 * his, Int_t delta0, Int_t delta1, Int_t type);
36 static TGraph * MakeStat1D(TH3 * his, Int_t delta1, Int_t type);
41 static void TestGausFit(Int_t nhistos=5000);
44 // Bethe-Bloch formula parameterizations
46 static Double_t BetheBlochAleph(Double_t bg,
47 Double_t kp1=0.76176e-1,
49 Double_t kp3=0.13279e-4,
54 ClassDef(AliMathBase,0) // Various mathematical tools for physics analysis - which are not included in ROOT TMath