Re: Histogram classes in root

From: Pasha Murat (630)840-8237@169G ((630)840-8237@169G)
Date: Tue Feb 15 2000 - 00:19:40 MET


hi -  I think there is nothing wrong with using different tools for different 
purposes. I guess that the word "histogram" is semantically reserved for 1- or 
2-dimensional things. One can use histograms to store the data he is going to 
display in different colors, overlay on top of the other histograms etc. 
A 4-dimensional histogram is already smth very different - it is not so clear to 
me, for example, how to draw it. One can use multidimensional grids (not histograms !) 
to store the parametrizations of the detector acceptance in multiparameter space. 
BTW, didn't you consider storing your parametrizations in a tree with knot number 
being an "entry number" in a tree? - I can assure that it works absolutely fantastic! 

							best, pasha
Alexander Zvyagin wrote:
> 
> Dear ROOTers
> 
> I absolutly agree with Vincent Colin de Verdiere about
> his remarks concerning TH* methods.
> (See http://root.cern.ch/root/roottalk/roottalk00/0375.html)
> TH* classes have not very good design.
> Implementation of these classes breaks some OO concepts.
> 
> Just a simple example. In our real we have 1-dim,2-dim,....N-dim
> histograms.
> N-dim histogram is one of our abstractions for data representations.
> ROOT support only 1,2,3 dimensions. Is it difficult to support N-dim histo
> in current ROOT version? YES. Take a look at source code for more
> information.
> But is there BIG difference (from OO point of view) among all these
> histograms? NO!
> 
> In my project I had to make experimental setup acceptance calculations.
> The acceptance space had >3 dimensions. ROOT is good framework, TH*
> classes
> are strong, have many powerful methods. But I could not store in ROOT file
> >3 dim histogram! This was big disadvantage. Finaly I solved the problem.
> I wrote N-dim histogram class that can be stored in ROOT file.
> My class has method CreateRootHistogram() so I have access to ROOT TH*
> properties. If you are interested take a look at
> http://gams.ihep.su/~zvyagin/Histogram/
> and compile an example under *NIX:
> $ g++ -o h -I $ROOTSYS/include h.c `root-config --libs`
> $ ./h
> (This is NOT final solution. The class may be GREATLY improved.)
> 
> I belive that ROOT histograms classes should be redesigned. For backward
> compatibility it is needed to support TH* classes, but a new histograms
> design must be started. There were many remarks and questions about TH*
> classes in roottalk.
> 
> Any comments?
> Thanks,
> Alexander Zvaygin.



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:19 MET