1 #ifndef ALIITSSTATISTICS_H
2 #define ALIITSSTATISTICS_H
3 //////////////////////////////////////////////////////////////////////////
4 // Alice ITS first detector alignment program. //
6 // version: 0.0.0 Draft. //
7 // Date: April 18 1999 //
8 // By: Bjorn S. Nilsen //
10 //////////////////////////////////////////////////////////////////////////
13 class AliITSstatistics : public TObject {
18 AliITSstatistics(Int_t order);
19 AliITSstatistics(const AliITSstatistics &source); // copy constructor
20 AliITSstatistics& operator=(const AliITSstatistics &source); // operator=
21 virtual ~AliITSstatistics();
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
30 Int_t GetN() const{// returns the number of entries
33 Int_t GetOrder() const {// returns the order of the moment of the distribution
36 Double_t GetXN(Int_t order) const{// returns X^N
39 Double_t GetWN(Int_t order)const {// returns W^N
43 Double_t GetErrorMean();
44 Double_t GetErrorRMS();
47 Int_t fN; //fN number of enetries
48 Int_t fOrder;//fOrder maximum allowed moment
49 Double_t *fX; //[fOrder] fX array of x moments
50 Double_t *fW; //[fOrder] fW array of weight by moment
52 ClassDef(AliITSstatistics,1)// A class to do simple statistics calculations