Simple selection criteria on Ntuple


Ntuple SCAN and the use of simple selection criteria

hi/file 2 rwn_aptuple.hbook hi/file 3 cwn_aptuple.hbook 4 ALIAS/CREATE DIVEP 5 alias/create NATFR 7 cd //pawc * 1 2 NT/SCAN //LUN2/10 nation=NATFR.and.division=DIVEP _ ! ! ! age service children grade nation 1 2 NT/SCAN //LUN3/11 nation='FR'.and.division='EP' _ ! ! ! age service children grade nation * hi/cr/1d 200 'Number of years at CERN' 35 0. 35. max 200 250 set ndvx 507 set htyp 235 3 NT/PL //LUN2/10.SERVICE IDH=200 5 ATITLE 'Years at CERN' 'Number of staff' set htyp 253 2 3 NT/PL //LUN3/11.SERVICE NATION='FR' OPTION=S IDH=200 set htyp 250 nt/pl //LUN3/11.Service division='EP'.and.nation='FR' OPTION=S IDH=200

  1. NT/SCAN prints in an alphanumeric way the content of an Ntuple. On the next page is given the output of this command both for RW and CW Ntuples.
  2. In the commands NT/PLOT and NT/SCAN , the second parameter is the selection criteria. Only the events satisfying this selection are taken into account. Note that with CWN character strings can be used.
  3. By default NT/PLOT fill an histogram with the indentifier IDH=1000000 . The next invocation of this command will overwrite the content of this histogram. IDH may have been created with H/CREATE . Before filling IDH , the contents of IDH are reset if IDH already exists. Note that IDH not equal to 1000000 is a convenient way to force user binning. This is used here. We'll see later another way to fill an histogram with data read in an Ntuple.

    Note also:

  4. The aliases allow to define shortcut abbreviations. The aliases are known globally e.g. in all macros and in command mode.
  5. ATITLE allows to define the title on the axis.


NT/SCAN output for a Row Wise Ntuple

+-------+-------------+-------------+-------------+-------------+-------------+ | ENTRY | AGE | SERVICE | CHILDREN | GRADE | NATION | +-------+-------------+-------------+-------------+-------------+-------------+ | 48 | 56.000 | 34.000 | .00000E+00| 7.0000 | 7.0000 | | 194 | 62.000 | 27.000 | .00000E+00| 7.0000 | 7.0000 | | 213 | 56.000 | 26.000 | .00000E+00| 6.0000 | 7.0000 | | 214 | 45.000 | 26.000 | .00000E+00| 6.0000 | 7.0000 | | 216 | 56.000 | 19.000 | .00000E+00| 5.0000 | 7.0000 | | 266 | 63.000 | 26.000 | .00000E+00| 13.000 | 7.0000 | | 267 | 59.000 | 32.000 | .00000E+00| 13.000 | 7.0000 | | 273 | 55.000 | 26.000 | 1.0000 | 12.000 | 7.0000 | | 275 | 53.000 | 26.000 | 1.0000 | 11.000 | 7.0000 | | 279 | 51.000 | 30.000 | .00000E+00| 6.0000 | 7.0000 | | 315 | 56.000 | 25.000 | .00000E+00| 8.0000 | 7.0000 | | 318 | 64.000 | 26.000 | .00000E+00| 6.0000 | 7.0000 | | 320 | 49.000 | 26.000 | .00000E+00| 6.0000 | 7.0000 | | 327 | 59.000 | 19.000 | .00000E+00| 5.0000 | 7.0000 | | 328 | 51.000 | 25.000 | .00000E+00| 5.0000 | 7.0000 | +-------+-------------+-------------+-------------+-------------+-------------+ More...? ( /N/G ) n ==> 15 events have been scanned

NT/SCAN output for a Column Wise Ntuple

+-------+-------------+-------------+-------------+-------------+-------------+ | ENTRY | AGE | SERVICE | CHILDREN | GRADE | NATION | +-------+-------------+-------------+-------------+-------------+-------------+ | 48 | 56 | 34 | 0 | 7 | FR | | 194 | 62 | 27 | 0 | 7 | FR | | 213 | 56 | 26 | 0 | 6 | FR | | 214 | 45 | 26 | 0 | 6 | FR | | 216 | 56 | 19 | 0 | 5 | FR | | 266 | 63 | 26 | 0 | 13 | FR | | 267 | 59 | 32 | 0 | 13 | FR | | 273 | 55 | 26 | 1 | 12 | FR | | 275 | 53 | 26 | 1 | 11 | FR | | 279 | 51 | 30 | 0 | 6 | FR | | 315 | 56 | 25 | 0 | 8 | FR | | 318 | 64 | 26 | 0 | 6 | FR | | 320 | 49 | 26 | 0 | 6 | FR | | 327 | 59 | 19 | 0 | 5 | FR | | 328 | 51 | 25 | 0 | 5 | FR | +-------+-------------+-------------+-------------+-------------+-------------+ More...? ( /N/G ) n ==> 15 events have been scanned

PAW TutorialLast update: 1999/04/01 14.59
Olivier.Couet@Cern.Ch