CALL HBPROF (ID,CHTITL,NCX,XLOW,XUP,YMIN,YMAX,CHOPT)
Action: Create a profile histogram. Profile histograms are used to display the mean value of Y and its RMS for each bin in X. Profile histograms are in many cases an elegant replacement of two-dimensional histograms : the inter-relation of two measured quantities X and Y can always be visualized by a two-dimensional histogram or scatter-plot; its representation on the line-printer is not particularly satisfactory, except for sparse data. If Y is an unknown (but single-valued) approximate function of X, this function is displayed by a profile histogram with much better precision than by a scatter-plot.
The following formulae show the cumulated contents (capital letters)
and the values displayed by the printing or plotting routines
(small letters) of the elements for bin J
.
| |||
| |||
| |||
|
The first five parameters are similar to HBOOK1.
Only the values of Y between YMIN
and YMAX
will be considered.
To fill a profile histogram,
one must use CALL \Rind{HFILL
(ID,X,Y,1.)}.
is printed as the channel contents.
The errors displayed are
if CHOPT='S'
(spread option),
or
if CHOPT=' '
(error on mean).
Profile histograms can be filled with weights.
The computation of the errors and the text below is based on a proposal by Stephane Coutu.
If a bin has N
data points all with the same value Y
(especially
possible when dealing with integers), the spread in Y
for that bin
is zero, and the uncertainty assigned is also zero, and the bin is
ignored in making subsequent fits.
This is a problem.
If
was the correct error in the case above,
then
would be the correct error here.
In fact, any bin with non-zero number of entries N
but with zero spread
should have an uncertainty
.
Yet, is
really the correct uncertainty?
Probably it is only true in the case where the variable Y
is some sort of counting statistics, following a Poisson
distribution.
This should probably correspond to the default case.
However, Y
can be any variable
from an original Nntuple, not necessarily distributed according
to a Poisson distribution.
Therefore several settings for the option variable CHOPT
are possible to determine how errors should be calculated
(S stands for the spread in the formulae below):
Errors are | for , | |
&quad;"" | for , | |
&quad;"" | for . |
Errors are | for , | |
&quad;"" | for , | |
&quad;"" | for . |
The third case above corresponds to integer Y
values for which the
uncertainty is
, with the assumption that the probability that
Y
takes any value between
and
is uniform (the same argument goes for Y
uniformly
distributed between
and
);
this could be useful, for instance, for the case
where
are ADC measurements.