next up previous contents index
Next: Reserve array in Up: Overview of booking Previous: Statistics

Function Representation

 

CALL HBFUN1 (ID,CHTITL,NX,XMI,XMA,FUN)

Action: Books 1-dimensional histogram and fills it with the values of the external function FUN(X) computed at the centre of each bin. One computer word per channel is used.

The first five parameters are as for HBOOK1.

Input parameters:
ID
histogram identifier, integer non zero
CHTITL
histogram title (character variable or constant up to 80 characters)
NX
number of channels
XMI
lower edge of first channel
XMA
upper edge of last channel
FUN
real function of one variable, to be declared EXTERNAL in the calling subroutine, and to be supplied by the user.

CALL HBFUN2 (ID,CHTITL,NX,XMI,XMA,NY,YMI,YMA,FUN)

Action: Books a 2-dimensional histogram and fills it with the values of the external function FUN(X,Y), computed at the centre of each bin. One computer word per channel is used.

The first eight parameters are as for HBOOK2.

Input parameters:
ID
histogram identifier, integer
CHTITL
histogram title (character variable or constant up to 80 characters)
NX
number of channels in X
XMI
lower edge of first X channel
XMA
upper edge of last X channel
NY
number of channels in Y
YMI
lower edge of first Y channel
YMA
upper edge of last Y channel
FUN
real function of two variables, to be declared EXTERNAL in the calling subroutine, and to be supplied by the user.

CALL HFUNC (ID,FUN)

Action: Samples the function FUN, which must have been declared EXTERNAL, at the centre of the bins of a histogram. The function will be superimposed onto the histogram at editing time and its values optionally printed out (see HIDOPT(ID,'PFUN')PFUN

Input parameters:
ID
identifier of an existing 1-dimensional histogram.
ID=0 signals that the function should be calculated for all existing 1-dimensional histograms.
FUN
External real function, e.g. REAL FUNCTION FUN(X).
The function parameter X will be the central value of a histogram bin. The user must return the corresponding function at that point as a value in FUN.

Remark:

χ2= ∑i=1nch {(C(i)-F(i))2j=1ni Wji2}

with:
nch number of channels of histogram
C(i) contents of channel i

F(i) value of function at centre of channel i

ni number of entries in channel i i
Wji weight of event j in channel i , i.e.
square root of contents C(i) or
as given by HBARX/HPAKE


next up previous contents index
Next: Reserve array in Up: Overview of booking Previous: Statistics

Last update: Tue May 16 09:09:27 METDST 1995