]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSstatistics.h
Forward declarations added and formatting
[u/mrichter/AliRoot.git] / ITS / AliITSstatistics.h
1 #ifndef ALIITSSTATISTICS_H
2 #define ALIITSSTATISTICS_H
3 //////////////////////////////////////////////////////////////////////////
4 //  Alice ITS first detector alignment program.                         //
5 //                                                                      //
6 // version: 0.0.0 Draft.                                                //
7 // Date: April 18 1999                                                  //
8 // By: Bjorn S. Nilsen                                                  //
9 //                                                                      //
10 //////////////////////////////////////////////////////////////////////////
11 #include "TObject.h"
12
13 class AliITSstatistics : public TObject {
14 //
15
16  public:
17   AliITSstatistics();
18   AliITSstatistics(Int_t order);
19   AliITSstatistics(AliITSstatistics &source); // copy  constructor
20   AliITSstatistics& operator=(AliITSstatistics &source); // operator=
21   virtual ~AliITSstatistics();
22   void Reset();
23   void AddValue(Double_t x,Double_t w);
24   void AddValue(Double_t x){ Double_t weight=1.0; AddValue(x,weight);} // Default weight of 1
25   void AddValue(Float_t x,Float_t w){AddValue((Double_t)x,(Double_t)w);} //float
26   void AddValue(Float_t x){Float_t weight=1.0; AddValue(x,weight);} // floats default weight of 1
27   Double_t GetNth(Int_t order);
28   Double_t GetMean() {// returns the mean
29     return GetNth(1);};
30   Int_t GetN(){// returns the number of entries
31     return fN;
32   };
33   Int_t GetOrder(){// returns the order of the moment of the distribution
34     return fOrder;
35   };
36   Double_t GetXN(Int_t order){// returns X^N
37     return fx[order-1];
38   };
39   Double_t GetWN(Int_t order){// returns W^N
40     return fw[order-1];
41   };
42   Double_t GetRMS();
43   Double_t GetErrorMean();
44   Double_t GetErrorRMS();
45
46  private:
47   Double_t *fx;   // fx array of x moments
48   Double_t *fw;   // fw array of weight by moment
49   Int_t    fN;    // fN number of enetries
50   Int_t    fOrder;// fOrder maximum allowed moment
51
52   ClassDef(AliITSstatistics,1)// A class to do simple statistics calculations
53 };
54 #endif