]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/AliSample.h
Added AliL3Stopwatch.
[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>
9#include <iostream.h>
10
11#include "Rtypes.h"
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
25 Int_t GetDimension(); // Provide dimension of the sample
26 Int_t GetN(); // Provide the number of entries
27 Float_t GetSum(Int_t i); // Provide sum for i-th variable
28 Float_t GetMean(Int_t i); // Provide mean for i-th variable
29 Float_t GetVar(Int_t i); // Provide variance for i-th variable
30 Float_t GetSigma(Int_t i); // Standard deviation for i-th variable
31 Float_t GetCov(Int_t i, Int_t j); // Covariance for i-th and j-th variable
32 Float_t GetCor(Int_t i, Int_t j); // Correlation for i-th and j-th variable
33 void Info(); // Stat. info for the complete sample
34 void Info(Int_t i); // Stat. info for the i-th variable
35 void Info(Int_t i, Int_t j); // Stat. info for i-th and j-th variable
36
37 private:
38 Int_t fDim; // Dimension of the sample
39 Int_t fN; // Number of entries of the sample
40 enum {fMaxdim=3}; // Maximum supported dimension
41 char fNames[fMaxdim]; // Variable names i.e. X,Y,Z
42 Float_t fSum[fMaxdim]; // Total sum for each variable
43 Float_t fSum2[fMaxdim][fMaxdim]; // Total sum**2 for each variable
44 void Compute(); // Compute the various quantities
45 Float_t fMean[fMaxdim]; // Mean for each variable
46 Float_t fVar[fMaxdim]; // Variation for each variable
47 Float_t fSigma[fMaxdim]; // Standard deviation for each variable
48 Float_t fCov[fMaxdim][fMaxdim]; // Covariances of pairs of variables
49 Float_t fCor[fMaxdim][fMaxdim]; // Correlations of pairs of variables
6516b62d 50
51 ClassDef(AliSample,0) // Statistics tools for various multi-dimensional data samples.
d88f97cc 52};
53#endif