I have an application in which I need to get statistics information like
mean and rms from the individual dimensions of a 2-D histogram. The
accessors GetMean() and GetRMS() give me these numbers for the
x-dimension, but for y (or z) I couldn't find a way on how to do this.
For the moment I compute mean and rms from the bin-contents, but I would
prefer to have these computed at filling time, because computing from
bin-contents is only an approximation.
So, I would like to propose that the functions GetMean() and GetRMS() are
extended to take an argument to specify the dimension for which the
quantities should be computed:
stat_t GetMean( dim= 1 )
stat_t GetRMS( dim= 1 )
In addition, a new accessor function which returns the covariance between
two dimensions would be very useful:
stat_t GetCov( dim1= 1, dim2= 2 )
Their implementation should be trivial, fully backwards compatible and
very efficient, since we already have the weighted sums fTsumwx, fTsumwy,
fTsumwx2, fTsumwy2 and fTsumwxy as data members of TH1 and TH2.
How about it?
cheers, Stefan
---Stefan Kluth---------------Lynen Fellow----------------|\--|\-------
- LBNL, MS 50A 2160 - phone: +1 510 495 2376 - |/ |/ -
- 1 Cyclotron Rd. - fax: +1 510 495 2957 - |\/\|\/\|' -
---Berkeley, CA94720, USA-----e-mail: SKluth@lbl.gov------|/\/|/\/|----