RW-Ntuple duplicated with selection

In this example, a RWN ntuple is duplicated and filled with a subset of the original one. The subset is: ``the people with at least 3 childrens''.

A sub-Ntuple with children >= 3

opt stat hi/file 1 rwn_aptuple.hbook 1 HI/FILE 2 RWN_APTUPLE_DUP.HBOOK ! N 2 NT/DUPL //LUN1/10 100 * application comis quit real function dup(dum) 4 INCLUDE ? 5 IF (CHILDREN.GE.3) CALL HFN(100,CATEGORY) dup=1. end Quit * 3 NT/LOOP //LUN1/10 dup hrout 100 nt/plot //lun1/10.children set hcol 1105 nt/plot //lun2/100.children option=s

  1. Create a new HBOOK file to store the ``subset-Ntuple''
  2. Duplicate the structure of the original Ntuple. The subset will be stored in this duplicated ntuple.
  3. Loop over the original Ntuple with the function ``dup''.
  4. The special COMIS statement avoid to do UWFUNC .
  5. When an event is selected, HFN is called to fill the ``subset-Ntuple''



Last update: 96/05/24 17.23
Olivier.Couet@Cern.Ch