DUNE-DAQ / trigger

Trigger infrastructure of the DUNE DAQ
0 stars 6 forks source link
dunedaq-common dunedaq-online dunedaq-team-trigger

Trigger

(Last updated Nov 2024, MiR, AO & AS)

The trigger package contains the modules that make up the DUNE FD DAQ trigger system. Implementations of the physics algorithms that produce data selection objects (trigger primitive, trigger activity and trigger candidates) live in the tpglibs and triggeralgs packages. The configuration schema & code that generates trigger application live in appmodel


The main goal of the trigger is to extract information from data to form Trigger Decisions, which make the requests to save the raw data. Additionally, in conjunction with the DataFilter, datafilter, the aim is to reduce the total data volume from the four planned DUNE modules to be in line with the DUNE requirements for trigger acceptance and efficiency for various physics signals.

Table of content

  1. Overview
    1. More details (of trigger functionality)
  2. Structure
    1. Terminology
      1. Main objects
      2. Modules-Makers
      3. Modules-Other
  3. Flow
    1. Flow - detailed
  4. Links to other repositories
    1. Triggeralgs
    2. Trgdataformats
    3. Daqconf
  5. Running
    1. online
    2. offline
  6. Development
  7. Other

Overview

More details (of trigger functionality):

Trigger's position relative to DAQ:

As can be seen, the trigger lies in the heart of DUNE DAQ, receiving multiple inputs, creating and forwarding trigger decisions, while also responding to data requests.

Structure

The trigger is designed hierarchically. The minimal (extremely simplified) flow:

The hits-on-channel, in the form of Trigger Primitives, are merged at the scale of one TDAQ unit (such as an APA or CRP) into a cluster representing some type of Trigger Activity. Multiple Trigger Activity outputs can then be merged into a single Trigger Candidate that may include information spanning multiple TDAQ units or multiple slices of time (say, many APAs or many seconds) for a single system. Finally, multiple Trigger Candidates can be merged across systems (e.g. TPC and PDS) in the MLT into a Trigger Decision, a request to save the data.

Terminology:

Main objects:

Modules-Makers:

Modules-Other:

Flow

There currently does not exist an up-to-date representation of the trigger system, but from the beginning of the v5 development:

The diagram above shows the DAQModules and connections in an example trigger and readout app. Blue rounded rectangles are the TriggerDataHandler DAQModules, red rectangles are the external trigger inputs, the orange rectangle represents the readout application, and the purple represents the ModuleLevelTrigger, handling the trigger candidates. Each DataHandler module (here called ReadoutModel) receives one type of data (e.g. TriggerActivity), runs pre-processing tasks on it, inserts it into a latency buffer (that is handled by the LatencyBufferHandler), and runs post-processing tasks generating a new object (e.g. TriggerCandidate).

Links to other repositories

tpglibs (link)

Repository that holds the algorithms that generate the TriggerPrimitives out of the continously-supplied waveforms, from each channel. It is used by the readout application, and includes both the native and AVX implementations of the TPG algorithms.

triggeralgs (link)

The triggeralgs package contains implementations of the algorithms that produce TAs from TPs and TCs from TAs. They are in a separate package to allow the algorithms to be built outside of the DAQ software stack and used in the offline software, enabling a completely-independent development of the trigger algorithms. Trigger algorithms are easily loaded dynamically only knowing their name, through a factory method: AlgorithmPlugins.hpp.

trgdataformats (link)

The trigger data objects are defined as C++ structures, which could potentially be expressed in different ways in memory (eg on big-endian or little-endian systems), and do not have to be contiguous in memory. The trgdataformats repository contains the C++ structures that hold the trigger data formats, and various overlays that extend the trigger objects to be continous in memory to allow them to be stored in the buffers and saved as fragments.

appmodel (link)

The appmodel repository contains the configuration schema for all the trigger objects (and more), together with functions that generate the trigger application out of xml data that follows those schemas. This includes configuration of the trigger algorithms, setup of the external triggers, creating queues between different DAQModules etc.

Running

online

The instructions for running with real hardware change often. Please follow:

offline

Offline live emulation currently not supported in v5

Development

For trigger code development, please:

Other