Next: Exploring the Data Structure
Up: Defining Your Own N-tuples
Previous: Accessing Permanent Data Structure
Contents
As well as bank addresses, DQF parameters can be:-
- Literals e.g. 123. Integers are tolerated and are converted to floating
point.
- n-tuple variable names. The name must already have been defined earlier
in the n-tuple. The value currently held by the variable is fed into the DQF.
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:-
- revent records the distance of the vertex from the centre of the detector.
- _is_neutron is set to true (1.) if the incident particle has an id that
is equal to the neutron id.
- _is_near_centre is set to true if revent is less than 100.
- _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: Exploring the Data Structure
Up: Defining Your Own N-tuples
Previous: Accessing Permanent Data Structure
Contents
sno Guest Acct
2009-09-09