CALL HPROJ1 (ID,IDN,ISEL,FUN,IFROM,ITO,IVARX)
Action: Fill an existing one-dimensional histogram with data from a RWN.
IFROM
and
ITO
are histogrammed with a weight of one.
FUN
is called for each event
between IFROM
and ITP
, which are histogrammed
with as weight the value of FUN
. of one.
EXTERNAL
in the calling
routine.
It has as parameters the array of variables X
and the
selection flag ISEL
. If FUN=0.
,
no filling takes place for that event.
Example of the use of a one-dimensional Ntuple projection
PROGRAM MAIN EXTERNAL WFUNC CALL HPROJ1(10,20,1,WFUNC,0,0,4) ..... FUNCTION WFUNC(X,ISEL) DIMENSION X(*) WFUNC=0. IF(ISEL.EQ.1)THEN IF(X(2)**2 +X(3)**2.LT.0.)WFUNC=1. ELSEIF(ISEL.EQ.2)THEN IF(X(2)**2 +X(3)**2.GT.5.)WFUNC=1. ELSE WFUNC=X(5) ENDIF END
Note that in an interactive session with PAW,
the user function FUN
can be defined
interactively using a Fortran-like syntax without recompilation
and relinking.
CALL HPROJ2 (ID,IDN,ISEL,FUN,IFROM,ITO,IVARX,IVARY)
Action:
Same action as HPROJ1, but filling a previously
booked 2-dimensional histogram or a profile histogram.
Variable X(IVARX)
will be projected onto the X
axis and
X(IVARY)
onto the Y
axis for all entries in the Ntuple
between IFROM
and ITO
inclusive.
The number of entries in an Ntuple can be obtained by HNOENT.