C ======================================================================= C CAMAC LIST MUONS and MONOPOLE C OF III AND IV SUPERMODULES 01-JUN-1995 C ======================================================================= rdtrig 1,2,3,1,1 evsca 1,2,20,3,0 trmvax 32,3 trmvax 31,6 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 crate 1,3,4,5,6,7 t 2,1,28,8,26 C BAD CRATE t 2,2,28,8,26 t 2,3,28,8,26 t 2,4,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 1 crate 1,2,6 t 1,1,30,9,24 t 1,2,30,9,24 t 1,6,30,9,24 C remove dataway I in branch 2 crate 1,3,4,5,6,7 T 2,1,30,9,24 C BAD CRATE T 2,2,30,9,24 T 2,3,30,9,24 T 2,4,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 CONFIGURE CAEN I/O REG alarms F 1,2,5,0,9,1 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 enable LAM f 1,2,5,0,26 c load LAM input mask bit 0-6 f 1,2,5,2,16,$003F C CONFIGURE CAEN I/O REG services F 1,2,4,0,9,1 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 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 load LAM input mask f 1,2,4,2,16,$FFFF c set and reset and set veto (to give a reset to the electronics) t 1,2,2,2,25 t 1,2,2,2,10 t 1,2,2,2,25 c configure CAEN I/O as 16 input channels (streamer tube trigger latch) c reset F 3,5,1,0,9,1 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 F 3,1,1,0,9,1 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, III S.M. c clear stas in b=3 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 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 c c Operations STAS # 0-5 I module, # 6-11 II module, IV S.M. c clear stas in b=3 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 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,1,4,0,28 t 3,1,7,0,28 t 3,1,10,0,28 t 3,1,13,0,28 t 3,1,16,0,28 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 c C *** I N I T Q T P c C Init QTP (Mod # 5) 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 # 3) 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 # 3) t 3,6,5,0,9 t 3,6,5,0,26 f 3,6,5,0,16,48 C C Init QTPA H3 t 3,6,10,0,9 t 3,6,10,0,26 f 3,6,10,0,16,48 c C Init QTPA W3 t 3,6,12,0,9 t 3,6,12,0,26 f 3,6,12,0,16,48 c C Init QTPA E3 t 3,6,14,0,9 t 3,6,14,0,26 f 3,6,14,0,16,48 C C Init QTP (Mod # 6) t 1,6,1,0,9 t 1,6,1,0,26 f 1,6,1,0,16,48 c C Init QTP (Mod # 7) t 1,6,3,0,9 t 1,6,3,0,26 f 1,6,3,0,16,48 c C Init QTP (Mod # 8) 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 # 4) 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 # 4) t 1,6,9,0,9 t 1,6,9,0,26 f 1,6,9,0,16,48 c C Init QTPA H4 t 1,6,14,0,9 t 1,6,14,0,26 f 1,6,14,0,16,48 c C Init QTPA W4 t 1,6,16,0,9 t 1,6,16,0,26 f 1,6,16,0,16,48 c C Init QTPA E4 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,13,1,24 t 3,3,15,1,24 t 3,3,17,1,24 t 3,3,19,1,24 t 3,3,21,1,24 c wait 10-20 msec user_procedure 2 c set threshold MOD 1 7 streamer + 7 scintillators (streamer+scintill*16) setnoq f 3,3,13,0,17,119 t 3,3,13,1,26 t 3,3,13,1,25 c set threshold MOD 2 7 streamer + 7 scintillators (streamer+scintill*16) f 3,3,15,0,17,119 t 3,3,15,1,26 t 3,3,15,1,25 c set threshold MOD 3 7 streamer + 7 scintillators (streamer+scintill*16) f 3,3,17,0,17,119 t 3,3,17,1,26 t 3,3,17,1,25 c set threshold MOD 4 7 streamer + 7 scintillators (streamer+scintill*16) f 3,3,19,0,17,119 t 3,3,19,1,26 t 3,3,19,1,25 c set threshold MOD 5 7 streamer + 7 scintillators (streamer+scintill*16) f 3,3,21,0,17,119 t 3,3,21,1,26 t 3,3,21,1,25 setq c c********************CLEAR LATERAL ST MONOPOLE TRIGGER (FEB 6 95) 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,1,0,9 t 1,1,3,0,9 C c************************************************ c c *** Init lateral monopole trigger C t 3,1,13,0,2 C t 3,1,15,0,2 c t 3,1,17,0,2 c t 3,1,19,0,2 c *** monopole WFD C t 1,1,22,0,9 c *** TDC *** t 1,2,11,0,9 t 1,2,3,0,9 C ****** RESET SCALER 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 reset trip recovery routine user_procedure 8 c sm3-4 hv turned off and interface code here commented out SLN 4 nov 91 c ****** C.. Reset LeCroy HV interface (branch 2, crate 7, slot 13): T 2,7,13,0,9 C **** C scint pattern unit initialization t 2,7,15,0,11 C **** C ERP initialization here C------------------------------- C ERP SYSTEM initialization C------------------------------- C C ASSUMES THAT ERP SYSTEM IN BRANCH 2 SM3 CRATE 6 SM4 CRATE 5 C ERP TRIGGER MODULES IN CRATE 5+6 SLOTS 1-20 C SUPERVISOR MODULE IN CRATE 5+6 SLOT 21 C C CLEAR MUON (11) AND GC(9) BUFFER COUNTERS FOR EVEN SM C T 2,6,21,0,9 T 2,6,21,0,11 C C CLEAR MUON (11) AND GC(9) BUFFER COUNTERS FOR ODD SM C T 2,5,21,0,9 T 2,5,21,0,11 C Clear TDC for interSM ERP timing. T 2,6,22,0,9 c *************************************************************** c CIT MONOPOLE INIT SET24 setnoq C --initialize li F 2,1,13,5,17,$100004 F 2,1,13,3,17,$100004 F 2,1,13,4,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,1,13,5,17,$100001 F 2,1,13,3,17,$100001 F 2,1,13,4,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,1,13,5,16,$040AEA F 2,1,13,3,16,$040AEA F 2,1,13,4,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--INITIALIZE CALTECH LATCHES T 2,1,12,0,9 T 2,3,12,0,9 C C ---------------CSPAM/FMT INITIALIZATION------------------------ C C C. LANE 4 JAN 94 -- UVAX 2: SM3+4 C --NB: this uses the new scint pattern unit in crate 7-- C C STATION 1: 7106 DISC: (4B)(3B)(4C)(3C) HIPT C STATION 3: 7106 DISC: (4W)(3W)(4E)(3E) HIPT C STATION 5: 7106 DISC: (4T)(3T)(XX)(XX) HIPT C STATION 7: 7106 DISC: (4B)(3B)(4C)(3C) CSPAM/FMT C STATION 9: 7106 DISC: (4W)(3W)(4E)(3E) CSPAM/FMT C STATION 11: 7106 DISC: (4T)(3T)(XX)(XX) CSPAM/FMT C C STATION 13: FMT : (3B)(4B)(3C)(4C) CSPAM/FMT C STATION 14: FMT : (3W)(4W)(3E)(4E) CSPAM/FMT C STATION 15: FMT : (3T)(4T)(3T)(4T) CSPAM/FMT+HIPT C STATION 16: FMT : (3B)(4B)(3C)(4C) HIPT C STATION 17: FMT : (3W)(4W)(3E)(4E) 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 5 Apr 1995 CEL: lower vertical thresholds (cspam & hipt) to 150mV C 8 apr 1995 CEL: lower vertical thresholds (cspam & hipt) to 140mV C C CHANNEL MASKS setnoq F 2,4,1,0,16,$FFFF F 2,4,3,0,16,$FFFF F 2,4,5,0,16,$FFFF F 2,4,7,0,16,$FFFF F 2,4,9,0,16,$FFFF F 2,4,11,0,16,$FFFF C THRESHOLDS F 2,4,1,0,17,190 F 2,4,3,0,17,130 F 2,4,5,0,17,190 F 2,4,7,0,17,190 F 2,4,9,0,17,130 F 2,4,11,0,17,190 setq C TURN ON REMOTE MODE T 2,4,1,0,26 T 2,4,3,0,26 T 2,4,5,0,26 T 2,4,7,0,26 T 2,4,9,0,26 T 2,4,11,0,26 C START FMT CLOCKS T 2,4,13,0,9 T 2,4,14,0,9 T 2,4,15,0,9 T 2,4,16,0,9 T 2,4,17,0,9 C CLEAR ACTIVITY LATCHES T 2,4,13,0,10 T 2,4,14,0,10 T 2,4,15,0,10 T 2,4,16,0,10 T 2,4,17,0,10 C C--------------------END CSPAM/FMT INITIALIZATION--------------- C C ---------------------------------------------------------------------- C Initialization for LIP C ---------------------------------------------------------------------- C BAD CRATE T 2,2,2,0,9,1 T 2,3,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,18,8,16,$000000 F 2,3,18,9,16,$100000 F 2,3,18,10,16,$700000 F 2,3,18,11,16,$200000 F 2,3,18,8,17,$000000 F 2,3,18,9,17,$100000 F 2,3,18,10,17,$700000 F 2,3,18,11,17,$200000 T 2,3,18,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,18,0,19 USER_PROCEDURE 2 C C ------------------------------------------------------------------------ C WFD initialization: C ------------------------------------------------------------------------ VME32 C ETK5 WFD_MAP 1,2,$3000000,3 WFD_MAP 1,3,$4000000,4 C ------------------------------------------------------------------------ C Set the WFD thresholds: C This also takes cards out of Read_Write mode C ------------------------------------------------------------------------ C ETK5 VME32 C ETK5 WFD_THRESH 3,0,4,10 C ETK5 WFD_THRESH 3,1,4,10 C ETK5 WFD_THRESH 3,2,4,10 C ETK5 WFD_THRESH 3,3,4,10 C ETK5 WFD_THRESH 3,4,4,10 C ETK5 WFD_THRESH 3,5,4,10 C ETK5 WFD_THRESH 3,6,4,10 C ETK5 WFD_THRESH 3,7,4,10 C ETK5 WFD_THRESH 3,8,4,10 C ETK5 WFD_THRESH 3,9,4,10 C ETK5 WFD_THRESH 3,10,4,10 C ETK5 WFD_THRESH 3,11,4,10 C ETK5 WFD_THRESH 3,12,4,10 C ETK5 WFD_THRESH 3,13,4,10 C ETK5 WFD_THRESH 3,14,4,10 C ETK5 WFD_THRESH 3,15,4,10 C ETK5 WFD_THRESH 3,16,4,10 C ETK5 WFD_THRESH 3,17,4,10 C ETK5 WFD_THRESH 3,18,4,10 C ETK5 WFD_THRESH 3,19,4,10 C ETK5 WFD_THRESH 3,20,4,10 C ETK5 WFD_THRESH 3,21,4,10 C ETK5 WFD_THRESH 3,22,4,10 C ETK5 WFD_THRESH 3,23,4,10 C ETK5 WFD_THRESH 3,24,4,10 C ETK5 WFD_THRESH 3,25,4,10 C ETK5 WFD_THRESH 3,26,4,10 C ETK5 WFD_THRESH 3,27,4,10 C ETK5 WFD_THRESH 3,28,4,10 C ETK5 WFD_THRESH 3,29,4,10 C ETK5 WFD_THRESH 3,30,4,10 C ETK5 WFD_THRESH 3,31,4,10 C ETK5 WFD_THRESH 3,32,4,10 C ETK5 WFD_THRESH 3,33,4,10 C ETK5 WFD_THRESH 3,34,4,10 C ETK5 WFD_THRESH 3,35,4,10 C ETK5 WFD_THRESH 3,36,4,10 C ETK5 WFD_THRESH 3,37,4,10 C ETK5 WFD_THRESH 3,38,4,10 C ETK5 WFD_THRESH 3,39,4,10 WFD_THRESH 4,0,4,10 WFD_THRESH 4,1,4,10 WFD_THRESH 4,2,4,10 WFD_THRESH 4,3,4,10 WFD_THRESH 4,4,4,10 WFD_THRESH 4,5,4,10 WFD_THRESH 4,6,4,10 WFD_THRESH 4,7,4,10 WFD_THRESH 4,8,4,10 WFD_THRESH 4,9,4,10 WFD_THRESH 4,10,4,10 WFD_THRESH 4,11,4,10 WFD_THRESH 4,12,4,10 WFD_THRESH 4,13,4,10 WFD_THRESH 4,14,4,10 WFD_THRESH 4,15,4,10 WFD_THRESH 4,16,4,10 WFD_THRESH 4,17,4,10 WFD_THRESH 4,18,4,10 WFD_THRESH 4,19,4,10 WFD_THRESH 4,20,4,10 WFD_THRESH 4,21,4,10 WFD_THRESH 4,22,4,10 WFD_THRESH 4,23,4,10 WFD_THRESH 4,24,4,10 WFD_THRESH 4,25,4,10 WFD_THRESH 4,26,4,10 WFD_THRESH 4,27,4,10 WFD_THRESH 4,28,4,10 WFD_THRESH 4,29,4,10 WFD_THRESH 4,30,4,10 WFD_THRESH 4,31,4,10 WFD_THRESH 4,32,4,10 WFD_THRESH 4,33,4,10 WFD_THRESH 4,34,4,10 WFD_THRESH 4,35,4,10 WFD_THRESH 4,36,4,10 WFD_THRESH 4,37,4,10 WFD_THRESH 4,38,4,10 WFD_THRESH 4,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,18,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 c now read setq 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 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,1,4,0,2,1 fqignore 3,1,4,1,2,1 t 3,1,4,0,28 fqignore 3,1,7,0,2,1 fqignore 3,1,7,1,2,1 t 3,1,7,0,28 fqignore 3,1,10,0,2,1 fqignore 3,1,10,1,2,1 t 3,1,10,0,28 fqignore 3,1,13,0,2,1 fqignore 3,1,13,1,2,1 t 3,1,13,0,28 fqignore 3,1,16,0,2,1 fqignore 3,1,16,1,2,1 t 3,1,16,0,28 eoe c ************ Read in QSCAN mode STAS modules of III s.m. EQUIP 3 c in b=3 c=3 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 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 eoe c ************ Read in QSCAN mode STAS modules of IV s.m. EQUIP 4 c in b=3 c=4 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 eoe c c *********************QTP ************************** c equip 5 set16 c Mod # 5 wait_q 3,6,1,0,8,1 qstop 3,6,1,0,2,3000 t 3,6,1,0,9 c WEST Smod # 3 wait_q 3,6,3,0,8,1 qstop 3,6,3,0,2,3000 t 3,6,3,0,9 c EAST Smod # 3 wait_q 3,6,5,0,8,1 qstop 3,6,5,0,2,3000 t 3,6,5,0,9 c Attico Smod # 3 wait_q 3,6,10,0,8,1 qstop 3,6,10,0,2,3000 t 3,6,10,0,9 c Attico WEST 3 wait_q 3,6,12,0,8,1 qstop 3,6,12,0,2,3000 t 3,6,12,0,9 c Attico EAST 3 wait_q 3,6,14,0,8,1 qstop 3,6,14,0,2,3000 t 3,6,14,0,9 c Mod # 6 wait_q 1,6,1,0,8,1 qstop 1,6,1,0,2,3000 t 1,6,1,0,9 c Mod # 7 wait_q 1,6,3,0,8,1 qstop 1,6,3,0,2,3000 t 1,6,3,0,9 c Mod # 8 wait_q 1,6,5,0,8,1 qstop 1,6,5,0,2,3000 t 1,6,5,0,9 c WEST Smod # 4 wait_q 1,6,7,0,8,1 qstop 1,6,7,0,2,3000 t 1,6,7,0,9 c EAST Smod # 4 wait_q 1,6,9,0,8,1 qstop 1,6,9,0,2,3000 t 1,6,9,0,9 c Attico Smod # 4 wait_q 1,6,14,0,8,1 qstop 1,6,14,0,2,3000 t 1,6,14,0,9 c Attico WEST 4 wait_q 1,6,16,0,8,1 qstop 1,6,16,0,2,3000 t 1,6,16,0,9 c Attico EAST 4 wait_q 1,6,18,0,8,1 qstop 1,6,18,0,2,3000 t 1,6,18,0,9 eoe C ************* MONOPOLE ********* C C C*********** LATERAL STREAMER MONOPOLE **************** C EQUIP 12 setnoq F 1,1,6,0,0 F 1,1,6,1,0 F 1,1,6,2,0 F 1,1,8,0,0 F 1,1,8,1,0 F 1,1,8,2,0 F 1,1,10,0,0 F 1,1,10,1,0 F 1,1,10,2,0 F 1,1,12,0,0 F 1,1,12,1,0 F 1,1,12,2,0 F 1,1,14,0,0 F 1,1,14,1,0 F 1,1,14,2,0 F 1,1,16,0,0 F 1,1,16,1,0 F 1,1,16,2,0 F 1,1,18,0,0 F 1,1,18,1,0 F 1,1,18,2,0 F 1,1,20,0,0 F 1,1,20,1,0 F 1,1,20,2,0 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 C****************************************************** C C c streamer monopole trigger configuration equip 7 set16 f 3,1,1,0,2 fqstop 3,3,13,1,2,321 fqstop 3,3,15,1,2,321 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,13,0,2,1 C fqignore 3,1,15,0,2,1 c fqignore 3,1,17,0,2,1 c fqignore 3,1,19,0,2,1 eoe c *** monopole WFD c equip x c 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 set16 setq 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 general reset at end of event equip 16 C clear ST lateral monopole trigger 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 C c 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,1,4,0,28 t 3,1,7,0,28 t 3,1,10,0,28 t 3,1,13,0,28 t 3,1,16,0,28 c monopole t 3,1,1,0,2 t 3,1,13,0,2 t 3,1,15,0,2 c t 3,1,17,0,2 c t 3,1,19,0,2 C monopole WFD c T 1,1,22,0,9 c TDC t 1,2,11,0,9 t 1,2,3,0,9 C SCINTILLATOR PATTERN UNIT c T 2,7,15,0,9 ! reset of SPU moved to equip 32 eoe C ----------------------------------------------------------------------- C ERP MUON BUFFER SM-4 (Equipment 20) C ----------------------------------------------------------------------- EQUIP 20 c select register from Trigger Master selreg 2,7,15,0,0 sect 8 C following to wait for digitization since we use E_HIGH, not EH_TRIG wait_q 2,5,21,0,10,1 F 2,5,21,0,0 C READ IN MUON BUFFER (MAX DMA LENGTH = 22 MODS * 4 CH/MOD * 10 WORDS/CH) QSTOP 2,5,21,3,0,900 WFD_PATREG 4,20,0 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 C ERP GC end of run, SM3 and SM4 EQUIP 31 C Issue F(24) command to supervisors T 2,6,21,0,24 T 2,5,21,0,24 C READ IN ENTIRE GC BUFFER, SM3 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, SM4 QIGNORE 2,5,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,5,21,0,9 EOE C ERP GC, SM4 EQUIP 21 c select register from Trigger Master selreg 2,7,15,0,0 sect 10 C Issue F(24) command to supervisor T 2,5,21,0,24 c wait 10-20 msec C user_procedure 2 C READ IN ENTIRE GC BUFFER QIGNORE 2,5,21,2,0,8184 C CLEAR MUON AND GC BUFFER COUNTERS T 2,5,21,0,9 EOS EOE C ----------------------------------------------------------------------- C ERP MUON BUFFER SM-3 (Equipment 22) C ----------------------------------------------------------------------- EQUIP 22 c select trigger master selreg 2,7,15,0,0 sect 7 C READ NUMBER OF WORDS IN MUON BUFFER c Needed because we are using E_h instead of E_h_trig. Wait for digitization wait_q 2,6,21,0,10,1 F 2,6,21,0,0 c C c C READ IN MUON BUFFER (MAX DMA LENGTH = 22 MODS * 4 CH/MOD * 10 WORDS/CH) QSTOP 2,6,21,3,0,900 WFD_PATREG 3,20,0 C ISSUE CLEAR TO SUPERVISOR TO CLEAR EVENT 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 C ----------- C ERP GC, SM3 C ----------- EQUIP 23 c select trigger master selreg 2,7,15,0,0 sect 9 C Send CAMAC F(24) to supervisor T 2,6,21,0,24 c wait 10-20 msec C user_procedure 2 C READ IN ENTIRE GC BUFFER 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 intermodule tdc C ----------------------------------------------------------------------- equip 33 F 2,6,22,0,0,8 T 2,6,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 3,0,4 WFD_PATREG 4,0,4 C ------------------------------------------------------------------------- C Clear WFD STOP master C ------------------------------------------------------------------------ T 2,7,18,0,9 T 2,3,18,0,9 C *** issue START to WFD using TRIG OUT of STOP MASTER C ---------------------------------------------------- T 2,7,18,0,10 T 2,3,18,0,10 EOE C ----------------------------------------------------------------------- C C -------------------CSPAM/FMT---------------------------- C C C. LANE 4 JAN 94 FOR UV2 C C READ FMT MODULE ACTIVITY REGISTERS FOR SM3+4 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 (non funzione, 4/95) C subid = 100*(uvax) + (supermodule pair) C C FOR HIPT SAME SCHEME, BUT MULTIPLY * 10 (bigger thresholds, eh?) C EQUIP 30 WFD_PATREG 3,30,0 SETNOQ F 2,4,13,0,0 F 2,4,14,0,0 F 2,4,15,0,0 F 2,4,16,0,0 F 2,4,17,0,0 SETQ T 2,4,13,0,0 T 2,4,14,0,0 T 2,4,15,0,0 T 2,4,16,0,0 T 2,4,17,0,0 C C selective WFD readout, based on spu C C bit1: fmt34 "full" wfd (sm=3) sid=234 C bit5: csp34 "full" wfd (sm=3) sid=234 change sm->9 for window wfd C bit11: fmt23 "full" wfd (sm=3) sid=223 C bit12: csp23 "full" wfd (sm=3) sid=223 change sm->9 for window wfd C bit13: fmt45 "full" wfd (sm=4) sid=245 C bit14: csp45 "full" wfd (sm=4) sid=245 change sm->10 for window wfd C SELREG 2,7,15,0,0 SECT 1 WFD_PATREG 3,30,234 SECT 5 WFD_PATREG 3,30,234 SECT 11 WFD_PATREG 3,30,223 SECT 12 WFD_PATREG 3,30,223 SECT 13 WFD_PATREG 4,30,245 SECT 14 WFD_PATREG 4,30,245 EOS C C hipt triggers on word 1 of spu C C bit3: hip34 "full" wfd (sm=3) sid=2340 C bit4: hip23 "full" wfd (sm=3) sid=2230 C bit5: hip45 "full" wfd (sm=4) sid=2450 C SELREG 2,7,15,1,0 SECT 3 WFD_PATREG 3,30,2340 SECT 4 WFD_PATREG 3,30,2230 SECT 5 WFD_PATREG 4,30,2450 EOS C --------------------------END OF CSPAM WFD--------------------- EOE C C CSPAM/FMT/HIPT SCINTILLATOR RATE MONITOR C READ OUT WITH CSPAM (MUON) C EQUIP 34 SET24 FQSTOP 2,4,13,0,2,1000 FQSTOP 2,4,14,0,2,1000 FQSTOP 2,4,15,0,2,1000 FQSTOP 2,4,16,0,2,1000 FQSTOP 2,4,17,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 SM3 SET16 FQIGNORE 2,1,12,0,0,1 FQIGNORE 2,1,12,1,0,1 WFD_PATREG 3,27,1 FQIGNORE 2,1,12,2,0,1 FQIGNORE 2,1,12,3,0,1 WFD_PATREG 3,27,2 FQIGNORE 2,1,12,4,0,1 FQIGNORE 2,1,12,5,0,1 WFD_PATREG 3,27,3 T 2,1,12,0,9 C --- CIT LATCH ON SM4 FQIGNORE 2,3,12,0,0,1 FQIGNORE 2,3,12,1,0,1 WFD_PATREG 4,27,1 FQIGNORE 2,3,12,2,0,1 FQIGNORE 2,3,12,3,0,1 WFD_PATREG 4,27,2 FQIGNORE 2,3,12,4,0,1 FQIGNORE 2,3,12,5,0,1 WFD_PATREG 4,27,2 T 2,3,12,0,9 EOE C C ---------------------------------------------------------------------- C LIP equipment (Equipment 14) C ---------------------------------------------------------------------- EQUIP 14 C BAD CRATE SET16 C BAD CRATE SETQ C BAD CRATE SELREG 2,7,15,1,0 C BAD CRATE SECT 1 C BAD CRATE F 2,2,2,0,0 C BAD CRATE F 2,2,2,1,0 C BAD CRATE WFD_PATREG 3,14,1 C BAD CRATE F 2,2,2,2,0 C BAD CRATE F 2,2,2,3,0 C BAD CRATE WFD_PATREG 3,14,2 C BAD CRATE F 2,2,2,4,0 C BAD CRATE F 2,2,2,5,0 C BAD CRATE WFD_PATREG 3,14,3 C BAD CRATE T 2,2,2,0,9 C BAD CRATE EOS EOE C ---------------------------------------------------------------------- C LIP equipment (Equipment 15) C ---------------------------------------------------------------------- EQUIP 15 SET16 SETQ SELREG 2,7,15,1,0 SECT 2 F 2,3,2,0,0 F 2,3,2,1,0 WFD_PATREG 4,14,1 F 2,3,2,2,0 F 2,3,2,3,0 WFD_PATREG 4,14,2 F 2,3,2,4,0 F 2,3,2,5,0 WFD_PATREG 4,14,3 T 2,3,2,0,9 EOS EOE C ------------------------------------------------------------------------ C WFD STOP Master (Equipment 40) C ------------------------------------------------------------------------ EQUIP 40 SETQ SET16 C *** SM-3 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-4 STOP Master data: WAIT_Q 2,3,18,0,2,1 C *** trigger pattern F 2,3,18,0,3 C *** trigger time for TOHM, ERP, ST_MNP, FMT, CSPAM, LIP, HIPT, SPARE F 2,3,18,0,2 F 2,3,18,1,2 F 2,3,18,2,2 F 2,3,18,3,2 F 2,3,18,4,2 F 2,3,18,5,2 F 2,3,18,6,2 F 2,3,18,7,2 C *** SMP trigger register of some sort F 2,3,18,0,5 C *** trigger time for Caltech SMP: C,B,W,E,N/S,T,SM-1,SM+1 F 2,3,18,2,4 F 2,3,18,3,4 F 2,3,18,4,4 F 2,3,18,5,4 F 2,3,18,6,4 F 2,3,18,7,4 F 2,3,18,1,4 F 2,3,18,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,18,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 3,0,0 WRITEHEX $000000 WFD_PATREG 3,0,3 C *** Repeat for SM-6 C *** --------------- WFD_PATREG 4,0,0 WRITEHEX $1FFFFF WFD_PATREG 4,0,3 C *** Execute readout. Arguments are SM, SELECT, NTICS, BYTE_LIMIT C *** ------------------------------------------------------------ C ETK5 WFD_READOUT 3,0,210000,16000 WFD_READOUT 4,0,210000,16000 EOE C ----------------------------------------------------------------------- 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 equip 53 c test streamer monopole circuit *** c set veto t 1,2,2,2,25 c mod 1 t 3,3,13,1,24 t 3,3,13,2,25 wait_q 3,3,13,2,8,1 fqignore 3,3,13,2,2,1 t 3,3,13,2,10 t 3,3,13,1,26 t 3,3,13,1,25 c mod 2 t 3,3,15,1,24 t 3,3,15,2,25 wait_q 3,3,15,2,8,1 fqignore 3,3,15,2,2,1 t 3,3,15,2,10 t 3,3,15,1,26 t 3,3,15,1,25 c mod 3 t 3,3,17,1,24 t 3,3,17,2,25 wait_q 3,3,17,2,8,1 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 4 t 3,3,19,1,24 t 3,3,19,2,25 wait_q 3,3,19,2,8,1 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 5 t 3,3,21,1,24 t 3,3,21,2,25 wait_q 3,3,21,2,8,1 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 t 1,2,2,2,10 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 34 CSPAM) f 2,4,23,0,5 f 2,4,23,1,5 f 2,4,23,2,5 f 2,4,23,3,5 f 2,4,23,4,5 f 2,4,23,5,5 f 2,4,23,6,5 f 2,4,23,7,5 c write and read 0 f 2,4,23,0,20,0 f 2,4,23,0,4 qrepeat 2,4,23,0,4,10 c write FFFF f 2,4,23,0,20,$FFFF f 2,4,23,0,4 qrepeat 2,4,23,0,4,10 c DSP in branch 2 crate 5 station 23 (SM 4 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 3 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 (III SMOD) C **************************************** EQUIP 55 c set bit in a PU to exclude terminal f 1,2,4,0,16,384 c put 2 sec wait to allow the vms to receive record 2 sec after uvax#1 user_procedure 3 c April 10 1990 changed crate_nbr (FR) c HV - crate_nbr = 3 c select target (= group + crate_nbr * 256 ) / (group=50 [ ALL ])... f 1,2,1,0,17,818 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= LeCroy PMT High Voltage Periodic Monitor: SM 3&4 C= C= ? ? Author C= Nat Longley 15NOV94 Updated channel map, cleaned up code. C============================================================================== C.. Equipment number for SM 3: EQUIP 56 C C.. Reset interface (Branch 2, Crate 7, Slot 13): T 2,7,13,0,9 C C.. Select Mainframe MF=3, CHmin=48 (D=CHmin*256+MF*16): F 2,7,13,0,16,12336 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 3: EOE C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C.. Equipment number for SM 4: EQUIP 60 C C.. Reset interface (Branch 2, Crate 7, Slot 13): T 2,7,13,0,9 C C.. Select Mainframe MF=4, CHmin=48 (D=CHmin*256+MF*16): F 2,7,13,0,16,12352 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 4 and periodic PMT HV monitor routine: EOE C============================================================================== c **************************************** c Periodic monitor of CAEN HV (IV SMOD) C **************************************** EQUIP 58 F 1,2,4,0,16,384 user_procedure 2 c HV - crate_nbr = 4 c select target (= group + crate_nbr * 256 ) / (group=50 [ ALL ])... f 1,2,1,0,17,1074 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 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 = 8 c select target (= group + crate_nbr * 256 ) / (group=50 [ ALL ])... f 1,2,1,0,17,2098 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 reset run bit f 1,2,4,0,16,0 c set veto f 1,2,2,2,25 eoe c **************** TRIGGERS ******************* C ---------------------------------------------------------------------- C TRIGGER 2+16: ERP MUON C---------------------------------------------------------------------- TRIG 18 EQUIP 1 EQUIP 3 EQUIP 4 EQUIP 5 EQUIP 9 EQUIP 10 EQUIP 11 EQUIP 20 EQUIP 22 EQUIP 33 EQUIP 40 EOT c trigger 4+ 16 BARI trigger module trig 20 EQUIP 1 Equip 2 Equip 3 equip 4 equip 5 equip 9 equip 10 EQUIP 11 eot c Trigger 5+ 16: ERP grav. collapse SM3 trig 21 equip 1 EQUIP 11 equip 21 equip 23 c EQUIP 34 :moved to CSPAM-muon readout, as suggested by A.Habig (14/5/94, A.S.) eot c Trigger 6 + 16: streamer lateral monopole trigger trig 22 equip 1 equip 3 equip 4 equip 5 equip 12 c equip 7 equip 9 equip 10 equip 11 eot C ---------------------------------------------------------------------- C TRIGGER 7+16: CALTECH MONOPOLE TRIGGER IN SM5&6 C ---------------------------------------------------------------------- TRIG 23 EQUIP 1 EQUIP 11 EQUIP 27 EQUIP 40 EOT c Trigger 10 + 16: streamer horizontal monopole trigger trig 26 equip 1 equip 3 equip 4 equip 5 c equip 6 equip 7 equip 9 equip 10 EQUIP 11 eot C ---------------------------------------------------------------------- C TRIGGER 12+16: CSPAM FAST MONOPOLE TRIGGER (FMT) C ---------------------------------------------------------------------- TRIG 28 EQUIP 1 EQUIP 3 EQUIP 4 EQUIP 5 EQUIP 9 EQUIP 10 EQUIP 11 EQUIP 30 EQUIP 40 EOT C ---------------------------------------------------------------------- C TRIGGER 13+16: CSPAM MUON TRIGGER C ---------------------------------------------------------------------- TRIG 29 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+16: HIPT MONOPOLE TRIGGER C ---------------------------------------------------------------------- TRIG 30 EQUIP 1 EQUIP 3 EQUIP 4 EQUIP 5 EQUIP 9 EQUIP 10 EQUIP 11 EQUIP 30 EQUIP 40 EOT C ---------------------------------------------------------------------- C TRIGGER 8+16: LIP C ---------------------------------------------------------------------- TRIG 24 EQUIP 1 EQUIP 11 EQUIP 40 EQUIP 14 EQUIP 15 EOT C TRIGGER 16 + 16: event with uVAX #1 and # 2 trig 32 equip 1 equip 11 eot C TRIGGER 16 + 15: event with uVAX #3 and # 2 trig 31 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 trigger 53 readout in case of alarm trig 53 equip 1 equip 52 eot c TRIGGER 54 (monitor readout) trig 54 equip 1 c removed to test if interference with numeration FR c 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 End of run ERP GC readout equip 31 c test monopole circuit trigger equip 53 equip 59 eot