In the following example of a test block,
fptheta, fpphi, mass, and the array njunk are
event data that are computed each event by the analyzer. The variables
thmin, thmax, phimin, and phimax are
parameters that are set in the previous example.
begin test hms
goodthe = (fptheta > thmin)&&(fptheta < thmax)
goodphi = (fpphi > phimin)&&(fpphi < phimax)
goodphase = goodthe && goodphi
; Acceptable phase space of particle
electron = mass < 10
; Must be an electron
clean(1) = njunk(1) < 2
; Less than 2 junk hits per plane
clean(2) = njunk(2) < 2
clean(3) = njunk(3) < 2
clean(4) = njunk(4) < 2
clean(5) = njunk(5) < 2
clean(6) = njunk(6) < 2
allclean = clean(1)&&clean(2)&&clean(3)
&&clean(4)&&clean(5)&&clean(6)
goodparticle = goodphase&&electron&&allclean
missingmass = ebeam - e1 - e2
end test
The expressions on the right hand side use any combination of a set unary
and binary operators similar to the standard C operators. These operators
are shown in
Table 6.1.
() |
Fortran Array element reference |
[] |
C Array element reference |
- |
Unary Minus |
! |
Logical Negation |
~ |
Ones Complement |
* |
Multiplication |
/ |
Division |
// |
Division, result integerized |
% |
Modulus |
+ |
Addition |
- |
Subtraction |
<< |
Left Shift |
>> |
Right Shift |
< |
Less than |
<= |
Less than or equal to |
> |
Greater than |
>= |
Greater than or equal |
== |
Equal to |
!= |
Not equal to |
& |
Bitwise AND |
^ |
Bitwise XOR |
| |
Bitwise OR |
&& |
Logical AND |
^^ |
Logical XOR |
|| |
Logical OR |
= |
Assignment operator |
, |
C Comma operator |