]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSstatistics2.h
Updates concerning the geometry: versioning system, new V11hybrid version, bug fixes...
[u/mrichter/AliRoot.git] / ITS / AliITSstatistics2.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSTATISTICS2_H
2#define ALIITSSTATISTICS2_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
13class AliITSstatistics2 : public TObject {
14//
b0f5e3fc 15 public:
492b8715 16 AliITSstatistics2(); // default constructor
17 AliITSstatistics2(Int_t order); // Standard constructor
18 AliITSstatistics2(AliITSstatistics2 &source); // copy constructor
19 AliITSstatistics2& operator=(AliITSstatistics2 &source); // operator=
20 virtual ~AliITSstatistics2();// destructor
21 void Reset(Int_t order=-1); // Resets statictisc order=-1 do not change order.
b0f5e3fc 22 void AddValue(Double_t y,Double_t x,Double_t w);
492b8715 23 Double_t GetXNth (Int_t order)const;
24 Double_t GetYNth (Int_t order)const;
25 Double_t GetYXNth(Int_t order)const;
26 Double_t GetMeanY()const{// return mean y
27 return GetYNth(1);};
28 Double_t GetMeanX()const{// return mean x
29 return GetXNth(1);};
30 Double_t GetMeanYX()const{// return mean Y*X
31 return GetYXNth(1);};
32 Int_t GetN()const{// retrun the number of entries
33 return fN;};
34 Int_t GetOrder()const{// return the maximum moment order
35 return fOrder;};
36 Double_t GetXN (Int_t order)const{// returns x^n
37 return fX[order-1];};
38 Double_t GetYN (Int_t order)const{// returns y^n
39 return fY[order-1];};
40 Double_t GetYXN(Int_t order)const{// returns (yx)^n
41 return fYx[order-1];};
42 Double_t GetWN (Int_t order)const{// returns w^n (weight)
43 return fW[order-1];};
44 Double_t GetRMSY()const; // Returns Y rms value
45 Double_t GetRMSX()const; // Returns X rms value
46 Double_t GetRMSYX()const;// Return XY rms value
47 Double_t GetErrorMeanY()const; // returns error on y mean
48 Double_t GetErrorMeanX()const; // returns error on x mean
49 Double_t GetErrorMeanYX()const;// returns error on xy mean
50 Double_t GetErrorRMSY()const; // returns error on y rms
51 Double_t GetErrorRMSX()const; // returns error on x rms
52 Double_t GetErrorRMSYX()const; // returns error on xy rms
53 // returns Chi^2 value of data to line y=ax+b with given a,b
54 Double_t GetChiSquared(Double_t a,Double_t b)const;
55 // Fits data to a line of the form y=ax+b and returns values
56 // for a and b.
57 Double_t FitToLine(Double_t &a,Double_t &b)const;
58 // Print class in ascii form to stream
59 virtual void PrintAscii(ostream *os)const;
60 // Read in class in ascii form from stream
61 virtual void ReadAscii(istream *is);
b0f5e3fc 62
63 private:
b0f5e3fc 64 Int_t fN; // number of enetries
e8189707 65 Int_t fOrder; // maximum moment of distributions (^n)
07025d6d 66 Double_t *fX; //[fOrder] array of sums of x^n
67 Double_t *fYx; //[fOrder] array of sums of (xy)^n
68 Double_t *fY; //[fOrder] array of sums of y^n
69 Double_t *fW; //[fOrder] array of sums of w^n (weights)
b0f5e3fc 70
07025d6d 71 ClassDef(AliITSstatistics2,1) //compute usueful statistics in 2D
b0f5e3fc 72};
492b8715 73// Input and output function for standard C++ input/output.
74ostream &operator<<(ostream &os,const AliITSstatistics2 &s);
75istream &operator>>(istream &is,AliITSstatistics2 &s);
b0f5e3fc 76#endif