]>
Commit | Line | Data |
---|---|---|
284050f7 | 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" | |
f6659a9d | 9 | #include "TVectorD.h" |
10 | #include "TMatrixD.h" | |
3392b4c9 | 11 | #include "TGraph2D.h" |
12 | #include "TGraph.h" | |
284050f7 | 13 | |
f6659a9d | 14 | class TH1F; |
3392b4c9 | 15 | class TH3; |
16 | ||
284050f7 | 17 | |
18 | class AliMathBase : public TObject | |
19 | { | |
20 | public: | |
21 | AliMathBase(); | |
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); | |
09a29b67 | 26 | static void TruncatedMean(TH1F * his, TVectorD *param, Float_t down=0, Float_t up=1.0, Bool_t verbose=kFALSE); |
f6659a9d | 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); | |
5f645a6e | 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); | |
5608e15a | 31 | |
09a29b67 | 32 | static Double_t TruncatedGaus(Double_t mean, Double_t sigma, Double_t cutat); |
4c5881a0 | 33 | static Double_t TruncatedGaus(Double_t mean, Double_t sigma, Double_t leftCut, Double_t rightCut); |
3392b4c9 | 34 | |
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); | |
37 | ||
bb7e41dd | 38 | static Double_t ErfcFast(Double_t x); // Complementary error function erfc(x) |
39 | static Double_t ErfFast(Double_t x) {return 1-ErfcFast(x);} // Error function erf(x) | |
40 | ||
5608e15a | 41 | // |
42 | // TestFunctions: | |
43 | // | |
44 | static void TestGausFit(Int_t nhistos=5000); | |
f6d87824 | 45 | |
46 | // | |
47 | // Bethe-Bloch formula parameterizations | |
48 | // | |
49 | static Double_t BetheBlochAleph(Double_t bg, | |
50 | Double_t kp1=0.76176e-1, | |
51 | Double_t kp2=10.632, | |
52 | Double_t kp3=0.13279e-4, | |
53 | Double_t kp4=1.8631, | |
54 | Double_t kp5=1.9479 | |
55 | ); | |
f6659a9d | 56 | |
284050f7 | 57 | ClassDef(AliMathBase,0) // Various mathematical tools for physics analysis - which are not included in ROOT TMath |
58 | ||
59 | }; | |
60 | #endif |