K. Ehret/S. Spratte 20.1.99 Updated Eventformat for HERA-B Target_daq in 1999 ================================================= Preliminary eventformat for 1999 target test measurements. Some stuff is yet not finally settled, therefore some fields are open. Not everything is yet connected or brought to the readout program. It's in principial the same scheme we already used during the last years, which is adopted to the old ARGUS event format. All ambitious stuff like different flags etc. is no longer supported. ************************************************ !!! Please let us know, if you find any bugs !!! ************************************************ Global structure ---------------- - sequential dataformat, one file per run (length+1),data(1:length); (length+1),data(1:length); .... \ \ \__ 1.event \__ 2.event .... data: 16bit field, unformatted Event format (data) ------------------- general scheme: - - - - - - - - several banks are used for different information, the first bank (pointer table) with also variable length (=^ pointer(1)-1) defines the pointer to the individual banks, actual number of pointers 10 pointer(i)=data(i), i=1,10 e.g. data(pointer(2)) ==> first word of adc-bank; if pointer equal zero ==> bank didn't exist the 'zero'th" word of each bank gives the length of the individual bank followed by the bank content, the first word of the real bank showes usally a status flag, which gives e.g. the actual configuration. pointer(1) --> header pointer(2) --> camac-adc e.g. data(pointer(2))=length af adc-bank pointer(3) --> camac-tdc | data(pointer(2)+1) pointer(4) --> camac-misc. | ..... pointer(5) --> scaler | data(pointer(2)+length) pointer(6) --> ext. info: hera, tcc | pointer(7) --> tms pointer(8) --> fadcs pointer(9) --> additional stuff: R-wire, HV, ... pointer(10) --> spare header bank - - - - - - word | meaning --------------------------------------------------------------- 0 length of bank [16] 1 | mod(run-nr,2048) + (ievent/32768)*2048 2 | mod(event-nr,32768) 3 | year (last 2 digits) *100 + month 4 | day *100 + hour (given in GMT - no summer time) 5 | minutes *100 + seconds 6 | unixtime%10000 7 | aboveI wireposition - (2um) \ 8 | belowI wireposition - (2um) \ 9 | innerI wireposition - (2um) \ 10 | outerI wireposition - (2um) \ read from target status file: 11 | aboveII wireposition - (2um) / 12 | belowII wireposition - (2um) / tacos.sinfo 13 | innerII wireposition - (2um) / (not included) 14 | outerII wireposition - (2um) / 15 | trigger type: 1.bit-all&1.bx; 2.bit-random; 3.bit-source | 4.bit-other trigger -> 5.-9.bit | 10.bit-other bx -> 11.-16.bit (not in use) 16 | setup status: 1.bit: TMS-adc; 2.bit: gated scaler; 3.bit: FADC | (cflag) camac-adc bank - - - - - - - word | meaning -------------------------------------------------------------- 0 length of bank [37] 1 | status flag: 2-9 | hodoscope counters: s1,l1 ... s4,l4 | (CAMAC: n1: a0...a5,a8,a7) 10-17 | veto counters: vc1/5 - vc48 | (CAMAC: n2: a0...a7) 18-25 | broken ADC 26-37 | spare (CAMAC: n1,2,3: a8...a11) camac-tdc bank - - - - - - - word | meaning -------------------------------------------------------------- 0 length of bank [49] 1 | status flag: cp. adc-bank 2-9 | spare | (CAMAC: n4 : a0...a7) 10-17 | hodoscope counters: s1,l1 ... s4,l4 | (CAMAC: n5: a0...a7) 18-25 | veto counters: vc1/5 - vc48 (CAMAC: n6: a1...a7) 26-33 | 250ps/div (CAMAC: n7) 34-41 | 500ps/div (CAMAC: n8) 42-49 | 50ps/div (CAMAC: n9) camac-misc bank - - - - - - - - word | meaning --------------------------------------------------------------- 0 length of bank [10] 1 | status flag [-97] camac-scaler bank - - - - - - - - - (will be read out approx. every second) word | meaning ------------------------------------------------------------- 0 length of bank [62] 1 | status flag 2 | time between last scaler readout in .001 seconds 3-6 | spare 7-14 | s1...s4,l1...l4 (CAMAC: n11: a0...a11) 15-18 | spare (CAMAC: n12: a0-a3) rates 19 | f1 (CAMAC: n12: a4) >0 - in 10 Hz 20-22 | spare (CAMAC: n12: a5...a7) <0 - in kHz 23 | veto (CAMAC: n12: a8) 24,25 | spare (CAMAC: n12: a9,a10) 26 | bx (CAMAC: n12: a11) 27-38 | spare (CAMAC: n13: a0...a11) 39-46 | Si-Tel: b1,b2,o1,o2,a1,a2,i1,i2 | (CAMAC: n14: a0...a7) 47-50 | spare (CAMAC: n14: a8...a11) 51-58 | Si-Pad: C1-3,C2-4,D1-3,D2-4,A1-3,A2-4,B1-3,B2-4 | (CAMAC: n15: a0...a7) 59-62 | spare (CAMAC: n14:a8...a11) external-info bank - - - - - - -- - - -> no longer supported - no data in there in 1999 - tcc-info: /d1/hbwire/target_data/tacos.sinfo is the only relevant external info which is accessed word | meaning ------------------------------------------------- 0 length of bank 1 | status flag 2-33 | target-rates: (10Hz/kHz) - from tacos.sinfo tms bank - - - - ! not installed in 1999 ! word | meaning ------------------------------------------------------------ 0 length of bank 1 | status flag 2 | time constant for readout given at start 3,4 | I I-stations, I II-stations [nA] 5-8 | yet empty 9,10 | nx,ny 11- | histo(x,y), x=1,nx y=1,ny if<0: *-100 10+nx*ny | | fadc bank - - - - - word | meaning ----------------------------------------------------------- 0 length of bank 1 | status flag 2 | number of semimodules (12) | the number of samples is definned by: | N_SAMPLES = (fadc_bank_length - 3) / (2 * number_semimod) 3... | data; 1 byte per channel and sample | ch 1- 8: s1...s4,l1...l4 (analog) | ch 9-16: vci (analog) | ch 17-18: f1,bx (digital) | ch 19-32: | ch 33-40: | ch 41-48: additional stuff - - - - - - - - (not yet definned: R-wire, temperature, hv, fast fadc's)) word | meaning ------------------------------------------------- 0 length of bank 1... | spare bank - - - - - (actually used for some checks of online data and to find next event in corrupted data set) word | meaning ------------------------------------------------- 0 length of bank [5] 1-5 | -1, 0, -1, 1, 2