next up previous contents
Next: Exploring the Data Structure Up: Defining Your Own N-tuples Previous: Accessing Permanent Data Structure   Contents

Additional Bank Parameter Types

As well as bank addresses, DQF parameters can be:-

A number of DQFs perform logical operations returning either 0. (false) or 1. (true). Literals and n-tuple variables can be used to construct complicated cuts. Here is a simple example:-

' revent           magnitude  MCVX+$KMCVX_PSX;                 '
' _is_neutron      eq  MCVX-$KMCVX_MCTKI$+KMCTK_IDP, $neutron; '
' _is_near_centre  lt  revent, 100.;                           '
' _is_wanted       or  _is_near_centre, _is_neutron : $true;   '
This works as follows:-
  1. revent records the distance of the vertex from the centre of the detector.

  2. _is_neutron is set to true (1.) if the incident particle has an id that is equal to the neutron id.

  3. _is_near_centre is set to true if revent is less than 100.

  4. _is_wanted is set true if either of the previous two variables are true. A cut is then placed on this value using the symbol $true (=1).

So the result is to keep any neutron vertex or any vertex within 100.cm of the centre. Note the use of local variable names that will be removed before storing the n-tuple.


next up previous contents
Next: Exploring the Data Structure Up: Defining Your Own N-tuples Previous: Accessing Permanent Data Structure   Contents
sno Guest Acct 2009-09-09