C ======================================================================= C CAMAC LIST MUONS and MONOPOLE C OF I AND II SUPERMODULES 01-JUN-1995 C ======================================================================= rdtrig 1,2,3,1,1 evsca 1,2,20,3,0 trmvax 16,3 trmvax 15,5 def_setveto 1,2,2,2,25 def_resveto 1,2,2,2,10 C ************* I N I T *************** init c Generates dataway Z in the branch 1 crate 1,2,6 t 1,1,28,8,26 t 1,2,28,8,26 t 1,6,28,8,26 c Generates dataway Z in the branch 2 t 2,1,28,8,26 t 2,2,28,8,26 t 2,3,28,8,26 t 2,5,28,8,26 t 2,6,28,8,26 t 2,7,28,8,26 c Generates dataway Z in the branch 3 crate 1,3,4,5,6 t 3,1,28,8,26 t 3,3,28,8,26 t 3,4,28,8,26 t 3,5,28,8,26 t 3,6,28,8,26 c Remove dataway I in branch 0 crate 0 and in branch 1 crate 1,2,3,4,5 t 1,1,30,9,24 t 1,2,30,9,24 t 1,6,30,9,24 t 2,1,30,9,24 T 2,2,30,9,24 T 2,3,30,9,24 t 2,5,30,9,24 t 2,6,30,9,24 t 2,7,30,9,24 c Remove dataway I in branch 3 crate 1,3,4,5,6 t 3,1,30,9,24 t 3,3,30,9,24 t 3,4,30,9,24 t 3,5,30,9,24 t 3,6,30,9,24 c C INIT PHILLIPS LATCH-DISCR c T 1,2,3,0,26 c F 1,2,3,0,16,$FFFF c F 1,2,3,0,17,400 c T 1,2,3,1,17,0 C CONFIGURE CAEN I/O REG for alarms T 1,2,5,0,9 F 1,2,5,15,17,6 F 1,2,5,14,17,6 F 1,2,5,13,17,6 F 1,2,5,12,17,6 F 1,2,5,11,17,6 F 1,2,5,10,17,6 F 1,2,5,9,17,6 F 1,2,5,8,17,6 F 1,2,5,7,17,6 F 1,2,5,6,17,15 F 1,2,5,5,17,15 F 1,2,5,4,17,15 F 1,2,5,3,17,15 F 1,2,5,2,17,15 F 1,2,5,1,17,15 F 1,2,5,0,17,15 c load LAM input mask bit 0-6 f 1,2,5,2,16,$003F c enable LAM f 1,2,5,0,26 C CONFIGURE CAEN I/O REG services T 1,2,4,0,9 F 1,2,4,15,17,6 F 1,2,4,14,17,6 F 1,2,4,13,17,6 F 1,2,4,12,17,6 F 1,2,4,11,17,6 F 1,2,4,10,17,6 F 1,2,4,9,17,6 F 1,2,4,8,17,6 F 1,2,4,7,17,6 F 1,2,4,6,17,15 F 1,2,4,5,17,15 F 1,2,4,4,17,15 F 1,2,4,3,17,15 F 1,2,4,2,17,15 F 1,2,4,1,17,15 F 1,2,4,0,17,15 c load lam input mask f 1,2,4,2,16,$FFFF c gives a short pulse on ch 15-14-13-12-11-10-9 (to do some hardware resets) f 1,2,4,0,16,$FE00 f 1,2,4,0,16,0 c set and reset veto (to give a reset to the electronics) t 1,2,2,2,25 t 1,2,2,2,10 c set veto again t 1,2,2,2,25 c configure CAEN I/O as 16 input channels (streamer tube trigger latch) c reset T 3,5,1,0,9 f 3,5,1,15,17,15 f 3,5,1,14,17,15 f 3,5,1,13,17,15 f 3,5,1,12,17,15 f 3,5,1,11,17,15 f 3,5,1,10,17,15 f 3,5,1,9,17,15 f 3,5,1,8,17,15 f 3,5,1,7,17,15 f 3,5,1,6,17,15 f 3,5,1,5,17,15 f 3,5,1,4,17,15 f 3,5,1,3,17,15 f 3,5,1,2,17,15 f 3,5,1,1,17,15 f 3,5,1,0,17,15 c load lam input mask f 3,5,1,2,16,$FFFF c configure CAEN I/O as 16 input channels (streamer monopole trigger latch) c reset T 3,1,1,0,9 f 3,1,1,15,17,15 f 3,1,1,14,17,15 f 3,1,1,13,17,15 f 3,1,1,12,17,15 f 3,1,1,11,17,15 f 3,1,1,10,17,15 f 3,1,1,9,17,15 f 3,1,1,8,17,15 f 3,1,1,7,17,15 f 3,1,1,6,17,15 f 3,1,1,5,17,15 f 3,1,1,4,17,15 f 3,1,1,3,17,15 f 3,1,1,2,17,15 f 3,1,1,1,17,15 f 3,1,1,0,17,15 c load LAM input mask f 3,1,1,2,16,$FFFF c c Operations STAS # 0-5 I module, # 6-11 II module, # 12-13 tappo I SUPERM c clear stas in b=1 c=3 t 3,3,1,0,9 t 3,3,2,0,9 t 3,3,3,0,9 t 3,3,4,0,9 t 3,3,5,0,9 t 3,3,6,0,9 t 3,3,7,0,9 t 3,3,8,0,9 t 3,3,9,0,9 t 3,3,10,0,9 t 3,3,11,0,9 t 3,3,12,0,9 t 3,3,13,0,9 t 3,3,14,0,9 c set the readout pattern to 0 for every chain WR_DIFF_A 3,3,1,0,18,0,8 WR_DIFF_A 3,3,2,0,18,0,8 WR_DIFF_A 3,3,3,0,18,0,8 WR_DIFF_A 3,3,4,0,18,0,8 WR_DIFF_A 3,3,5,0,18,0,8 WR_DIFF_A 3,3,6,0,18,0,8 WR_DIFF_A 3,3,7,0,18,0,8 WR_DIFF_A 3,3,8,0,18,0,8 WR_DIFF_A 3,3,9,0,18,0,8 WR_DIFF_A 3,3,10,0,18,0,8 WR_DIFF_A 3,3,11,0,18,0,8 WR_DIFF_A 3,3,12,0,18,0,8 WR_DIFF_A 3,3,13,0,18,0,8 WR_DIFF_A 3,3,14,0,18,0,8 c c Operations STAS # 0-5 I module, # 6-11 II module, II S.M. c clear stas in b=1 c=4 t 3,4,1,0,9 t 3,4,2,0,9 t 3,4,3,0,9 t 3,4,4,0,9 t 3,4,5,0,9 t 3,4,6,0,9 t 3,4,7,0,9 t 3,4,8,0,9 t 3,4,9,0,9 t 3,4,10,0,9 t 3,4,11,0,9 t 3,4,12,0,9 c set the readout pattern to 0 for every chain WR_DIFF_A 3,4,1,0,18,0,8 WR_DIFF_A 3,4,2,0,18,0,8 WR_DIFF_A 3,4,3,0,18,0,8 WR_DIFF_A 3,4,4,0,18,0,8 WR_DIFF_A 3,4,5,0,18,0,8 WR_DIFF_A 3,4,6,0,18,0,8 WR_DIFF_A 3,4,7,0,18,0,8 WR_DIFF_A 3,4,8,0,18,0,8 WR_DIFF_A 3,4,9,0,18,0,8 WR_DIFF_A 3,4,10,0,18,0,8 WR_DIFF_A 3,4,11,0,18,0,8 WR_DIFF_A 3,4,12,0,18,0,8 c c c Operations STAS for ATTICO: B,C 3,4 N=15,16,17,18,19,20 c clear stas t 3,4,15,0,9 t 3,4,16,0,9 T 3,4,17,0,9 T 3,4,18,0,9 T 3,4,19,0,9 T 3,4,20,0,9 c set: readout pattern = 3 for strip and 1 for wire, chain lenght, enable acq c il nsk e' assegnato in uita di 32 bits come lo stas richiede c SLOW FAST c ch length c (51) 12sk (12*256) + 8192 = 11264 HORIZ. wire F&S c (82) 20sk (20*256) + 8192 = 13312 LATERAL wire F&S c 5sk ( 5*256) + 8192 = 9472 strip FAST HORIZ c 5sk ( 5*256) + 8192 = 9472 strip FAST VERT c 5sk ( 5*256) + 8192 = 9472 quartet strip F HORIZ C c (51) 12sk (12*256) + 8192 = 11264 HORIZ. wire F&S c (82) 20sk (20*256) + 8192 = 13312 LATERAL wire F&S c 21sk (21*256) + 8192 = 13568 strip slow HORIZ c 24sk (24*256) + 8192 = 14336 strip SLOW VERT c 20sk (20*256) + 8192 = 13312 quartet strip S HORIZ c c scrive negli stas la status word=0 (con F=18) ripetuta 8 volte a partire da c BCNA= 3,4,1,0 c WR_DIFF_A 3,4,15,0,18,0,8 WR_DIFF_A 3,4,16,0,18,0,8 WR_DIFF_A 3,4,17,0,18,0,8 WR_DIFF_A 3,4,18,0,18,0,8 WR_DIFF_A 3,4,19,0,18,0,8 WR_DIFF_A 3,4,20,0,18,0,8 c c vengono accesi i canali desiderati negli stas c f 3,4,15,0,18,11264 f 3,4,15,1,18,11264 f 3,4,15,2,18,11264 f 3,4,15,3,18,11264 f 3,4,15,4,18,11264 f 3,4,15,5,18,11264 f 3,4,15,6,18,11264 f 3,4,15,7,18,11265 c last stas channel cluster size=1 c setting completed for stas 1 (wire fast) A1-2 H1-4 C f 3,4,16,0,18,11264 f 3,4,16,1,18,11264 f 3,4,16,2,18,11264 f 3,4,16,3,18,11264 f 3,4,16,4,18,11264 f 3,4,16,5,18,11264 f 3,4,16,6,18,11264 f 3,4,16,7,18,11267 c last stas channel cluster size=2 C setting completed for stas 2 (wire slow) A1-2 H1-4 c F 3,4,17,0,18,13312 F 3,4,17,1,18,13312 F 3,4,17,2,18,13312 F 3,4,17,3,18,13312 C setting completed for wire A1-2 E-W 1-6 f 3,4,17,4,18,9472 f 3,4,17,5,18,9472 f 3,4,17,6,18,9472 f 3,4,17,7,18,9479 c setting completed for strips A1-2 H1-4 c last stas channel cluster size=3 c setting completed for stas 3 c F 3,4,18,0,18,13312 F 3,4,18,1,18,13312 F 3,4,18,2,18,13312 F 3,4,18,3,18,13312 c setting completed for wire SLOW A1-2 E-W 1-6 f 3,4,18,4,18,13568 f 3,4,18,5,18,13568 f 3,4,18,6,18,13568 f 3,4,18,7,18,13583 c setting completed for strips slow A1-2 H1-4 c last stas channel cluster size=4 c setting completed for stas 4 C f 3,4,19,0,18,9472 F 3,4,19,1,18,9472 F 3,4,19,2,18,9472 F 3,4,19,3,18,9472 F 3,4,19,4,18,9472 F 3,4,19,5,18,9472 C setting completed for strip FAST A1-2 (E1-6;W1-6) F 3,4,19,6,18,9503 c last stas channel (strip quartetto) cluster size=5 c setting completed for stas 5 C f 3,4,20,0,18,14336 F 3,4,20,1,18,14336 F 3,4,20,2,18,14336 F 3,4,20,3,18,14336 F 3,4,20,4,18,14336 F 3,4,20,5,18,14336 C setting completed for strip SLOW A1-2 (E1-6;W1-6) F 3,4,20,6,18,13375 c last stas channel cluster size=6 c setting completed for stas 6 c c Init BARI trigger module t 3,5,4,0,28 t 3,5,7,0,28 t 3,5,10,0,28 t 3,5,13,0,28 t 3,5,16,0,28 t 3,5,19,0,28 t 3,5,22,0,28 C C *** I N I T Q T P C Init QTP (Mod # 1) t 3,6,1,0,9 t 3,6,1,0,26 f 3,6,1,0,16,48 c C Init QTP (WEST Smod # 1) t 3,6,3,0,9 t 3,6,3,0,26 f 3,6,3,0,16,48 c C Init QTP (EAST Smod # 1) t 3,6,5,0,9 t 3,6,5,0,26 f 3,6,5,0,16,48 C C Init QTP (North) t 3,6,7,0,9 t 3,6,7,0,26 f 3,6,7,0,16,48 C C Init QTPA H1 t 3,6,10,0,9 t 3,6,10,0,26 f 3,6,10,0,16,48 c C Init QTPA W1 t 3,6,12,0,9 t 3,6,12,0,26 f 3,6,12,0,16,48 c C Init QTPA E1 t 3,6,14,0,9 t 3,6,14,0,26 f 3,6,14,0,16,48 C C Init QTP (Mod # 2) t 1,6,1,0,9 t 1,6,1,0,26 f 1,6,1,0,16,48 c C Init QTP (Mod # 3) t 1,6,3,0,9 t 1,6,3,0,26 f 1,6,3,0,16,48 c C Init QTP (Mod # 4) t 1,6,5,0,9 t 1,6,5,0,26 f 1,6,5,0,16,48 C C Init QTP (WEST Smod # 2) t 1,6,7,0,9 t 1,6,7,0,26 f 1,6,7,0,16,48 c C Init QTP (EAST Smod # 2) t 1,6,9,0,9 t 1,6,9,0,26 f 1,6,9,0,16,48 c C Init QTPA H2 t 1,6,14,0,9 t 1,6,14,0,26 f 1,6,14,0,16,48 c C Init QTPA W2 t 1,6,16,0,9 t 1,6,16,0,26 f 1,6,16,0,16,48 c C Init QTPA E2 t 1,6,18,0,9 t 1,6,18,0,26 f 1,6,18,0,16,48 C c *** INIT STREAMER MONOPOLE TRIGGER HORIZONTAL*** t 3,3,17,1,24 t 3,3,19,1,24 t 3,3,21,1,24 c SET THRESHOLD MOD 1 7 STREAMER + 7 SCINNILLATOR c wait 10-20 msec user_procedure 2 setnoq f 3,3,17,0,17,119 t 3,3,17,1,26 t 3,3,17,1,25 c SET THRESHOLD MOD 2 7 STREAMER + 7 SCINNILLATOR f 3,3,19,0,17,119 t 3,3,19,1,26 t 3,3,19,1,25 c SET THRESHOLD MOD 3 7 STREAMER + 7 SCINNILLATOR f 3,3,21,0,17,119 t 3,3,21,1,26 t 3,3,21,1,25 setq c *** INIT LATERAL MONOPOLE TRIGGER (MARCH-95) *** C T 1,1,6,0,9 T 1,1,8,0,9 T 1,1,10,0,9 T 1,1,12,0,9 T 1,1,14,0,9 T 1,1,16,0,9 T 1,1,18,0,9 T 1,1,20,0,9 T 1,1,22,0,9 T 1,1,1,0,9 T 1,1,3,0,9 C c *** TDC *** t 1,2,11,0,9 t 1,2,3,0,9 c c ****** C.. Reset LeCroy HV interface (branch 2, crate 7, slot 13): T 2,7,13,0,9 C ----------------------------------------------------------------------- C ERP SYSTEM initialization C ----------------------------------------------------------------------- C ASSUMES THAT ERP SYSTEM IN BRANCH 2 C ERP TRIGGER MODULES IN CRATE 6 SLOTS 1-20 C SUPERVISOR MODULE IN CRATE 6 SLOT 21 C C C CLEAR MUON (11) AND GC(9) BUFFER COUNTERS C T 2,2,21,0,9 T 2,2,21,0,11 T 2,6,21,0,9 T 2,6,21,0,11 T 2,5,21,0,9 T 2,5,21,0,11 C Clear TDC for interSM ERP timing. T 2,5,22,0,9 C INITIALIZE THE NEW TRIGGER MASTER/SCIN PATTERN UNIT T 2,7,15,0,9 c c Reset Interface C-139 (HV) C > interface address: b_int=1, c_int=2, n_int=1 t 1,2,1,0,9 c initialize CAEN HV recovery procedure user_procedure 8 C ----------------------------------------------------------------------- C CIT MONOPOLE INIT C ----------------------------------------------------------------------- SET24 setnoq C -- INITIALIZE LI F 2,2,8,1,17,$100004 F 2,2,9,1,17,$100004 F 2,2,10,1,17,$100004 F 2,3,13,1,17,$100004 F 2,3,14,1,17,$100004 F 2,3,15,1,17,$100004 C -- TURN ON LI MODULES F 2,2,8,1,17,$100001 F 2,2,9,1,17,$100001 F 2,2,10,1,17,$100001 F 2,3,13,1,17,$100001 F 2,3,14,1,17,$100001 F 2,3,15,1,17,$100001 C -- SET PARAMETERS TRIG=10, ACT=4, DECAY=(256-234)*30ns (BOTTOM AND TOP) C -- SET PARAMETERS TRIG=9, ACT=3, DECAY=(256-206)*30ns (FOR THE VERTICAL) F 2,2,8,1,16,$040AEA F 2,2,9,1,16,$040AEA F 2,2,10,1,16,$0309CE F 2,3,13,1,16,$040AEA F 2,3,14,1,16,$040AEA F 2,3,15,1,16,$0309CE setq C -- INIT CALTECH LATCHes T 2,2,7,0,9 T 2,3,12,0,9 C ----------------------------------------------------------------------- C C ---------------CSPAM/FMT INITIALIZATION------------------------ C C C. LANE DEC 93 -- UVAX 1: SM1+2 AND SM2+3 TRIGGERS C C STATION 1: 7106 DISC: (2B)(1B)(2C)(1C) C STATION 3: 7106 DISC: (2W)(1W)(2E)(1E) C STATION 5: 7106 DISC: (2T)(1T)(1N)(XX) C STATION 7: 7106 DISC: (2T)(1T)(1N)(XX) HIPT C STATION 9: 7106 DISC: (2B)(1B)(2C)(1C) HIPT C STATION 11: 7106 DISC: (2W)(1W)(2E)(1E) HIPT C STATION 12: FMT : (2B)(3B)(2C)(3C) C STATION 13: FMT : (2W)(3W)(2E)(3E) C STATION 14: FMT : (2T)(3T)(2T)(3T) CSPAM/HIPT C STATION 15: FMT : (2B)(3B)(2C)(3C) HIPT C STATION 16: FMT : (2W)(3W)(2E)(3E) HIPT C STATION 17: FMT : (1N)(XX)(1N)(XX) CSPAM/HIPT C STATION 18: FMT : (1B)(2B)(1C)(2C) C STATION 19: FMT : (1W)(2W)(1E)(2E) C STATION 20: FMT : (1T)(2T)(1T)(2T) CSPAM/HIPT C STATION 21: FMT : (1B)(2B)(1C)(2C) HIPT C STATION 22: FMT : (1W)(2W)(1E)(2E) HIPT C C F(17) SET DISC. THRESHOLD = -(VALUE*1mV + 10mV) C C USING DEFAULT THRESHOLDS OF 200mV, ok for BC planes, but C WE planes should be lowered some. C C Vertical planes (and T plane, attenuatedx0.7) lowered to 140mV C 8 apr 95 CEL C C CHANNEL MASKS setnoq F 2,1,1,0,16,$FFFF F 2,1,3,0,16,$FFFF F 2,1,5,0,16,$FFFF F 2,1,7,0,16,$FFFF F 2,1,9,0,16,$FFFF F 2,1,11,0,16,$FFFF C THRESHOLDS F 2,1,1,0,17,190 F 2,1,3,0,17,130 F 2,1,5,0,17,130 F 2,1,7,0,17,130 F 2,1,9,0,17,190 F 2,1,11,0,17,130 setq C TURN ON REMOTE MODE T 2,1,1,0,26 T 2,1,3,0,26 T 2,1,5,0,26 T 2,1,7,0,26 T 2,1,9,0,26 T 2,1,11,0,26 C START FMT CLOCKS T 2,1,12,0,9 T 2,1,13,0,9 T 2,1,14,0,9 T 2,1,15,0,9 T 2,1,16,0,9 T 2,1,17,0,9 T 2,1,18,0,9 T 2,1,19,0,9 T 2,1,20,0,9 T 2,1,21,0,9 T 2,1,22,0,9 C C CLEAR ACTIVITY LATCHES C T 2,1,12,0,10 T 2,1,13,0,10 T 2,1,14,0,10 T 2,1,15,0,10 T 2,1,16,0,10 T 2,1,17,0,10 T 2,1,18,0,10 T 2,1,19,0,10 T 2,1,20,0,10 T 2,1,21,0,10 T 2,1,22,0,10 C C --------------------END CSPAM/FMT INITIALIZATION--------------- C C ---------------------------------------------------------------------- C Initialization for LIP C ---------------------------------------------------------------------- T 2,2,2,0,9,1 C C ---------------------------------------------------------------------- C Initialization for the WFD STOP Master C $2710 = 1 ms, $03E8 = 100 us, $0064 = 10 us, $0005 = 500 ns C put the 0 with A=8, 1 with A=9, 7 with A=10, 2 with A=11 C ---------------------------------------------------------------------- SET24 F 2,7,18,8,16,$000000 F 2,7,18,9,16,$100000 F 2,7,18,10,16,$700000 F 2,7,18,11,16,$200000 F 2,7,18,8,17,$000000 F 2,7,18,9,17,$100000 F 2,7,18,10,17,$700000 F 2,7,18,11,17,$200000 T 2,7,18,0,9 F 2,3,19,8,16,$000000 F 2,3,19,9,16,$100000 F 2,3,19,10,16,$700000 F 2,3,19,11,16,$200000 F 2,3,19,8,17,$000000 F 2,3,19,9,17,$100000 F 2,3,19,10,17,$700000 F 2,3,19,11,17,$200000 T 2,3,19,0,9 C -- Use CAMAC output to send a STOP to the VME WFD cards C -- It seems we need a short delay (USER_PROCEDURE 2) before WFD_THRESH F 2,7,18,0,19 F 2,3,19,0,19 USER_PROCEDURE 2 C C ------------------------------------------------------------------------ C WFD initialization: C ------------------------------------------------------------------------ VME32 WFD_MAP 1,2,$1000000,1 WFD_MAP 1,3,$2000000,2 C ------------------------------------------------------------------------ C Set the WFD thresholds: C This also takes cards out of Read_Write mode C ------------------------------------------------------------------------ VME32 WFD_THRESH 1,0,4,10 WFD_THRESH 1,1,4,10 WFD_THRESH 1,2,4,10 WFD_THRESH 1,3,4,10 WFD_THRESH 1,4,4,10 WFD_THRESH 1,5,4,10 WFD_THRESH 1,6,4,10 WFD_THRESH 1,7,4,10 WFD_THRESH 1,8,4,10 WFD_THRESH 1,9,4,10 WFD_THRESH 1,10,4,10 WFD_THRESH 1,11,4,10 WFD_THRESH 1,12,4,10 WFD_THRESH 1,13,4,10 WFD_THRESH 1,14,4,10 WFD_THRESH 1,15,4,10 WFD_THRESH 1,16,4,10 WFD_THRESH 1,17,4,10 WFD_THRESH 1,18,4,10 WFD_THRESH 1,19,4,10 WFD_THRESH 1,20,4,10 WFD_THRESH 1,21,4,10 WFD_THRESH 1,22,4,10 WFD_THRESH 1,23,4,10 WFD_THRESH 1,24,4,10 WFD_THRESH 1,25,4,10 WFD_THRESH 1,26,4,10 WFD_THRESH 1,27,4,10 WFD_THRESH 1,28,4,10 WFD_THRESH 1,29,4,10 WFD_THRESH 1,30,4,10 WFD_THRESH 1,31,4,10 WFD_THRESH 1,32,4,10 WFD_THRESH 1,33,4,10 WFD_THRESH 1,34,4,10 WFD_THRESH 1,35,4,10 WFD_THRESH 1,36,4,10 WFD_THRESH 1,37,4,10 WFD_THRESH 1,38,4,10 WFD_THRESH 1,39,4,10 WFD_THRESH 1,40,4,10 WFD_THRESH 1,41,4,10 WFD_THRESH 1,42,4,10 WFD_THRESH 1,43,4,10 WFD_THRESH 2,0,4,10 WFD_THRESH 2,1,4,10 WFD_THRESH 2,2,4,10 WFD_THRESH 2,3,4,10 WFD_THRESH 2,4,4,10 WFD_THRESH 2,5,4,10 WFD_THRESH 2,6,4,10 WFD_THRESH 2,7,4,10 WFD_THRESH 2,8,4,10 WFD_THRESH 2,9,4,10 WFD_THRESH 2,10,4,10 WFD_THRESH 2,11,4,10 WFD_THRESH 2,12,4,10 WFD_THRESH 2,13,4,10 WFD_THRESH 2,14,4,10 WFD_THRESH 2,15,4,10 WFD_THRESH 2,16,4,10 WFD_THRESH 2,17,4,10 WFD_THRESH 2,18,4,10 WFD_THRESH 2,19,4,10 WFD_THRESH 2,20,4,10 WFD_THRESH 2,21,4,10 WFD_THRESH 2,22,4,10 WFD_THRESH 2,23,4,10 WFD_THRESH 2,24,4,10 WFD_THRESH 2,25,4,10 WFD_THRESH 2,26,4,10 WFD_THRESH 2,27,4,10 WFD_THRESH 2,28,4,10 WFD_THRESH 2,29,4,10 WFD_THRESH 2,30,4,10 WFD_THRESH 2,31,4,10 WFD_THRESH 2,32,4,10 WFD_THRESH 2,33,4,10 WFD_THRESH 2,34,4,10 WFD_THRESH 2,35,4,10 WFD_THRESH 2,36,4,10 WFD_THRESH 2,37,4,10 WFD_THRESH 2,38,4,10 WFD_THRESH 2,39,4,10 C ----------------------------------------------------------------------- C Use trigger out from stop master for first START signal to WFD C ----------------------------------------------------------------------- F 2,7,18,0,10 F 2,3,19,0,10 C ------------------------------------------------------------------------ C End of WFD initializations C ------------------------------------------------------------------------ C C *******SEND BIT BEGINNING OF RUN F 1,2,4,0,16,$0100 eoi c *************** END OF INITIALIZATION ************************** equip 1 set16 c reset clock setnoq t 1,2,19,0,9 t 1,2,19,1,9 f 1,2,19,1,16,0 f 1,2,19,0,17,0 t 1,2,19,0,0 setq c now read t 1,2,19,0,27 f 1,2,19,0,0 t 1,2,19,0,27 f 1,2,19,0,0 t 1,2,19,0,27 f 1,2,19,0,0 t 1,2,19,0,27 f 1,2,19,0,0 t 1,2,19,0,27 f 1,2,19,0,0 c end of ut clock readout set24 c scalers f 1,2,20,0,0,4 set16 c f 1,2,3,1,1 c f 1,2,3,0,1 c f 1,2,3,0,0,16 eoe c *********Read BARI trigger module registers EQUIP 2 set16 f 3,5,1,0,2 fqignore 3,5,4,0,2,1 fqignore 3,5,4,1,2,1 t 3,5,4,0,28 fqignore 3,5,7,0,2,1 fqignore 3,5,7,1,2,1 t 3,5,7,0,28 fqignore 3,5,10,0,2,1 fqignore 3,5,10,1,2,1 t 3,5,10,0,28 fqignore 3,5,13,0,2,1 fqignore 3,5,13,1,2,1 t 3,5,13,0,28 fqignore 3,5,16,0,2,1 fqignore 3,5,16,1,2,1 t 3,5,16,0,28 fqignore 3,5,19,0,2,1 fqignore 3,5,19,1,2,1 t 3,5,19,0,28 fqignore 3,5,22,0,2,1 fqignore 3,5,22,1,2,1 t 3,5,22,0,28 eoe EQUIP 3 c in b=3 c=3 n1 wait_q 3,3,1,0,27,0 sqstop 3,3,1,0,2,5000 wait_q 3,3,2,0,27,0 sqstop 3,3,2,0,2,5000 wait_q 3,3,3,0,27,0 sqstop 3,3,3,0,2,5000 wait_q 3,3,4,0,27,0 sqstop 3,3,4,0,2,5000 wait_q 3,3,5,0,27,0 sqstop 3,3,5,0,2,5000 wait_q 3,3,6,0,27,0 sqstop 3,3,6,0,2,5000 wait_q 3,3,7,0,27,0 sqstop 3,3,7,0,2,5000 wait_q 3,3,8,0,27,0 sqstop 3,3,8,0,2,5000 wait_q 3,3,9,0,27,0 sqstop 3,3,9,0,2,5000 wait_q 3,3,10,0,27,0 sqstop 3,3,10,0,2,5000 wait_q 3,3,11,0,27,0 sqstop 3,3,11,0,2,5000 wait_q 3,3,12,0,27,0 sqstop 3,3,12,0,2,5000 wait_q 3,3,13,0,27,0 sqstop 3,3,13,0,2,5000 wait_q 3,3,14,0,27,0 sqstop 3,3,14,0,2,5000 c clear t 3,3,1,0,9 t 3,3,2,0,9 t 3,3,3,0,9 t 3,3,4,0,9 t 3,3,5,0,9 t 3,3,6,0,9 t 3,3,7,0,9 t 3,3,8,0,9 t 3,3,9,0,9 t 3,3,10,0,9 t 3,3,11,0,9 t 3,3,12,0,9 t 3,3,13,0,9 t 3,3,14,0,9 eoe c ************ Read in QSCAN mode STAS modules of II s.m. EQUIP 4 c in b=3 c=4 n1 WAIT_q 3,4,1,0,27,0 sqstop 3,4,1,0,2,5000 WAIT_q 3,4,2,0,27,0 sqstop 3,4,2,0,2,5000 WAIT_q 3,4,3,0,27,0 sqstop 3,4,3,0,2,5000 WAIT_q 3,4,4,0,27,0 sqstop 3,4,4,0,2,5000 WAIT_q 3,4,5,0,27,0 sqstop 3,4,5,0,2,5000 WAIT_q 3,4,6,0,27,0 sqstop 3,4,6,0,2,5000 WAIT_q 3,4,7,0,27,0 sqstop 3,4,7,0,2,5000 WAIT_q 3,4,8,0,27,0 sqstop 3,4,8,0,2,5000 WAIT_q 3,4,9,0,27,0 sqstop 3,4,9,0,2,5000 WAIT_q 3,4,10,0,27,0 sqstop 3,4,10,0,2,5000 WAIT_q 3,4,11,0,27,0 sqstop 3,4,11,0,2,5000 WAIT_q 3,4,12,0,27,0 sqstop 3,4,12,0,2,5000 c clear t 3,4,1,0,9 t 3,4,2,0,9 t 3,4,3,0,9 t 3,4,4,0,9 t 3,4,5,0,9 t 3,4,6,0,9 t 3,4,7,0,9 t 3,4,8,0,9 t 3,4,9,0,9 t 3,4,10,0,9 t 3,4,11,0,9 t 3,4,12,0,9 eoe c *************************** Stas Attico ********** EQUIP 10 c c *** in b=3 c=4 n=15,16,17,18,19,20 c c WAIT_Q 3,4,15,0,27,0 WAIT_Q 3,4,16,0,27,0 WAIT_Q 3,4,17,0,27,0 WAIT_Q 3,4,18,0,27,0 WAIT_Q 3,4,19,0,27,0 WAIT_Q 3,4,20,0,27,0 c Read the status word (F0,A0) f 3,4,15,0,0 f 3,4,16,0,0 f 3,4,17,0,0 f 3,4,18,0,0 f 3,4,19,0,0 f 3,4,20,0,0 sqstop 3,4,15,0,2,5000 sqstop 3,4,16,0,2,5000 sqstop 3,4,17,0,2,5000 sqstop 3,4,18,0,2,5000 sqstop 3,4,19,0,2,5000 sqstop 3,4,20,0,2,5000 c c *** clear t 3,4,15,0,9 t 3,4,16,0,9 T 3,4,17,0,9 T 3,4,18,0,9 T 3,4,19,0,9 T 3,4,20,0,9 c eoe c ****************** QTP *************** equip 5 set16 c Mod # 1 wait_q 3,6,1,0,8,1 qstop 3,6,1,0,2,3000 t 3,6,1,0,9 c WEST Smod # 1 wait_q 3,6,3,0,8,1 qstop 3,6,3,0,2,3000 t 3,6,3,0,9 c EAST Smod # 1 wait_q 3,6,5,0,8,1 qstop 3,6,5,0,2,3000 t 3,6,5,0,9 c NORTH wait_q 3,6,7,0,8,1 qstop 3,6,7,0,2,3000 t 3,6,7,0,9 c Attico Mod # 1 wait_q 3,6,10,0,8,1 qstop 3,6,10,0,2,3000 t 3,6,10,0,9 c Attico WEST 1 wait_q 3,6,12,0,8,1 qstop 3,6,12,0,2,3000 t 3,6,12,0,9 c Attico EAST 1 wait_q 3,6,14,0,8,1 qstop 3,6,14,0,2,3000 t 3,6,14,0,9 c Mod # 2 wait_q 1,6,1,0,8,1 qstop 1,6,1,0,2,3000 t 1,6,1,0,9 c Mod # 3 wait_q 1,6,3,0,8,1 qstop 1,6,3,0,2,3000 t 1,6,3,0,9 c Mod # 4 wait_q 1,6,5,0,8,1 qstop 1,6,5,0,2,3000 t 1,6,5,0,9 c WEST Smod # 2 wait_q 1,6,7,0,8,1 qstop 1,6,7,0,2,3000 t 1,6,7,0,9 c EAST Smod # 2 wait_q 1,6,9,0,8,1 qstop 1,6,9,0,2,3000 t 1,6,9,0,9 c Attico Mod # 2 wait_q 1,6,14,0,8,1 qstop 1,6,14,0,2,3000 t 1,6,14,0,9 c Attico WEST 1 wait_q 1,6,16,0,8,1 qstop 1,6,16,0,2,3000 t 1,6,16,0,9 c Attico EAST 1 wait_q 1,6,18,0,8,1 qstop 1,6,18,0,2,3000 t 1,6,18,0,9 eoe C C streamer monopole trigger configuration equip 7 set16 f 3,1,1,0,2 fqstop 3,3,17,1,2,321 fqstop 3,3,19,1,2,321 fqstop 3,3,21,1,2,321 c fqignore 3,1,9,0,2,1 c fqignore 3,1,11,0,2,1 c fqignore 3,1,13,0,2,1 c fqignore 3,1,15,0,2,1 c fqignore 3,1,17,0,2,1 eoe C *** TDC *** equip 9 set24 setnoq f 1,2,11,0,0 f 1,2,11,1,0 f 1,2,11,2,0 f 1,2,11,3,0 f 1,2,11,4,0 f 1,2,11,5,0 f 1,2,11,6,0 f 1,2,11,7,0 setq set16 eoe c Trigger TDC equip 11 set16 f 1,2,3,1,1 f 1,2,3,0,1 f 1,2,3,0,0,16 eoe C STREAMER LATERAL MONOPOLE TRIGGER (MARCH-95) EQUIP 12 SETNOQ F 1,1,6,0,0,3 F 1,1,8,0,0,3 F 1,1,10,0,0,3 F 1,1,12,0,0,3 F 1,1,14,0,0,3 F 1,1,16,0,0,3 F 1,1,18,0,0,3 F 1,1,20,0,0,3 F 1,1,22,0,0,3 F 1,1,1,1,1 F 1,1,3,1,1 F 1,1,1,0,1 F 1,1,3,0,1 SETQ EOE c general reset at end of event equip 16 t 3,5,4,0,28 t 3,5,7,0,28 t 3,5,10,0,28 t 3,5,13,0,28 t 3,5,16,0,28 t 3,5,19,0,28 t 3,5,22,0,28 c monopole C............lateral st mono (mar-95) T 1,1,1,0,9 T 1,1,3,0,9 T 1,1,6,0,9 T 1,1,8,0,9 T 1,1,10,0,9 T 1,1,12,0,9 T 1,1,14,0,9 T 1,1,16,0,9 T 1,1,18,0,9 T 1,1,20,0,9 T 1,1,22,0,9 C.................................... C t 3,1,1,0,2 c t 3,1,9,0,2 c t 3,1,11,0,2 c t 3,1,13,0,2 c t 3,1,15,0,2 c t 3,1,17,0,2 c TDC t 1,2,11,0,9 t 1,2,3,0,9 c c scint p.u. ! now moved to equip 32 EK, 22-mar-94 c T 2,7,15,0,9 c eoe C ERP MUON BUFFER = EQUIPMENT # 25 (N Face) EQUIP 25 SELREG 2,7,15,0,0 SECT 2 C READ NUMBER OF WORDS IN MUON BUFFER C c trying to get rid of AMC with wait wait_q 2,2,21,0,10,1 F 2,2,21,0,0 C C READ IN MUON BUFFER (MAX DMA LENGTH = 22 MODS * 4 CH/MOD * 10 WORDS/CH) C QSTOP 2,2,21,3,0,900 C FQSTOP 2,2,21,3,0,900 C READ IN TRIGGER MODULE ENERGY/POSITION REGISTERS C ISSUE CLEAR TO SUPERVISOR TO CLEAR EVENT(muon buffer) T 2,2,21,0,11 C RESET CALIBRATION IN PROGRESS BIT ON INPUT REG C **** COMMENT THIS OUT FOR TESTS - REINSERT LATER *** C F 2,2,22,0,16,0 EOS EOE EQUIP 31 C New equipment to read out all ERP GC buffers at the end of run. c Force a buffer full condition on all 3 buffers T 2,6,21,0,24 T 2,5,21,0,24 T 2,2,21,0,24 C READ IN ENTIRE GC BUFFER (SM 1) QIGNORE 2,6,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,6,21,0,9 C READ IN ENTIRE GC BUFFER (SM 2) QIGNORE 2,5,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,5,21,0,9 C READ IN ENTIRE GC BUFFER (N Face) QIGNORE 2,2,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,2,21,0,9 EOE EQUIP 26 C READ IN ENTIRE GC BUFFER (N Face) SELREG 2,7,15,0,0 SECT 6 c Force a buffer full condition T 2,2,21,0,24 c wait 10-20 msec C user_procedure 2 QIGNORE 2,2,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,2,21,0,9 EOS EOE C ----------------------------------------------------------------------- C ERP MUON BUFFER SM-1 (Equipment 22) C ----------------------------------------------------------------------- EQUIP 22 SELREG 2,7,15,0,0 SECT 7 C READ NUMBER OF WORDS IN MUON BUFFER C c trying to get rid of AMC with wait wait_q 2,6,21,0,10,1 F 2,6,21,0,0 C C READ IN MUON BUFFER (MAX DMA LENGTH = 22 MODS * 4 CH/MOD * 10 WORDS/CH) C QSTOP 2,6,21,3,0,900 WFD_PATREG 1,20,0 C FQSTOP 2,6,21,3,0,900 C READ IN TRIGGER MODULE ENERGY/POSITION REGISTERS C ISSUE CLEAR TO SUPERVISOR TO CLEAR EVENT(muon buffer) T 2,6,21,0,11 C RESET CALIBRATION IN PROGRESS BIT ON INPUT REG C **** COMMENT THIS OUT FOR TESTS - REINSERT LATER *** C F 2,2,22,0,16,0 EOS EOE EQUIP 23 C READ IN ENTIRE GC BUFFER (SM #1) SELREG 2,7,15,0,0 SECT 9 c Force a buffer full condition T 2,6,21,0,24 c wait 10-20 msec C user_procedure 2 QIGNORE 2,6,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,6,21,0,9 EOS EOE C ----------------------------------------------------------------------- C ERP MUON BUFFER SM-2 (Equipment 20) C ----------------------------------------------------------------------- EQUIP 20 SELREG 2,7,15,0,0 SECT 8 C READ NUMBER OF WORDS IN MUON BUFFER C c trying to get rid of AMC with wait wait_q 2,5,21,0,10,1 F 2,5,21,0,0 C C READ IN MUON BUFFER (MAX DMA LENGTH = 22 MODS * 4 CH/MOD * 10 WORDS/CH) C QSTOP 2,5,21,3,0,900 WFD_PATREG 2,20,0 C READ IN TRIGGER MODULE ENERGY/POSITION REGISTERS C ISSUE CLEAR TO SUPERVISOR TO CLEAR EVENT T 2,5,21,0,11 C RESET CALIBRATION IN PROGRESS BIT ON INPUT REG C **** COMMENT THIS OUT FOR TESTS - REINSERT LATER *** C F 2,2,22,0,16,0 EOS EOE EQUIP 21 C READ IN ENTIRE GC BUFFER (SM #2) SELREG 2,7,15,0,0 SECT 10 c Force a buffer full condition T 2,5,21,0,24 c wait 10-20 msec C user_procedure 2 QIGNORE 2,5,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,5,21,0,9 EOS EOE C C ----------------------------------------------------------------------- C ERP intermodule tdc C ----------------------------------------------------------------------- EQUIP 33 F 2,5,22,0,0,8 T 2,5,22,0,9 EOE C C ---------------------------------------------------------------------- C Scintillator Clear (Equipment 32) C ---------------------------------------------------------------------- EQUIP 32 F 2,7,15,0,0,3 T 2,7,15,0,9 C The WFD_PATREG clear and WFD START moved here from EQUIP 42 C because if EQUIP 42 is not executed due to an error, the C pattern register never gets cleared, the WFD never gets C restarted and eventually the system hangs.... theory C *** clear WFD software pattern register C --------------------------------------- WFD_PATREG 1,0,4 WFD_PATREG 2,0,4 C ------------------------------------------------------------------------- C Clear WFD STOP master C ------------------------------------------------------------------------ T 2,7,18,0,9 T 2,3,19,0,9 C *** issue START to WFD using TRIG OUT of STOP MASTER C ---------------------------------------------------- T 2,7,18,0,10 T 2,3,19,0,10 EOE C C ----------------------------------------------------------------------- C C-------------------CSPAM/FMT---------------------------- C C C. LANE 4 Jan 94 FOR UVAX1 C C READ FMT MODULE ACTIVITY REGISTERS FOR SM1+2, 2+3 TRIGGERS C C ADD WFD READOUT: C initial WFD_PATREG with subid=0 sets equipment pointer C after activity register readout, SELREG on SPU to get C individual readout of CSPAM, FMT, HIPT (12 and 23) C C WFD_PATREG sm,30,subid C C sm = lowest supermodule in uVax participating in trigger C +6 for "window readout" selection C subid = 100*(uvax) + (supermodule pair) C C FOR HIPT SAME SCHEME, BUT MULTIPLY * 10 (bigger thresholds, eh?) C EQUIP 30 WFD_PATREG 1,30,0 SETNOQ F 2,1,12,0,0 F 2,1,13,0,0 F 2,1,14,0,0 F 2,1,15,0,0 F 2,1,16,0,0 F 2,1,17,0,0 F 2,1,18,0,0 F 2,1,19,0,0 F 2,1,20,0,0 F 2,1,21,0,0 F 2,1,22,0,0 SETQ C C selective WFD readout, based on spu C C bit1: fmt12 "full" wfd (sm=1) sid=112 C bit5: csp12 "full" wfd (sm=1) sid=112 change sm->7 for window wfd C bit11: fmt23 "full" wfd (sm=2) sid=123 C bit12: csp23 "full" wfd (sm=2) sid=123 change sm->7 for window wfd C SELREG 2,7,15,0,0 SECT 1 WFD_PATREG 1,30,112 SECT 5 WFD_PATREG 1,30,112 SECT 11 WFD_PATREG 2,30,123 SECT 12 WFD_PATREG 2,30,123 EOS C C hipt triggers on word 1 of spu C C bit3: hip12 "full" wfd (sm=1) sid=1120 C bit4: hip23 "full" wfd (sm=2) sid=1230 C SELREG 2,7,15,1,0 SECT 3 WFD_PATREG 1,30,1120 SECT 4 WFD_PATREG 2,30,1230 EOS C RESET FMT ACTIVITY LATCHES T 2,1,12,0,10 T 2,1,13,0,10 T 2,1,14,0,10 T 2,1,15,0,10 T 2,1,16,0,10 T 2,1,17,0,10 T 2,1,18,0,10 T 2,1,19,0,10 T 2,1,20,0,10 T 2,1,21,0,10 T 2,1,22,0,10 EOE C C CSPAM/FMT/HIPT SCINTILLATOR RATE MONITOR C READ OUT WITH CSPAM (MUON) C EQUIP 34 SET24 FQSTOP 2,1,12,0,2,1000 FQSTOP 2,1,13,0,2,1000 FQSTOP 2,1,14,0,2,1000 FQSTOP 2,1,15,0,2,1000 FQSTOP 2,1,16,0,2,1000 FQSTOP 2,1,17,0,2,1000 FQSTOP 2,1,18,0,2,1000 FQSTOP 2,1,19,0,2,1000 FQSTOP 2,1,20,0,2,1000 FQSTOP 2,1,21,0,2,1000 FQSTOP 2,1,22,0,2,1000 EOE C end of CSPAM/FMT/HIPT READOUT C C ----------------------------------------------------------------------- C CALTECH MONOPOLE TRIGGER (Equipment 27) C ----------------------------------------------------------------------- EQUIP 27 C --- CIT LATCH ON SM1 SET16 FQIGNORE 2,2,7,0,0,1 FQIGNORE 2,2,7,1,0,1 WFD_PATREG 1,27,1 FQIGNORE 2,2,7,2,0,1 FQIGNORE 2,2,7,3,0,1 WFD_PATREG 1,27,2 FQIGNORE 2,2,7,4,0,1 FQIGNORE 2,2,7,5,0,1 WFD_PATREG 1,27,3 T 2,2,7,0,9 C --- CIT LATCH ON SM2 FQIGNORE 2,3,12,0,0,1 FQIGNORE 2,3,12,1,0,1 WFD_PATREG 2,27,1 FQIGNORE 2,3,12,2,0,1 FQIGNORE 2,3,12,3,0,1 WFD_PATREG 2,27,2 FQIGNORE 2,3,12,4,0,1 FQIGNORE 2,3,12,5,0,1 WFD_PATREG 2,27,3 T 2,3,12,0,9 EOE C C ---------------------------------------------------------------------- C LIP equipment (Equipment 14) C ---------------------------------------------------------------------- EQUIP 14 SET16 SETQ SELREG 2,7,15,1,0 SECT 1 F 2,2,2,0,0 F 2,2,2,1,0 WFD_PATREG 1,14,1 F 2,2,2,2,0 F 2,2,2,3,0 WFD_PATREG 1,14,2 F 2,2,2,4,0 F 2,2,2,5,0 WFD_PATREG 1,14,3 T 2,2,2,0,9 EOS EOE C ------------------------------------------------------------------------ C WFD STOP Master (Equipment 40) C ------------------------------------------------------------------------ EQUIP 40 SETQ SET16 C *** SM-1 STOP Master data: WAIT_Q 2,7,18,0,2,1 C *** trigger pattern F 2,7,18,0,3 C *** trigger time for TOHM, ERP, ST_MNP, FMT, CSPAM, LIP, HIPT, SPARE F 2,7,18,0,2 F 2,7,18,1,2 F 2,7,18,2,2 F 2,7,18,3,2 F 2,7,18,4,2 F 2,7,18,5,2 F 2,7,18,6,2 F 2,7,18,7,2 C *** SMP trigger register of some sort F 2,7,18,0,5 C *** trigger time for Caltech SMP: C,B,W,E,N/S,T,SM-1,SM+1 F 2,7,18,2,4 F 2,7,18,3,4 F 2,7,18,4,4 F 2,7,18,5,4 F 2,7,18,6,4 F 2,7,18,7,4 F 2,7,18,1,4 F 2,7,18,0,4 C *** SM-2 STOP Master data: WAIT_Q 2,3,19,0,2,1 C *** trigger pattern F 2,3,19,0,3 C *** trigger time for TOHM, ERP, ST_MNP, FMT, CSPAM, LIP, HIPT, SPARE F 2,3,19,0,2 F 2,3,19,1,2 F 2,3,19,2,2 F 2,3,19,3,2 F 2,3,19,4,2 F 2,3,19,5,2 F 2,3,19,6,2 F 2,3,19,7,2 C *** SMP trigger register of some sort F 2,3,19,0,5 C *** trigger time for Caltech SMP: C,B,W,E,N/S,T,SM-1,SM+1 F 2,3,19,2,4 F 2,3,19,3,4 F 2,3,19,4,4 F 2,3,19,5,4 F 2,3,19,6,4 F 2,3,19,7,4 F 2,3,19,1,4 F 2,3,19,0,4 C Note: we clear the system in the scint end of event (equip 32) EOE C C ----------------------------------------------------------------------- C VME WFD (Equipment 42) C ----------------------------------------------------------------------- EQUIP 42 C *** First, use CAMAC output to send a STOP to VME WFD cards (insurance): C *** -------------------------------------------------------------------- T 2,7,18,0,19 T 2,3,19,0,19 VME32 C *** First word of WFD equip is length of header C *** ------------------------------------------- WRITEHEX $0005 C *** (1) Write the WFD pattern register into equipment data C *** (2) Write pattern of instrumented channels C *** (3) bitwise AND result is stored in pattern register for readout C -------------------------------------------------------------------- WFD_PATREG 1,0,0 WRITEHEX $3FFFFF WFD_PATREG 1,0,3 C *** Repeat for SM-2 C *** --------------- WFD_PATREG 2,0,0 WRITEHEX $1FFFFF WFD_PATREG 2,0,3 C *** Execute readout. Arguments are SM, SELECT, NTICS, BYTE_LIMIT C *** ------------------------------------------------------------ WFD_READOUT 1,0,210000,16000 WFD_READOUT 2,0,210000,16000 EOE C C ************* MONITOR c equipment for the automatic CAEN HV recovery equip 52 c set bit in a PU to exclude terminal f 1,2,4,0,16,384 user_procedure 7 c reset the bit for the terminal f 1,2,4,0,16,256 eoe C============================================================================== C= LeCroy PMT High Voltage Periodic Monitor: SM 1&2 C= C= ? ? Author C= Nat Longley 15NOV94 Updated channel map, cleaned up code. C============================================================================== C.. Equipment number for SM 1: EQUIP 56 C C.. Reset interface (Branch 2, Crate 7, Slot 13): T 2,7,13,0,9 C C.. Select Mainframe MF=1, CHmin=48 (D=CHmin*256+MF*16): F 2,7,13,0,16,12304 C C.. Specify N=32 channels to be measured (D=N*256+4): F 2,7,13,0,16,8196 C.. Measure N channels starting from CH=48 (D=CH*256+67): F 2,7,13,0,16,12355 C.. Call user_procedure 3 while waiting for voltage digitization: user_procedure 3 C.. Read first HV value from CAMAC buffer: F 2,7,13,0,2 C.. Ignore Q on remaining reads as per FR 05JUN90 modification: qignore 2,7,13,0,2,31 C.. Only the final channel number should be left now; clear it (it is ignored): F 2,7,13,0,9,0 C C.. Repeat sequence for channels 80-111: F 2,7,13,0,16,8196 F 2,7,13,0,16,20547 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. Repeat sequence for channels 112-143: F 2,7,13,0,16,8196 F 2,7,13,0,16,28739 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. Repeat sequence for channels 144-175: F 2,7,13,0,16,8196 F 2,7,13,0,16,36931 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. Repeat sequence for channels 176-207: F 2,7,13,0,16,8196 F 2,7,13,0,16,45123 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. Repeat sequence for channels 208-223 (only sixteen on last call):: F 2,7,13,0,16,4100 F 2,7,13,0,16,53315 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,15 F 2,7,13,0,9,0 C C.. End SM 1: EOE C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C.. Equipment number for SM 2: EQUIP 60 C C.. Reset interface (Branch 2, Crate 7, Slot 13): T 2,7,13,0,9 C C.. Select Mainframe MF=2, CHmin=48 (D=CHmin*256+MF*16): F 2,7,13,0,16,12320 C C.. Specify N=32 channels to be measured (D=N*256+4): F 2,7,13,0,16,8196 C.. Measure N channels starting from CH=48 (D=CH*256+67): F 2,7,13,0,16,12355 C.. Call user_procedure 3 while waiting for voltage digitization: USER_PROCEDURE 3 C.. Read first HV value from CAMAC buffer: F 2,7,13,0,2 C.. Ignore Q on remaining reads as per FR 05JUN90 modification: QIGNORE 2,7,13,0,2,31 C.. Only the final channel number should be left now; clear it (it is ignored): F 2,7,13,0,9,0 C C.. Repeat sequence for channels 80-111: F 2,7,13,0,16,8196 F 2,7,13,0,16,20547 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. Repeat sequence for channels 112-143: F 2,7,13,0,16,8196 F 2,7,13,0,16,28739 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. Repeat sequence for channels 144-175: F 2,7,13,0,16,8196 F 2,7,13,0,16,36931 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. Repeat sequence for channels 176-207: F 2,7,13,0,16,8196 F 2,7,13,0,16,45123 USER_PROCEDURE 3 F 2,7,13,0,2 QIGNORE 2,7,13,0,2,31 F 2,7,13,0,9,0 C C.. End SM 2 and periodic PMT HV monitor routine: EOE C============================================================================== c***************************************** c Periodic monitor of Lecroy HV (I SMOD) c***************************************** c equip 56 c c Reset Interface c t 2,7,13,0,9 c c Select Mainframe (=1 / idat=C*256+M*16) c f 2,7,13,0,16,272 c c I reading cycle (ch: 0-38) c c Count specifier (count=30 / idat=c wait Q false (busy off) c f 2,7,13,0,16,7684 c c Select first channel (=0 / idat=chan*256+67) c f 2,7,13,0,16,67 c user_procedure 3 c c Read measured HV modified june 5 1990 by FR to handle errors c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c qrepeat 2,7,13,0,2,30 c c II reading cycle (ch: 30-59) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=30) c f 2,7,13,0,16,7747 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c III reading cycle (ch: 60-90) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=60) c f 2,7,13,0,16,15427 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c IV reading cycle (ch: 90-120) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=90) c f 2,7,13,0,16,23107 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c this section added april 10 1990 (FR) c c V reading cycle (ch: 120-149) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=120) c f 2,7,13,0,16,30787 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c VI reading cycle (ch: 150-160) c c Count specifier (count=10 / idat=256*count+4) c f 2,7,13,0,16,2564 c c Select first channel (=150) c f 2,7,13,0,16,38467 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,9 c eoe c c***************************************** c c Periodic monitor of Lecroy HV(II SMOD) c c***************************************** c equip 60 c c Reset Interface c t 2,7,13,0,9 c c Select Mainframe (=2 / idat=C*256+M*16) c f 2,7,13,0,16,288 c c I reading cycle (ch: 0-38) c c Count specifier (count=30 / idat=c wait Q false (busy off) c f 2,7,13,0,16,7684 c c Select first channel (=0 / idat=chan*256+67) c f 2,7,13,0,16,67 c user_procedure 3 c c Read measured HV modified june 5 1990 by FR to handle errors c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c qrepeat 2,7,13,0,2,30 c c II reading cycle (ch: 30-59) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=30) c f 2,7,13,0,16,7747 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c III reading cycle (ch: 60-90) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=60) c f 2,7,13,0,16,15427 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c IV reading cycle (ch: 90-120) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=90) c f 2,7,13,0,16,23107 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c this section added april 10 1990 (FR) c c V reading cycle (ch: 120-149) c c Count specifier (count=30 / idat=256*count+4) c f 2,7,13,0,16,7684 c c Select first channel (=120) c f 2,7,13,0,16,30787 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,29 c c VI reading cycle (ch: 150-160) c c Count specifier (count=10 / idat=256*count+4) c f 2,7,13,0,16,2564 c c Select first channel (=150) c f 2,7,13,0,16,38467 c user_procedure 3 c c Read measured HV c f 2,7,13,0,2 c qignore 2,7,13,0,2,9 c eoe equip 53 c test streamer monopole circuit c mod 1 t 3,3,17,1,24 t 3,3,17,2,25 wait_q 3,3,17,2,8,1000 fqignore 3,3,17,2,2,1 t 3,3,17,2,10 t 3,3,17,1,26 t 3,3,17,1,25 c mod 2 t 3,3,19,1,24 t 3,3,19,2,25 wait_q 3,3,19,2,8,1000 fqignore 3,3,19,2,2,1 t 3,3,19,2,10 t 3,3,19,1,26 t 3,3,19,1,25 c mod 3 t 3,3,21,1,24 t 3,3,21,2,25 wait_q 3,3,21,2,8,1000 fqignore 3,3,21,2,2,1 t 3,3,21,2,10 t 3,3,21,1,26 t 3,3,21,1,25 c reset veto c t 3,2,2,2,10 f 3,1,1,0,16,0 eoe equip 57 c read camac crates voltage end execute simple test c DSP in branch 1 crate 1 station 23 f 1,1,23,0,5 f 1,1,23,1,5 f 1,1,23,2,5 f 1,1,23,3,5 f 1,1,23,4,5 f 1,1,23,5,5 f 1,1,23,6,5 f 1,1,23,7,5 c write and read 0 f 1,1,23,0,20,0 f 1,1,23,0,4 qrepeat 1,1,23,0,4,10 c write FFFF f 1,1,23,0,20,$FFFF f 1,1,23,0,4 qrepeat 1,1,23,0,4,10 c DSP in branch 1 crate 2 station 23 f 1,2,23,0,5 f 1,2,23,1,5 f 1,2,23,2,5 f 1,2,23,3,5 f 1,2,23,4,5 f 1,2,23,5,5 f 1,2,23,6,5 f 1,2,23,7,5 c write and read 0 f 1,2,23,0,20,0 f 1,2,23,0,4 qrepeat 1,2,23,0,4,10 c write FFFF f 1,2,23,0,20,$FFFF f 1,2,23,0,4 qrepeat 1,2,23,0,4,10 c DSP in branch 1 crate 6 station 23 f 1,6,23,0,5 f 1,6,23,1,5 f 1,6,23,2,5 f 1,6,23,3,5 f 1,6,23,4,5 f 1,6,23,5,5 f 1,6,23,6,5 f 1,6,23,7,5 c write and read 0 f 1,6,23,0,20,0 f 1,6,23,0,4 qrepeat 1,6,23,0,4,10 c write FFFF f 1,6,23,0,20,$FFFF f 1,6,23,0,4 qrepeat 1,6,23,0,4,10 c DSP in branch 2 crate 5 station 23 (SM 2 ERP) f 2,5,23,0,5 f 2,5,23,1,5 f 2,5,23,2,5 f 2,5,23,3,5 f 2,5,23,4,5 f 2,5,23,5,5 f 2,5,23,6,5 f 2,5,23,7,5 c write and read 0 f 2,5,23,0,20,0 f 2,5,23,0,4 qrepeat 2,5,23,0,4,10 c write FFFF f 2,5,23,0,20,$FFFF f 2,5,23,0,4 qrepeat 2,5,23,0,4,10 c DSP in branch 2 crate 6 station 23 (SM 1 ERP) f 2,6,23,0,5 f 2,6,23,1,5 f 2,6,23,2,5 f 2,6,23,3,5 f 2,6,23,4,5 f 2,6,23,5,5 f 2,6,23,6,5 f 2,6,23,7,5 c write and read 0 f 2,6,23,0,20,0 f 2,6,23,0,4 qrepeat 2,6,23,0,4,10 c write FFFF f 2,6,23,0,20,$FFFF f 2,6,23,0,4 qrepeat 2,6,23,0,4,10 c DSP in branch 3 crate 1 station 23 f 3,1,23,0,5 f 3,1,23,1,5 f 3,1,23,2,5 f 3,1,23,3,5 f 3,1,23,4,5 f 3,1,23,5,5 f 3,1,23,6,5 f 3,1,23,7,5 c write and read 0 f 3,1,23,0,20,0 f 3,1,23,0,4 qrepeat 3,1,23,0,4,10 c write FFFF f 3,1,23,0,20,$FFFF f 3,1,23,0,4 qrepeat 3,1,23,0,4,10 c DSP in branch 3 crate 3 station 23 f 3,3,23,0,5 f 3,3,23,1,5 f 3,3,23,2,5 f 3,3,23,3,5 f 3,3,23,4,5 f 3,3,23,5,5 f 3,3,23,6,5 f 3,3,23,7,5 c write and read 0 f 3,3,23,0,20,0 f 3,3,23,0,4 qrepeat 3,3,23,0,4,10 c write FFFF f 3,3,23,0,20,$FFFF f 3,3,23,0,4 qrepeat 3,3,23,0,4,10 c DSP in branch 3 crate 4 station 23 f 3,4,23,0,5 f 3,4,23,1,5 f 3,4,23,2,5 f 3,4,23,3,5 f 3,4,23,4,5 f 3,4,23,5,5 f 3,4,23,6,5 f 3,4,23,7,5 c write and read 0 f 3,4,23,0,20,0 f 3,4,23,0,4 qrepeat 3,4,23,0,4,10 c write FFFF f 3,4,23,0,20,$FFFF f 3,4,23,0,4 qrepeat 3,4,23,0,4,10 c DSP in branch 3 crate 5 station 23 f 3,5,23,0,5 f 3,5,23,1,5 f 3,5,23,2,5 f 3,5,23,3,5 f 3,5,23,4,5 f 3,5,23,5,5 f 3,5,23,6,5 f 3,5,23,7,5 c write and read 0 f 3,5,23,0,20,0 f 3,5,23,0,4 qrepeat 3,5,23,0,4,10 c write FFFF f 3,5,23,0,20,$FFFF f 3,5,23,0,4 qrepeat 3,5,23,0,4,10 c DSP in branch 3 crate 6 station 23 f 3,6,23,0,5 f 3,6,23,1,5 f 3,6,23,2,5 f 3,6,23,3,5 f 3,6,23,4,5 f 3,6,23,5,5 f 3,6,23,6,5 f 3,6,23,7,5 c write and read 0 f 3,6,23,0,20,0 f 3,6,23,0,4 qrepeat 3,6,23,0,4,10 c write FFFF f 3,6,23,0,20,$FFFF f 3,6,23,0,4 qrepeat 3,6,23,0,4,10 eoe c ********************************************* c Periodic monitor of CAEN HV (I SMOD) C ********************************************* EQUIP 55 c set bit in a PU to exclude terminal f 1,2,4,0,16,384 user_procedure 2 c April 10 1990 changed crate_nbr (FR) c HV - crate_nbr = 1 c select target (= group + crate_nbr * 256 ) / (group=50 [ ALL ])... f 1,2,1,0,17,306 c read error_flag... user_procedure 3 f 1,2,1,0,0,1 c start_readout (parameter 9 = VMON)... f 1,2,1,9,17,65280 c time_delay... user_procedure 3 c read pattern_words and VMON-values (par=9) of group 50... Qstop 1,2,1,0,0,50 c c start_readout (parameter 10 = IMON)... f 1,2,1,10,17,65280 c time_delay... user_procedure 3 c read pattern_words and IMON-values (par=10) of group 50... Qstop 1,2,1,0,0,50 c reset the bit for the terminal f 1,2,4,0,16,256 eoe c ********************************************* c Periodic monitor of CAEN HV (II SMOD) C ********************************************* EQUIP 58 F 1,2,4,0,16,384 user_procedure 2 c HV - crate_nbr = 2 c select target (= group + crate_nbr * 256 ) / (group=50 [ ALL ])... f 1,2,1,0,17,562 c read error_flag... user_procedure 3 f 1,2,1,0,0,1 c start_readout (parameter 9 = VMON)... f 1,2,1,9,17,65280 c time_delay... user_procedure 3 c read pattern_words and VMON-values (par=9) of group 50... Qstop 1,2,1,0,0,50 c c start_readout (parameter 10 = IMON)... f 1,2,1,10,17,65280 c time_delay... user_procedure 3 c read pattern_words and IMON-values (par=10) of group 50... Qstop 1,2,1,0,0,50 f 1,2,4,0,16,256 eoe c ********************************************* c Periodic monitor of CAEN HV (ATTICO) (Added 6th Sept. '94) C ********************************************* EQUIP 61 c set bit in a PU to exclude terminal f 1,2,4,0,16,384 user_procedure 2 c crate_nbr = 7 c select target (= group + crate_nbr * 256 ) / (group=50 [ ALL ])... f 1,2,1,0,17,1842 c read error_flag... user_procedure 3 f 1,2,1,0,0,1 c start_readout (parameter 9 = VMON)... f 1,2,1,9,17,65280 c time_delay... user_procedure 3 c read pattern_words and VMON-values (par=9) of group 50... Qstop 1,2,1,0,0,50 c c start_readout (parameter 10 = IMON)... f 1,2,1,10,17,65280 c time_delay... user_procedure 3 c read pattern_words and IMON-values (par=10) of group 50... Qstop 1,2,1,0,0,50 c reset the bit for the terminal f 1,2,4,0,16,256 eoe C *********************************************************** equip 59 c set veto f 1,2,2,2,25 c REset veto f 1,2,2,2,10 c set veto f 1,2,2,2,25 c reset run bit f 1,2,4,0,16,0 eoe c c **************** TRIGGERS ******************* C ---------------------------------------------------------------------- C Trigger 2: ERP MUON C---------------------------------------------------------------------- TRIG 2 EQUIP 1 EQUIP 3 EQUIP 4 EQUIP 5 EQUIP 9 EQUIP 10 EQUIP 11 EQUIP 20 EQUIP 22 EQUIP 25 EQUIP 33 EQUIP 40 EOT c c trigger 4 BARI trigger module trig 4 EQUIP 1 Equip 2 Equip 3 equip 4 equip 5 equip 9 equip 10 equip 11 eot c Trigger 5: ERP grav. collapse trig 5 equip 1 equip 11 equip 23 equip 21 equip 26 c equip 32 ! now read at the end of event c commented from FR 13/5/94 with this readout the buffer could exceed 64kbytes c equip 34 :moved to CSPAM-muon readout, as suggested by A.Habig (14/5/94, A.S.) eot C C......Trigger 6 streamer lateral monopole (mar-95) C TRIG 6 equip 1 equip 3 equip 4 equip 5 c equip 7 equip 9 equip 10 equip 11 equip 12 eot C ---------------------------------------------------------------------- C TRIGGER 7: CALTECH MONOPOLE TRIGGER IN SM1&2 C ---------------------------------------------------------------------- TRIG 7 EQUIP 1 EQUIP 11 EQUIP 27 EQUIP 40 EOT C ---------------------------------------------------------------------- C TRIGGER 8: LIP C ---------------------------------------------------------------------- TRIG 8 EQUIP 1 EQUIP 11 EQUIP 40 EQUIP 14 EOT c Trigger 10 streamer horizontal monopole trig 10 equip 1 equip 3 equip 4 equip 5 equip 7 equip 9 equip 10 equip 11 eot C ---------------------------------------------------------------------- C TRIGGER 12: CSPAM FAST MONOPOLE TRIGGER (FMT) C ---------------------------------------------------------------------- TRIG 12 EQUIP 1 EQUIP 3 EQUIP 4 EQUIP 5 EQUIP 9 EQUIP 10 EQUIP 11 EQUIP 30 EQUIP 40 EOT C ---------------------------------------------------------------------- C TRIGGER 13: CSPAM MUON TRIGGER C ---------------------------------------------------------------------- TRIG 13 EQUIP 1 EQUIP 3 EQUIP 4 EQUIP 5 EQUIP 9 EQUIP 10 EQUIP 11 EQUIP 30 EQUIP 34 EQUIP 40 EOT C ---------------------------------------------------------------------- C TRIGGER 14: HIPT MONOPOLE TRIGGER C ---------------------------------------------------------------------- TRIG 14 EQUIP 1 EQUIP 3 EQUIP 4 EQUIP 5 EQUIP 9 EQUIP 10 EQUIP 11 EQUIP 30 EQUIP 40 EOT C C TRIGGER 16 event with uVAX #1 and # 2 trig 16 equip 1 equip 11 eot C TRIGGER 15 event with uVAX #1 and # 3 trig 15 equip 1 equip 11 eot C ---------------------------------------------------------------------- C TRIGGER 65 : reset at end of event C ---------------------------------------------------------------------- TRIG 65 C equip 42 is the VME WFD card EQUIP 42 C equip 32 is scintillator clear equipment EQUIP 32 C equip 16 is general reset at end of event EQUIP 16 EOT C c trigger 53 readout in case of alarm trig 53 equip 1 equip 52 eot c TRIGGER 54 (monitor readout) trig 54 equip 1 equip 53 equip 55 c equip 56 equip 57 equip 58 c equip 60 equip 61 eot C trigger 59 (end of run sequence) trig 59 c New end-of-run ERP GC readout 22-Mar-1994 R. Baker equip 31 equip 59 eot