Mean value and standard deviation of 1-dimensional histograms
are calculated at editing time, using the channel contents.
If a more accurate calculation is desired, or if more
statistical information is needed, the
following option will provide it :
CALL HIDOPT (ID,'STAT')
STAT
Action: Store the errors for 1-dimensional histograms, X-projections, etc., in memory and superimpose them on the plot during output. This routine must be called after booking but before filling.
ID=0
means all histograms already booked.
If ID
corresponds to a 2-dimensional histogram,
HBARX acts on all X projections, slices, bands.
where :
bin number | |
number of entries in bin
| |
weight of event
in bin
|
It is clear that the sum of the squares of weights in each
bin must also be stored to perform this calculation. However
when filling with weight always equal to 1, errors can be
calculated from bin contents only, and HBARX, HBARY
need not be called.
The superimposition of error bars can be selected at output time, using
HIDOPT(ID,'ERRO')
ERRO
In both cases the values of errors can be printed under the contents,
via the editing option HIDOPT(ID,'PERR')
PERR
The entry HPAKE permits user-defined error bar setting.
Action: As HBARX, it is used to act on Y projections of 2-dimensional histograms.
Action: This routine can be used to create the data structure to store errors for 2-D histograms (like HBARX for 1-Ds). By default, the errors are set to the sqrt(contents).
ID=0
means all histograms already booked.
The routine HPAKE (or the PAW command PUT/ERRHBAR2 is not called before HPAKE, then HPAKE invokes HBAR2 automatically. When HBAR2 is called, routines HFILL or HF2 will accumulate the sum of the squares of the weights. The errors for 2-D histograms are used by the fit routines or the Histo/FIT