Sets of gates may be defined here for later use in the commands section through which to filter the event-by-event data. If a data word being tested matches a particular gate condition it is said to pass that particular gate.
Bitmask, 1D and 2D gates are stored as 8-bit lookup maps. Elliptical gates are stored as lists of coordinates and axes. When a sortword value is tested against a gate in the commands section it will pass either zero or one of the gates in the map. The gate number passed will be stored in the reserved variable GATE
A set of bitmask gates consists of one bit pattern per gate. Within a set of gates earlier gate definitions have precedence over later ones. This means that in the commands section if the same value would pass more than one gate out of a set then the earliest gate defined would be the one passed.
Each data item consists of a 16-bit mask and represents one gate. A value will pass a gate if all the bits set in the 16-bit value are also set in the 16-bit mask of that gate.
Within the commands section a value will pass a gate if it falls in between the lower and upper limits (inclusive) of that gate.
A 1D gate-map consists of one or more pairs of values. The range of values in between each pair (inclusive) defines a single gate. Within a set of gates successive gates in a 1D set have precedence over earlier ones. This means that in the commands section if a value would pass more than one gate out of a set then the latest such gate defined would be the one passed.
Example
GATES 1D BAND1[0:511] (123 126) (245 259) (257 270)
defines a set of 1D gates BAND1 within the limits 0 to 511 inclusive which contains 3 gate definitions:
gate 1 is defined as channels 123, 124, 125, 126; gate 2 as channels 245, 246, 247,..., 254, 255, 256; and gate 3 as channels 257, 258, 259, 260,..., 268, 269, 270 because gate 3 overlaps gate 2.
A 2D gate-map consists of one or more sets of x--y coordinate pairs. Each set defines a polygonal-shaped gate in two dimensions against which pairs of values may be tested in the commands section. If any polygons overlap within a set successive gates have precedence over earlier ones.
Example
GATES 2D MASSMAP[64,64] (11 44 13 36 18 30 25 29 28 35 30 49 26 60 20 58) (31 62 29 1 52 1 51 62)
Defines the map MASSMAP with limits 0 to 63 in both the x- and y- directions. A coordinate pair will pass a polygonal gate if the point it defines falls within the polygonal shape defined by that gate.
1. The coordinate pairs are not individually separated to simplify the syntax, hence care must be taken when inputting the data.
2. 2D gatemaps become large for large values of x-range and y-range.
Elliptical gates may be specified in 2 or 3 dimensions. They are defined by specifying the coordinates and axes of each ellipse or ellipsoid making up the list of gates.
Each set of coordinates and radii defines an elliptical gate against which pairs of values may be tested in the commands section. If any gates overlap within a set earlier gates have precedence over later ones. See IF...GATEDBY and LOOPIF...GATEDBY commands.
Each set of coordinates and radii defines an ellipsoidal gate against which 3 values may be tested at a time in the commands section.