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
+,-,*,/);'B' compute binomial errors;'E' compute error bars on the resulting
histograms correctly, assuming that the
input histograms ID1 and ID2 are independent./BE will generate binomial errors for the
division of ID1 by ID2.
Remark:
ID1, ID2 and ID3
must have the same number of channels.
ID3 is not empty, its contents are overwritten
ID3 can be either one of the input
histograms ID1 or ID2.
ID3 does not exist, it is created
by HOPERA with the same specification as for histogram ID1.
ID3,
unless the 'STAT' optionSTAT is active and the
operation is an addition or subtraction, in which case
they are computed exactly.
ID3 is set
to the sum of the entries in histograms ID1 and ID2.
ID1 and
ID2 are uncorrelated.
This is valid also for projections, slices and
bands of 2-dimensional histograms.
ID3 is packed the
number of bits allocated per channel (cell) has to be sufficient
to store the results.