June 24, 1988

PAW version 1.03/02

This new version of PAW includes some important enhancements in the area of Ntuples.

A- A new command NTUPLE/UWFUNC has been introduced.

UWFUNC generates automatically the Fortran skeleton of a selection function.

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

B- New selection mechanisms are available in the commands NTUPLE/PLOT, PROJECT

The selection parameter UWFUNC may have the following forms:
  1. UWFUNC='0' or missing (only IDN given). No selection is applied.
  2. UWFUNC is a CUT or combination of valid CUTS created by the command NTUPLE/CUTS. Ex: UWFUNC=1 means use cut number 1 UWFUNC=1.AND.2 UWFUNC=.NOT.(1.AND.2) UWFUNC=(1.OR.2).AND.3
  3. UWFUNC is a FORTRAN expression Ex: X>3.14.AND.Y UWFUNC is a variable name or an arithmetic expression Ex: NT/PLOT 30.X Y weight of each event is variable Y
  4. UWFUNC is the name of a selection function in a text file with the name UWFUNC.FTN, UWFUNC.FOR, UWFUNC FORTRAN (Apollo,Vax,IBM). For example if IDN=30 is an Ntuple with 3 variables per event and 10000 events, then
             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)

C- Results of a selection can be saved into a "MASK".

See new command NTUPLE/MASK MNAME CHOPT NUMBER. A mask is in fact a direct-access file with the name MNAME.MASK. A mask must contains as many 32 bit words as there are events in the associated Ntuple(s). Masks are interesting when only a few events of a Ntuple are selected with a time consuming selection algorithm. For example if the command
        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

D- A new command NTUPLE/CSELECT has been introduced.

       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.

E- In the command NTUPLE/PLOT the way the binning for resulting histogram with ID=1000000 has been changed.

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.

F- The command NTUPLE/CUTS has been improved when option 'G' is given.

Using the mouse, it is now possible to define a cut as an area delimited by a maximum of 20 points.

Others

A few bugs have also been corrected and more protections introduced
Release NotesKnown bugsFAQsContributionsTutorialReference manualDown loadMiscellaneous

Paw.Support@cern.ch