Skip to content

DAQ Event Format

Emanuele Leonardi edited this page May 31, 2022 · 13 revisions

DAQ Event Format

The DAQ Event format is used by the PadmeDAQ program to write events read from the V1742 ADC boards .

Version 0

Version 0 is the native uncorrected format with which data are read from the V1742 ADC board. This DAQ event format was used in the June 2015 test beam at BTF and is fully documented in the board manual available from the CAEN site.

Version 1

Version 1 is the first version used to write data after the CAEN corrections. This version also support the application of the zero-suppression algorithm. Version 1 was used for a short period between the end of June 2015 and November 6, 2015, for testing purposes. No test-beam data was written with this format.

DAQ Event Format v1

Version 2

Version 2 is a simple modification of Version 1 where the "Board Id" event field was expanded from the CAEN native 5 bits to 8 bits to allow the use of up to 256 DAQ boards. This format is in use since November 6, 2015. All data collected during the April 2016 and June-July 2016 test beams were written using this format.

DAQ Event Format v2

Version 3

Version 3 added the Board Id and S/N to the file header and modified the event header to include zero suppression and autopass information. This format is in use since January 2018. All data collected during PADME Run1 and Run2 were written using this format.

DAQ Event Format v2

Format Legenda

File Header

  • Initial pattern: 1001 (0x9)
  • Format Version: progressive number which identifies the version of the data structure in the file
  • File Index: progressive index of the file within the run (start at 0, max 65535)
  • Run Number: progressive index of run (unsigned int)
  • Board Id: PADME board identifier (0:255)
  • Board S/N: serial number of ADC board
  • Start of File Time Tag: time in seconds from the epoch when the file was opened

File Tail

  • Initial pattern: 0101 (0x5)
  • Number of Events: total number of events written to file (unsigned int)
  • File Size (low+high): total size of file in bytes (unsigned long)
  • End of File Time Tag: time in seconds from the epoch when the file was closed
  • Event Structure (repeated for each event in file)

Event Structure - Header

  • Initial pattern: 1110 (0xE)
  • Event Size: total size of current event data structure in words of 4 bytes each
  • Board Id: PADME board identifier (0:255)
  • LVDS Pattern: bit pattern latched on the V1742 LVDS I/O when trigger arrives
  • 0Supp Algorithm: numeric code assigned to zero suppression algorithm used
  • Group Mask: 4 bit mask with map of active groups
  • Status: event status (10 bits: b0:[Event has data 0:no|1:yes], b1:[DRS4corr 0:off|1:on], b2:[0Supp 0:off|1:on], b3:reserved, b4:[Autopass 0:off|1:on], b5-9: reserved)
  • Event Counter: progressive number of event (number of triggers) within the run
  • Event Time Tag: time of event since last reset (counter incremented at each sampling clock hit)
  • Active Channel Mask: 32 bit mask with map of active channels
  • Accepted Channel Mask: 32 bit mask with map of accepted channels (= Active Channel Mask if 0-Suppression is not applied)

Event Structure - Trigger (repeated for each active group in Group Mask)

  • Start Index Cell: Starting cell of sampled data. Used by CAEN samples correction procedure.
  • Frq: frequency at which data was sampled (00: 5GHz, 01: 2.5GHz, 10: 1GHz, 11: not used)
  • TR: trigger signal was (01) or was not (00) sampled and written to readout
  • Trigger Size: size of current trigger structure in words of 4 bytes each
  • Sample n: value of sample n of current trigger (short). Present only if TR=01
  • Trigger Time Tag: trigger arrival time since last reset (counter incremented every 8.5ns)

Event Structure - Channel (repeated for each accepted channel in Accepted Channel Mask)

  • Sample n: value of sample n of current channel (short)
Clone this wiki locally