next up previous contents
Next: Using Cuts Up: Histogramming Functions Previous: Histogramming Functions

Pseudo N-dimensional Histograms


 
Table 5.10: List of Histogramming Functions for pseudo multidimensional Histograms.
Function Purpose

hid = pseudoNDIMhisto("create"

creates pseudo N-dim-Histogram with given
"name",dim,bins,from,to) name. The Histogarm will have dim dimensions which are mapped onto a 1-dim Histogram. The arrays bins, from and to are arrays of dimension dim and hold the number of bins, and the range of allowed values for each dimension. A reference to the Object is returned. The pseudo n-dim Histogram willl be treated like a 1-dim Hsitogram elsewhere in YODA.
pseudoNDIMhisto("fill",hid,values) increment pseudo n-dim Histogram addressed by reference hid at the position given by the array values (it must have the same dimension as given, when the pseudo n-dim Histogram was created.
pseudoNDIMhisto("fillVal",hid, The same as using "fill", but the adressed bin
values, incr) will be incremented by incr instead of 1.
value=pseudoNDIMhisto("peek",hid,bins) return the value adressed by the bins given through the array bins, i.e. bins[0] is the bin number in the first dimension and so on.
pseudoNDIMhisto("poke",hid,bins,value) Write value into the bin addresses by the array bins.
hid1d=pseudoNDIMhisto("project1dBins",  
hid,"name",i,frombin,tobin) creates a 1-dim projection on the i'th dimension of the histogram. The bin range in the other dimensions included in the projection should be given in the arrays frombin, tobin (the bins used include frombin and tobin).
. The values frombin[i] and tobin[i] are not used.  
hid1d=pseudoNDIMhisto("project1d",  
hid,"name",i,from,to) The same as "project1dBins", only that the limits used for the projections are given as a range in coordinates rather than bins.
hid2d=pseudoNDIMhisto("project2dBins",  
hid,"name",i,j,frombin,tobin) Does a 2-dimensional projection onto the dimensions given by i and j. Again the bin limits on the other dimensions is given in the arrays frombin and tobin (the bins used include frombin and tobin).
hid2d=pseudoNDIMhisto("project2d",  
hid,"name",i,j,from,to) The same as "project2dBins", only that the limits used for the projections are given as a range in coordinates rather than bins.
 

Pseudo N-dimensional histograms can be used to histogram multidimensional (N > 2) data. The data are stored in a 1-dimensional histogram (thats why they are pseudo...) and can be manipulated by the special function pseudoNDIMhisto(...) (see Tab. 5.5.1). Usually information is transeferred by N-dimensional arrays, which must be preallocated in the hoc file. The i'th index in these histograms always corresponds to the i'th dimension (i=0,1,...) in the pseudo N-dim histogram. Each dimension is characterized by a number of bins, and a range [from,to] which is covered by the bins. Note, that the total amount of storage is given by $\prod_{i=0}^{i<{\rm dim}} {\tt
bins[i]}$ and may be very large. It may even be larger than the largest histogram you will ever be able to store in HBOOK or yz format. So choose the number of bins and the number of dimensions with care.

These Object can be stored and read in YODAs native yz format. If they are stored in HBOOK format, they will be converted to simple 1-dimensional histograms and the information on the number of dimensions, bins, and ranges will be lost.


next up previous contents
Next: Using Cuts Up: Histogramming Functions Previous: Histogramming Functions
Heiko Rohdjess
2001-07-19