]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliMathBase.h
Memory leak corrected (Ch. Klein-Boesing)
[u/mrichter/AliRoot.git] / STEER / AliMathBase.h
1 #ifndef ALIMATHBASE_H
2 #define ALIMATHBASE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6
7  
8 #include "TObject.h"
9 #include "TVectorD.h"
10 #include "TMatrixD.h"
11
12 class TH1F;
13  
14 class AliMathBase : public TObject
15 {
16  public:
17   AliMathBase();
18   virtual ~AliMathBase();
19   static void    EvaluateUni(Int_t nvectors, Double_t *data, Double_t &mean, Double_t &sigma, Int_t hh);
20   static void    EvaluateUniExternal(Int_t nvectors, Double_t *data, Double_t &mean, Double_t &sigma, Int_t hh, Float_t externalfactor=1);
21   static Int_t  Freq(Int_t n, const Int_t *inlist, Int_t *outlist, Bool_t down);    
22   static  void TruncatedMean(TH1F * his, TVectorD *param, Float_t down=0, Float_t up=1.0, Bool_t verbose=kFALSE);
23   static void LTM(TH1F * his, TVectorD *param=0 , Float_t fraction=1,  Bool_t verbose=kFALSE);
24   static Double_t  FitGaus(TH1F* his, TVectorD *param=0, TMatrixD *matrix=0, Float_t xmin=0, Float_t xmax=0,  Bool_t verbose=kFALSE);
25   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);
26   static Float_t  GetCOG(Short_t *arr, Int_t nBins, Float_t xMin, Float_t xMax, Float_t *rms=0, Float_t *sum=0);
27
28   //
29   // TestFunctions:
30   //
31  static  void TestGausFit(Int_t nhistos=5000);
32     
33  ClassDef(AliMathBase,0) // Various mathematical tools for physics analysis - which are not included in ROOT TMath
34  
35 };
36 #endif