]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSstatistics2.h
Pyhtia comparison extended
[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//
15
16 public:
17 AliITSstatistics2();
18 AliITSstatistics2(Int_t order);
19 AliITSstatistics2(AliITSstatistics2 &source); // copy constructor
20 AliITSstatistics2& operator=(AliITSstatistics2 &source); // operator=
21 virtual ~AliITSstatistics2();
22 void Reset();
23 void AddValue(Double_t y,Double_t x,Double_t w);
b0f5e3fc 24 Double_t GetXNth (Int_t order);
25 Double_t GetYNth (Int_t order);
26 Double_t GetYXNth(Int_t order);
27 Double_t GetMeanY() {
28 // return mean y
29 return GetYNth(1);
30 };
31 Double_t GetMeanX() {
32 // return mean x
33 return GetXNth(1);
34 };
35 Double_t GetMeanYX() {
36 // return mean Y*X
37 return GetYXNth(1);
38 };
39 Int_t GetN(){
40 // retrun the number of entries
41 return fN;
42 };
43 Int_t GetOrder(){
44 // return the maximum moment order
45 return fOrder;
46 };
47 Double_t GetXN (Int_t order){
48 // returns x^n
07025d6d 49 return fX[order-1];
b0f5e3fc 50 };
51 Double_t GetYN (Int_t order){
52 // returns y^n
07025d6d 53 return fY[order-1];
b0f5e3fc 54 };
55 Double_t GetYXN(Int_t order){
56 // returns (yx)^n
07025d6d 57 return fYx[order-1];
b0f5e3fc 58 };
59 Double_t GetWN (Int_t order){
60 // returns w^n (weight)
07025d6d 61 return fW[order-1];
b0f5e3fc 62 };
63 Double_t GetRMSY();
64 Double_t GetRMSX();
65 Double_t GetRMSYX();
66 Double_t GetErrorMeanY();
67 Double_t GetErrorMeanX();
68 Double_t GetErrorMeanYX();
69 Double_t GetErrorRMSY();
70 Double_t GetErrorRMSX();
71 Double_t GetErrorRMSYX();
72 Double_t FitToLine(Double_t &a,Double_t &b);
73
74 private:
b0f5e3fc 75 Int_t fN; // number of enetries
e8189707 76 Int_t fOrder; // maximum moment of distributions (^n)
07025d6d 77 Double_t *fX; //[fOrder] array of sums of x^n
78 Double_t *fYx; //[fOrder] array of sums of (xy)^n
79 Double_t *fY; //[fOrder] array of sums of y^n
80 Double_t *fW; //[fOrder] array of sums of w^n (weights)
b0f5e3fc 81
82
07025d6d 83 ClassDef(AliITSstatistics2,1) //compute usueful statistics in 2D
b0f5e3fc 84};
85#endif