Adding the PROOF comments
[u/mrichter/AliRoot.git] / RALICE / AliSample.h
d88f97cc 1#ifndef ALISAMPLE_H
2#define ALISAMPLE_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
f531a546 6// $Id$
3da30618 7
d88f97cc 8#include <math.h>
d88f97cc 9
10#include "Rtypes.h"
219e9b7e 11#include "TArrayF.h"
d88f97cc 12
13class AliSample
15 public:
16 AliSample(); // Default constructor
17 virtual ~AliSample(); // Default destructor
18 void Reset(); // Reset complete statistics
19 void Enter(Float_t x); // Enter value for 1-dim. sample
20 void Remove(Float_t x); // Remove value from 1-dim. sample
21 void Enter(Float_t x, Float_t y); // Enter value for 2-dim. sample
22 void Remove(Float_t x, Float_t y); // Remove value from 2-dim. sample
23 void Enter(Float_t x, Float_t y, Float_t z); // Enter value for 3-dim. sample
24 void Remove(Float_t x, Float_t y, Float_t z); // Remove value from 3-dim. sample
261c0caf 25 Int_t GetDimension() const; // Provide dimension of the sample
26 Int_t GetN() const; // Provide the number of entries
27 Float_t GetSum(Int_t i) const; // Provide sum for i-th variable
28 Float_t GetMean(Int_t i) const; // Provide mean for i-th variable
29 Float_t GetVar(Int_t i) const; // Provide variance for i-th variable
30 Float_t GetSigma(Int_t i) const; // Standard deviation for i-th variable
31 Float_t GetCov(Int_t i, Int_t j) const; // Covariance for i-th and j-th variable
32 Float_t GetCor(Int_t i, Int_t j) const; // Correlation for i-th and j-th variable
219e9b7e 33 Float_t GetMedian(Int_t i); // Provide median for i-th variable
25eefd00 34 Float_t GetSpread(Int_t i); // Provide spread w.r.t. the median for i-th variable
35e721bf 35 Float_t GetMinimum(Int_t i) const; // Provide the minimum value for i-th variable
36 Float_t GetMaximum(Int_t i) const; // Provide the maximum value for i-th variable
219e9b7e 37 void Data(); // Stat. info for the complete sample
38 void Data(Int_t i); // Stat. info for the i-th variable
261c0caf 39 void Data(Int_t i, Int_t j) const; // Stat. info for i-th and j-th variable
219e9b7e 40 void SetStoreMode(Int_t mode=1); // Set mode for storage of all entered data
41 Int_t GetStoreMode() const; // Provide storage mode of all entered data
d88f97cc 42
43 private:
44 Int_t fDim; // Dimension of the sample
45 Int_t fN; // Number of entries of the sample
46 enum {fMaxdim=3}; // Maximum supported dimension
47 char fNames[fMaxdim]; // Variable names i.e. X,Y,Z
48 Float_t fSum[fMaxdim]; // Total sum for each variable
49 Float_t fSum2[fMaxdim][fMaxdim]; // Total sum**2 for each variable
50 void Compute(); // Compute the various quantities
51 Float_t fMean[fMaxdim]; // Mean for each variable
52 Float_t fVar[fMaxdim]; // Variation for each variable
53 Float_t fSigma[fMaxdim]; // Standard deviation for each variable
54 Float_t fCov[fMaxdim][fMaxdim]; // Covariances of pairs of variables
55 Float_t fCor[fMaxdim][fMaxdim]; // Correlations of pairs of variables
25eefd00 56 Float_t fMin[fMaxdim]; // Minimum value for each variable
57 Float_t fMax[fMaxdim]; // Maximum value for each variable
58 Int_t fRemove; // Flag to indicate that some entry has been removed
219e9b7e 59 Int_t fStore; // Flag to denote storage of all entered data
60 TArrayF* fX; // Storage array for the 1st variable (e.g. X)
61 TArrayF* fY; // Storage array for the 2nd variable (e.g. Y)
62 TArrayF* fZ; // Storage array for the 3rd variable (e.g. Z)
63 TArrayF* fArr; // Temp. storage array for ordering
6516b62d 64
65 ClassDef(AliSample,0) // Statistics tools for various multi-dimensional data samples.
d88f97cc 66};