[HARITHME]
Histograms can be added, subtracted, divided or multiplied, provided their
number of channels are the same.
+----------------------------------------+
| CALL HOPERA (ID1,CHOPER,ID2,ID3,C1,C2) |
+----------------------------------------+
Action: Fills an histogram I3 with values such that, logically
(operands are the bin contents)
ID3 = C1 * ID1 (OPERATION) C2 * ID2
- Input parameters:
-
- ID1,ID2
- Operand histogram identifiers.
- CHOPER
- Character variable specifying the kind of
operation to be performed (+,-,*,/) and 'E', whether
errors have to be calculated (see below).
- ID3
- Identifier of the histogram containing the
result after the operation.
- C1,C2
- Multiplicative constants.
Remark:
- ID1, ID2 and ID3 must have the same number
of channels.
- If histogram ID3 is not empty, its contents are overwritten
- The output histogram ID3 can be either one of the input
histograms ID1 or ID2.
- If histogram ID3 does not exist, it is created by HOPERA with
the same specification as for histogram ID1.
- The mean value, standard deviation, etc. are calculated from the
contents of the resulting histogram ID3, unless the
'STAT' option STAT is active and the operation is an addition or
subtraction, in which case they are computed exactly.
- A division by zero gives zero.
- Negative results for bin contents in a packed histogram are
meaningless
- The number of entries in the resulting histogram ID3 is set
to the sum of the entries in histograms ID1 and ID2.
- When an operation is performed on two 1-dimensional histograms with
the sum of the squares of the weights stored (option HBARX), the error on
the resulting histogram is calculated supposing that the contents of the
two input histograms ID1 and ID2 are uncorrelated. This
is valid also for projections, slices and bands of 2-dimensional
histograms.
- If histogram ID3 is packed the number of bits allocated per
channel (cell) has to be sufficient to store the results.
- If the parameter HOPERA
computes the error bars on the resulting histograms correctly, assuming
that the input histograms ID1 and ID2 are independent.