]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSstatistics2.h
Problems with the HP compiler fixed.
[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);
f2da0d3d 24 void AddValue(Double_t y,Double_t x){
25 // default weight
26 AddValue(y,x,1.0);
27 }
b0f5e3fc 28 void AddValue(Float_t y,Float_t x,Float_t w){
f2da0d3d 29 // Floating point version
30 AddValue((Double_t)y,(Double_t)x,(Double_t)w);
31 }
32 void AddValue(Float_t y,Float_t x){
33 // default weight F.
50b3cf39 34 AddValue((Double_t)y,(Double_t)x,(Double_t)1.0);
f2da0d3d 35 }
b0f5e3fc 36 Double_t GetXNth (Int_t order);
37 Double_t GetYNth (Int_t order);
38 Double_t GetYXNth(Int_t order);
39 Double_t GetMeanY() {
40 // return mean y
41 return GetYNth(1);
42 };
43 Double_t GetMeanX() {
44 // return mean x
45 return GetXNth(1);
46 };
47 Double_t GetMeanYX() {
48 // return mean Y*X
49 return GetYXNth(1);
50 };
51 Int_t GetN(){
52 // retrun the number of entries
53 return fN;
54 };
55 Int_t GetOrder(){
56 // return the maximum moment order
57 return fOrder;
58 };
59 Double_t GetXN (Int_t order){
60 // returns x^n
61 return fx[order-1];
62 };
63 Double_t GetYN (Int_t order){
64 // returns y^n
65 return fy[order-1];
66 };
67 Double_t GetYXN(Int_t order){
68 // returns (yx)^n
69 return fyx[order-1];
70 };
71 Double_t GetWN (Int_t order){
72 // returns w^n (weight)
73 return fw[order-1];
74 };
75 Double_t GetRMSY();
76 Double_t GetRMSX();
77 Double_t GetRMSYX();
78 Double_t GetErrorMeanY();
79 Double_t GetErrorMeanX();
80 Double_t GetErrorMeanYX();
81 Double_t GetErrorRMSY();
82 Double_t GetErrorRMSX();
83 Double_t GetErrorRMSYX();
84 Double_t FitToLine(Double_t &a,Double_t &b);
85
86 private:
87 Double_t *fx; // array of sums of x^n
88 Double_t *fyx; // array of sums of (xy)^n
89 Double_t *fy; // array of sums of y^n
90 Double_t *fw; // array of sums of w^n (weights)
91 Int_t fN; // number of enetries
92 Int_t fOrder; // maximum moment of distributions (^n)
93
94
95 ClassDef(AliITSstatistics2,1) //
96};
97#endif