Prev Up
Go backward to Masking operator (MASKEDBY)
Go up to If...else...command (single sortword environment)

Gate-testing operator (GATEDBY)

IF...GATEDBY is true if the value or <sortword> or <expression> falls within the set of gates associated with <gate-expr>. The gate number passed is placed in the reserved variable GATE. This variable is only recognised within <statements1>.


IF <sortwordx>|(<expressionx>) GATEDBY <1D-gate-expr> ...


IF GAMTOT GATEDBY  GLIST1 {
    INC SPEC1(GAMTOT)
    INC SUMSPEC(SUMEN)
    }
ELSE  EVENTEND
where the spectra SPEC1 and SUMSPEC are incremented if sortword GAMTOT passes any of the 1D gates defined in the gate-map GLIST1. If no gates are passed then command processing is terminated for that event (EVENTEND command).


IF <sortwordx>|(<expressionx>) <sortwordy>|(<expressiony>) GATEDBY <2D-gate-expr> ...


In the 2D gate test command the gate is passed if the coordinates given by <expressionx> and <expressiony> fall within the set of 2D polygonal or elliptical gates specified in <2D-gate-expr>. The intersection of two polygons is given the gate number of the later defined gate.

In the example below if EDELTE (x-coordinate) and SUMEN (y-coordinate) pass any of the gates defined in the gate-map GREC1 then the commands within the first set of braces will be executed, otherwise if they pass any of the gates defined in GREC2 then the commands within the second set of braces will be obeyed:

IF EDELTE SUMEN GATEDBY  GREC1 {
    INC MASS1(GAMTOT)
    SELECT(GATE)
       <commands dependent upon which gate passed>
    }
ELSE {
    IF EDELTE SUMEN GATEDBY GREC2
        INC MASS2(GAMTOT)
    }

support@ns.ph.liv.ac.uk

Prev Up