]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/AliSample.h
track matching macros from Alberto
[u/mrichter/AliRoot.git] / RALICE / AliSample.h
CommitLineData
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 */
5
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
14{
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
35e721bf 34 Float_t GetMinimum(Int_t i) const; // Provide the minimum value for i-th variable
35 Float_t GetMaximum(Int_t i) const; // Provide the maximum value for i-th variable
219e9b7e 36 void Data(); // Stat. info for the complete sample
37 void Data(Int_t i); // Stat. info for the i-th variable
261c0caf 38 void Data(Int_t i, Int_t j) const; // Stat. info for i-th and j-th variable
219e9b7e 39 void SetStoreMode(Int_t mode=1); // Set mode for storage of all entered data
40 Int_t GetStoreMode() const; // Provide storage mode of all entered data
d88f97cc 41
42 private:
43 Int_t fDim; // Dimension of the sample
44 Int_t fN; // Number of entries of the sample
45 enum {fMaxdim=3}; // Maximum supported dimension
46 char fNames[fMaxdim]; // Variable names i.e. X,Y,Z
47 Float_t fSum[fMaxdim]; // Total sum for each variable
48 Float_t fSum2[fMaxdim][fMaxdim]; // Total sum**2 for each variable
49 void Compute(); // Compute the various quantities
50 Float_t fMean[fMaxdim]; // Mean for each variable
51 Float_t fVar[fMaxdim]; // Variation for each variable
52 Float_t fSigma[fMaxdim]; // Standard deviation for each variable
53 Float_t fCov[fMaxdim][fMaxdim]; // Covariances of pairs of variables
54 Float_t fCor[fMaxdim][fMaxdim]; // Correlations of pairs of variables
219e9b7e 55 Int_t fStore; // Flag to denote storage of all entered data
56 TArrayF* fX; // Storage array for the 1st variable (e.g. X)
57 TArrayF* fY; // Storage array for the 2nd variable (e.g. Y)
58 TArrayF* fZ; // Storage array for the 3rd variable (e.g. Z)
59 TArrayF* fArr; // Temp. storage array for ordering
6516b62d 60
61 ClassDef(AliSample,0) // Statistics tools for various multi-dimensional data samples.
d88f97cc 62};
63#endif