XFT Monitoring

How to run xft monitoring?


Three easy steps:

1. Check out and compile the XFTSim package.
source ~cdfsoft/cdf2.cshrc (if not in .login file already)
setup cdfsoft2 3.18.0int2 (or more recent release)
newrel -t 3.18.0int2 i2
cd i2
addpkg XFTSim
gmake XFTSim.lib
gmake XFTSim.tbin

Note that AC++ takes a long time to compile. You might want to type the last two commands and then go to lunch. Or check out a new release last thing and leave it to compile overnight.

2. Setup the batch queue system
setup lsf

Useful commands are:
bjobs shows the status of your jobs
bqueues shows how full the queues are
bkill jobNumber
bsub -q queueName myfirst.job

3A. Use this script, XFTSim/man/sub_xftmon_hex, for recent stream A data in look area.
Edit the scripts to make HOME and SCRATCH point to your own directories
findfile 119632 will display the hexadecimal run number and any files in the look area.
sub_xftmon_hex ar01d350 will analyse the first sixteen stream A files of this run if they exist in the look area.

3B. Use this script, XFTSim/man/sub_xftmon_dec, for stream A data on disk or tape.
Edit the scripts to make HOME and SCRATCH point to your own directories
sub_xftmon_dec 119632 will analyse all the stream A events in this run, if the data-handling system can find them.


What does the output mean?



The output file will appear in the $SCRATCH area with a name like 119632XFTTrigger_Summary.txt. There are three kinds of error:

Finder errors: the track segments on the finder, from the XFFD bank ,are compared with those expected from an emulation of XFT, which starts from the XTC hits in the XFFD bank. There are three lines of output per error, the suffix S is for simulation, R is for real and D is for discrepancy. In the example below, the TDC in crate b0cot16, slot 8B sends data to the finder chip in crate b0xft04, slot 16, chip 2A, cell 0. There are 16 data bits: 12 track segment bits, a beam zero marker bit (B), a word zero marker bit (W) and an error bit (E). Discrepancies in the track segment bits are noted with a L for lost bit or a X for extra bit. You can see that bits 0-2 are expected by the emulation but missed in the data. Note that the error bit is also set.

119632/22398 COSEB-1 b0cot16 8 B b0xft04 16 2A 0 0000 0000 0000 0111 S
119632/22398 COSEB-1 b0cot16 8 B b0xft04 16 2A 0 0110 0000 0000 0000 R
119632/22398 COSEB-1 b0cot16 8 B b0xft04 16 2A 0 EWB LLL D

Finder to Linker connector errors: the track segments on the finder, from the XFFD bank, are compared with those that arrive at the relevant linker, from the XFLD bank. Again, there are three lines of output per error. In the example below, the linker in crate b0xft03, slot 6, input formatter chip 4, RAM block 0, word 1, cell 3 receives data from finder chip 1a' (finder chip 1A on neighbour finder in b0xft02 slot 6). The 12 track segment bits are shown. You can see that bit 4 is set at the finder, but not at the linker.

119632/133196 b0xft03 6 INPUT FORMATTER 4 RAM 0 WORD 1 FINDER CHIP 1A' CELL 3 0000 1111 1110 F
119632/133196 b0xft03 6 INPUT FORMATTER 4 RAM 0 WORD 1 FINDER CHIP 1A' CELL 3 0000 1110 1110 L
119632/133196 b0xft03 6 INPUT FORMATTER 4 RAM 0 WORD 1 FINDER CHIP 1A' CELL 3 L D

Linker errors: the tracks on the linker, from the XFLD bank, are compared with those expected from an emulation of the XFT, which starts from the track segments in the XFLD bank. Again, there are 3 lines of output per error. In the example below, there is an error on the linker in crate b0xft03, slot 6, chip 6. From left to right, there are 7 pT bits, 3 phi bits, a 4-layer track found bit and a 3-layer track found bit. You can see that the simulation expects the pt bin to be 0x29, while the linker actually finds 0x27. The other bits agree between simulation and data.

119632/493991 b0xft03 6 LINKER CHIP 6 0101001 000 1 0 S
119632/493991 b0xft03 6 LINKER CHIP 6 0100111 000 1 0 R
119632/493991 b0xft03 6 LINKER CHIP 6 LXX D