June 24, 1988
Example:
If Ntuple ID=30 has variable names [X,Y,Z,ETOT,EMISS,etc] then NTUPLE/UWFUNC 30 SELECT.FOR will generate the file SELECT.FOR with:
FUNCTION SELECT(XDUMMY)
COMMON/PAWIDN/IDNEVT,X,Y,Z,ETOT,EMISS,etc
*
SELECT=1.
END
Then using the command EDIT one can modify this file which could then
look something like: IDNEVT is the event number.
FUNCTION SELECT(XDUMMY)
COMMON/PAWIDN/IDNEVT,X,Y,Z,ETOT,EMISS,etc
*
IF(X**2+Y**2.GT.Z**2.OR.ETOT.GT.20.)THEN
SELECT=1.
ELSE
SELECT=0.
ENDIF
END
NTUPLE/PLOT 30.X SELECT.FOR
will process the 10000 events of the Ntuple IDN=30. For each event,
the function SELECT is called. It returns the weight of the event.
FUNCTION SELECT(X)
DIMENSION X(3)
IF(X(1)**1+X(2)**2.LT.1.5)THEN
SELECT=0.
ELSE
SELECT=1.
ENDIF
END
The file SELECT.FOR (Vax) or SELECT.FTN (Apollo) or
SELECT FORTRAN (IBM) can be edited from PAW using the command EDIT.
Results of a selection can be saved in a MASK (See NTUPLE/MASK). Ex: NT/PLOT 30.X Z<0.4>>Mname(4) means mark bit 4 in mask Mname for all events satisfying the condition Z<0.4
A MASK may also be given as input to a selection expression. Ex: NT/PLOT 30.X Mname(4).and.Z<0.4 means all events satisfying bit 4 of Mname AND Z<0.4
We are working on new facilities to be released by end of July. It will be possible to plot expressions of the original variables. Analytic expressions including Fortran arithmetic will be supported. Ex: NT/PLOT 30.SIN(X)%SQRT(Y**2+Z**2) Z<0.4 plots a scatter-plot of variable U versus V for all events satisfying the condition Z<0.4. U and V are U=SIN(X) and V=SQRT(X**2+Y**2)
NT/PLOT 30.X Z<0.4.and.SELECT.FTN>>Mname(6)
then for all events in Ntuple 30 satisfying the above condition
the bit 6 in the corresponding mask words will be set. One can then use
the mask as selection mechanism. Example:
NT/PLOT 30.X Mname(6)
will produce the same results than the first NT/PLOT command but
will be much faster if only a small fraction of all the events
is selected.
MASKS are automatically saved across PAW sessions.
CHOPT=' ' existing mask on file MNAME.MASK is attached for READ only.
CHOPT='U' existing mask on file MNAME.MASK is attached for UPDATE.
CHOPT='N' a new mask on file MNAME.MASK is created for NUMBER events.
CHOPT='P' the comments for all active bits is printed.
CHOPT='C' mask is closed.
CHOPT='R' Reset bit number NUMBER.If NUMBER=99, resets all bits.
Example:
MASK Test N 10000
creates a new mask on file Test.mask with enough words to
process a Ntuple with 10000 events
MASK Test UP
opens an existing mask for update
+prints the active selection bits with explanation
CSELECT CHOPT CSIZE
The selection mechanism will be written as a comment on the picture.
If option N is given, then all subsequent NTUPLE/PLOT commands
will print the selection mechanism with the options specified in CHOPT.
By default, the comment is drawn Left justified Above the top zone line.
The options are :
'R' comment is right adjusted to the current zone
'C' comment is centred to the current zone
'B' comment is drawn below the top zone line
'M' masks invoked in the comment are also developed
Ex:
CSEL All coming NT/PLOT commands will draw a comment
of size CSIZE=0.28cm Left justified.
CSEL NRB 0.4 All coming NT/PLOT commands will draw a comment
of size 0.4 cm Right justified Below the top line.
CSEL CB Draw previous selection mechanism Centred Below
the top zone line.
When typing NTUPLE/PLOT 30.1 (variable number) then the low and high edges are the minimum and maximum values of variable 1 in the ntuple.
When typing NTUPLE/PLOT 30.X (variable name) then the limits are automatically computed at filling time.
![]() | Release Notes | Known bugs | FAQs | Contributions | Tutorial | Reference manual | Down load | Miscellaneous |