0) lastDSM masks

Under:

In order to accommodate the larger number of desired triggers in the old TCU, the following algorithms can now read in masks to be checked against the 128 lastDSM input bits before decision() is called:

L2btowGamma

L2etowGamma

L2jet

L2jetHigh

L2upsilon

L2btowW

 

The masks are located in ~developer/emc_setup on the l2 machine, and must be named %s.lastDSM_mask , where %s is the name of the algorithm (subtract the 'L2' from the list above).  These files contain 8 integersthat correspond to the 8 unsigned shorts in lastDSM[] in the trigger data.

If TCU_type!=2 we are assumed to be using the old TCU, and at the start of each run the code that initializes each l2 algorithm will attempt to read these files.  If they can't be found, then the mask is assumed to be not used for that particular algorithm.

Each time decision() is about to be called for one of the above algorithms, we first pass in the lastDSM array to be checked against these 8 unsigned shorts.  Each ushort in the array is byte-swapped so that the endian-ness of the two sets agrees.  Note that lastDSM[0] does not seem to correspond to input channel 0 in Eleanor's LD301 documentation.

At latest look (Feb 27), the values in the array seem to be swapped in the same fashion as they are in the barrel code that looks at layer 2 of the DSM:

lastDSM[0] corresponds to input channel 3

lastDSM[1] corresponds to input channel 2

lastDSM[2] corresponds to input channel 1

lastDSM[3] corresponds to input channel 0

lastDSM[4] corresponds to input channel 7

lastDSM[5] corresponds to input channel 6

lastDSM[6] corresponds to input channel 5

lastDSM[7] corresponds to input channel 4