Skip to content

PadmeTrig

Emanuele Leonardi edited this page Nov 21, 2019 · 6 revisions

PadmeTrig is the program in charge of:

  1. configuring the Roma3 Trigger Board
  2. collecting data from the Roma3 Trigger Board
  3. sending trigger data to the Merger process
  4. (optional) writing trigger data to an output file

It is usually started by the Run Control but can be run in standalone mode with the command

PadmeTrig -c <config file>

where <config file> contains a list of configuration parameters in the form parameter value.

Available parameters are:

Parameter Default value Description
start_file run/start "Start" tag file: when found, PadmeTrig will tell the Trigger board to start sending triggers.
quit_file run/quit "Quit" tag file: when found, PadmeTrig will tell the Trigger board to stop sending triggers and exit.
initok_file run/initok_trigger "Init OK" tag file: PadmeTrig will create this file when the initializtion phase is successfully completed.
initfail_file run/initfail_trigger "Init Fail" tag file: PadmeTrig will cretae this file if there are problems in the initialization phase.
lock_file run/lock_trigger Lock file: PadmeTrig will create this file when it starts. The file contains the Unix process id of the running process.
trigger_mask 0x01 8bit pattern to enable(1)/disable(0) individual triggers. Bits 0-5 are assigned to the physical triggers, i.e. the external signals arriving from the Lemo connectors numbered 1 to 6 (1:b0,2:b1,etc.) on the Trigger board front panel, bit 6 pilots the uncorrelated (random) trigger, bit 7 pilots the correlated trigger which is sent at a fixed delay after the BTF trigger. Current assignments of the physical triggers are: b0=BTF, b1=Cosmics, b2=ECAL Calibration, b3=Dual-timer, b4,b5=Unassigned.
busy_mask 0x10 5bit pattern to enable/disable busy signals handling. Assignments are: b4=CPU busy, b3=Mimosa busy, b2=TimePix busy, b0,b1=Unassigned. The Mimosa and TimePix busy signals are received from the corresponding LVDS connectors on the front panel of the Trigger board.
timepix_shutter_delay 0x02 Delay (in units of 12.5ns) between the arrival of the BTF trigger and the generation of the TimePix shutter signal. Default value corresponds to a delay of 25ns. WARNING: do not set this parameter to 0 as it will produce a delay of 25us!
timepix_shutter_width 0x64 Width (in units of 100ns) of the TimePIx shutter signal. Default value corresponds to a width of 10us.
trigger0_delay 0x7E Delay (in units of 12.5ns) between the arrival of the BTF trigger and the generation of the trigger signal sent to the ADC boards. Default value corresponds to a delay of 1.575us.
correlated_trigger_delay 0x01F4 Delay (in units of 1us) between the arrival of the BTF trigger and the generation of the correlated trigger sent to the ADC boards. Default value corresponds to a delay of 500us.
trig<n>_scale_global 1 Scale factor of trigger n (n=1-7). E.g. if set to 10, only 1 trigger over 10 received will be sent to the ADC boards. N.B. BTF trigger cannot be scaled
trig<n>_scale_autopass 0(n=0-5),1(n=6-7) Define autopass scaling factor for trigger n. E.g. scale_autopass=10 means that 1 trigger every 10 will have autopass enabled. scale_autopass=0 disables autopass. Autopass events are characterized by a longer trigger gate than standard (non-autopass) events (200ns vs 100ns).
output_mode STREAM Define if data collected by PadmeTrig will be sent to a Unix pipe to be connected to the Merger process (STREAM) or to a local file (FILE).
output_stream no default Full path of the Unix pipe used when output is in STREAM mode.
data_dir data/ Directory where output files will be stored when output is in FILE mode.
data_file trig Template filename to use when output is in FILE mode. The final filename will be in the form trig__, e.g. trig_2019_07_21_13_23_08.
total_daq_time 0 Total time in seconds to run the PadmeTrg process. PadmeTrig will exit if this time has elapsed or if the quit file is found. When total_daq_time is set to 0, PadmeTrig will only stop when the quit file is found.
daq_loop_delay 10000 Delay (in units of 1us) between poll iterations of the trigger boards. On each iteration, all events collected by the trigger board since the last poll are recovered, formatted, and sent to the output stream. Using a longer delay reduces the I/O load on the board but induces a corresponding delay on the data sent to the merger.
file_max_duration 3600 Maximum time (in seconds) after which the output file will be closed and a new file will be opened. Only used in FILE mode.
file_max_size 1073741824 Maximum file size above which the output file will be closed and a new file will be opened. Only used in FILE mode.
file_max_events 1000000 Maximum number of events written to file after which the output file will be closed and a new file will be opened. Only used in FILE mode.
debug_scale 10 Numer of events after which PadmeTrig sends some debug information to stdout.
Clone this wiki locally