====== Top level packet tags ====== The top level packet tags are defined as (C code): #define S800_VERSION 0x0004 #define S800_PACKET 0x5800 #define S800_TRIGGER_PACKET 0x5801 #define S800_TOF_PACKET 0x5802 #define S800_TIMESTAMP_PACKET 0x5803 #define S800_FP_SCINT_PACKET 0x5810 #define S800_FP_IC_PACKET 0x5820 #define S800_FP_TIME_PACKET 0x5830 #define S800_FP_CRDC_PACKET 0x5840 #define S800_II_CRDC_PACKET 0x5850 #define S800_TA_PIN_PACKET 0x5860 #define S800_II_TRACK_PACKET 0x5870 #define S800_II_PPAC_PACKET 0x5880 #define S800_OB_SCINT_PACKET 0x5890 #define S800_OB_PIN_PACKET 0x58A0 #define S800_FP_HODO_PACKET 0x58B0 ====== Detailed description of each packet tag ====== This section gives details on how to unpack the data associated with each packet tag. The format of the data for each packet tag is frozen as of version 4 of the S800 data format. Further modifications to data associated with a particular detector will result in a new packet tag being defined. Please see the [[S800 data format#Versioning system|versioning system]] section for more details. ===== S800_TRIGGER_PACKET ===== Data read from the Lecroy 2367 ULM module and a Phillips 7186H TDC. One trigger pattern followed by up to four times. Format: 0xpppp 0xcttt 0xcttt ... where p is the trigger pattern, c is the channel within the TDC and t the data. ^ Time data ^ TDC Channel | |S800 source|8| |External1 source|9| |External2 source|10| |Secondary source|11| ===== S800_TOF_PACKET ===== Times read from both a Phillips 7186H TDC and an Ortec 566 TAC digitized by a Phillips 7164 ADC. Format: 0xcttt ... ^ Time data ^ TDC channel ^ TAC channel | |RF|12| | |Object Scintillator|13|5| |XFP Scintillator|14|4| |Si|15| | ===== S800_SCINT_PACKET ===== Energies and times of the focal plane scintillator, read from a Lecroy 4300B FERA and a Phillips 7186H TDC. A non-zero energy generates an energy and time pair. Format: 0xceee 0xcttt ... ^ Detector signal ^ Channel | |E1 Up|0| |E1 Down|1| |E2 Up|2| |E2 Down|3| |E3 Up|4| |E3 Down|5| ===== S800_FP_IC_PACKET ===== Zero suppressed energies from the ionization chamber, read from a Phillips 7164 ADC. Format: 0xceee ... ===== S800_FP_CRDC_PACKET ===== Data from the two S800 CRDCs in the form of digitized waveform samples read from the Jtec XLM72V ULM, and anode energies and times read from a Phillips 7164 ADC. These packet data contain sub packets. The S800_FP_CRDC_RAW_PACKET contains the waveform samples and the S800_FP_CRDC_ANODE_PACKET contains the energies and times. Each CRDC is read out sequentially and it's data preceded by an id word. Format: 0x000i subpackets ... where i is the id number (0 or 1). ==== S800_FP_CRDC_RAW_PACKET ==== Sub packet of [[S800 version 0x0004#S800_FP_CRDC_PACKET|S800_FP_CRDC_PACKET]] giving waveform data. Format: 0xtttt waveform data ... where t is the threshold. The waveform data is written using two consecutive words per sample, to be upacked from the following format (binary representation): word 1: hsss ssss sscc cccc word 2: 0000 nndd dddd dddd where h is the header bit, which should always be 1 for valid CRDC data; s are the 9 bits of the sample number (maximum number of samples is 512); c are the 6 bits of the channel number; n are the 2 bits of the connector number; d are the 10 bits of data. ==== S800_FP_CRDC_ANODE_PACKET ==== Sub packet of [[S800 version 0x0004#S800_FP_CRDC_PACKET|S800_FP_CRDC_PACKET]] giving energies and times of the CRDCs. Format: 0xeeee 0xtttt ===== S800_FP_HODO_PACKET ===== Up to 32 Hodoscope energies read from Phillips 7164 ADCs, read in sparse mode, hit patterns read from a LeCroy 4448 Coincidence register, and a time value read from an Ortec 566 TAC via a Phillips 7164 ADC. The type of data to extract is determined from the first word of the packet, the id word. The first 16 energies are associated with id = 0, the second 16 with id = 1 and the hit patterns and time with id = 2. Format: (id = 0,1) 0x000i 0xceee ... (id = 2) 0x000i 0xaaaa 0xbbbb 0xtttt where i is the id, a is the coincidence register A for the first 16 channels, b the register for the second 16 channels and t the TAC time. ===== S800_II_TRACK_PACKET ===== Data from the intermediate image tracking PPAC read from a Jtec XLM72V universal logic module in the form of waveform samples. The S800_II_TRACK_PACKET contains no data and is solely a wrapper for the S800_II_TRACK_RAW_PACKET sub packet. ==== S800_II_TRACK_RAW_PACKET ==== Sub packet of [[S800 version 0x0004#S800_II_TRACK_PACKET|S800_II_TRACK_PACKET]] giving waveform data. Format: 0xtttt waveform data ... where t is the threshold. The waveform data is written using two consecutive words per sample, to be upacked from the following format (binary representation): word 1: hsss ssss sscc cccc word 2: 0000 nndd dddd dddd where h is the header bit, which should always be 1 for valid PPAC data; s are the 9 bits of the sample number (maximum number of samples is 512); c are the 6 bits of the channel number; n are the 2 bits of the connector number; d are the 10 bits of data. ===== S800_OB_PIN_PACKET ===== Energy from the object box PIN detector, read out from a Phillips 7164 ADC. Format: 0xceee ===== S800_TIMESTAMP_PACKET ===== A 48 bit timestamp read from a Jtec XLM74 universal logic module. Written as three consecutive words. Format: 0xhhhh 0xmmmm 0xllll where h are bits 47-32, m are bits 31-16 and l bits 15-0 of the 48 bit timestamp word.