Trigger configuration with ComponentAccumulator

Last update: 03 Jun 2024 [History] [Edit]

Introduction

The ComponentAccumulator is the key element of the current Athena configuration system. Job configuration in this scheme is based on a philosophy of “bottom-up” configuration, where small units are “merged” to build up a working job. For more information, refer to:

This page outlines how to use trigger-specific CA constructs to configure a trigger chain. These serve to structure the sequences that schedule reconstruction and hypothesis components for a single Step.

Trigger menu CA components

CA components

Custom CA components for the trigger are defined in the MenuComponents module:

  • MenuSequenceCA
  • SelectionCA
  • InEventRecoCA
  • InViewRecoCA

Of these, the SelectionCA, InViewRecoCA and InEventRecoCA inherit from the base ComponentAccumulator class, extending its functionality with various convenience methods. These help streamline placing algorithms in the correct subsequence structure. In the case of the *RecoCA classes, these assist with generating prerequisite algorithms such as the InputMaker or EventViewMaker. The SelectionCA on the other hand supports a clean separation of the reconstruction and hypothesis elements.

These fit together as follows:

In this way, the complete MenuSequenceCA construct encapsulates the steering logic that is executed by the ChainStep:

  • The reconstruction algs (either in an EventView or in the full event context – mainly jet, MET) are embedded in a parallelisable Sequence
  • The reco sequence is placed inside a sequential Sequence, followed by the HypoAlg
  • A HypoToolGen function is provided to configure a HypoTool that performs the final selection logic for every individual chain using this step
    • Customisation of the HypoTool thresholds is done based on the chain dictionary, generated by parsing the chain name

Certain of these components also permit operation as the probe leg of Tag-and-Probe chains, performing special actions to avoid repeated reconstruction of (tighter) tag leg objects in the looser probe leg EventViews.

Trigger configuration flags

Another element of the ComponentAccumulator configuration scheme is the AthConfigFlags construct, which holds the top-level steering options for the running job. See the flags tutorial for details.

The trigger-specific configuration flags are defined in the TriggerConfigFlags module. They are all placed in the Trigger category.

Parts of the trigger configuration (notably ID trigger) may cloneAndReplace selected flags in (sub)categories e.g. to steer large-scale configuration of signature-specific settings. This permits such domains to configure a swath of algorithms purely on the basis of a supplied FlagCategory, while keeping the full AthConfigFlags immutable, apart from appending the customised subcategory for tracking.

Highlighted flags

The following flags are particularly important:

  • Trigger.triggerMenuSetup
    • Sets the trigger menu used to configure the HLT. Normally, this maps to the name of a particular trigger menu file here, e.g. Physics_pp_run3_v1 (without file type suffix). However, it can be extended with a “Menu Prescale Set”, which automatically applies prescale values. For example, Physics_pp_run3_v1_Primary_prescale or MC_pp_run3_v1_BulkMCProd_prescale remove unwanted triggers of various types, governed by MenuPrescaleConfig
  • Trigger.triggerConfig
    • Determines the source of the trigger configuration. This is normally autoconfigured according to the TriggerConfigFlag twiki. The valid values are:
      • ‘DB’: read from the trigger database
      • ‘FILE’: read from local json files
      • ‘COOL’: read from the COOL database at P1
      • ‘INFILE’: extract from in-file metadata, possible from RDO_TRIG, AOD, ESD, DAOD formats.
  • Trigger.doLVL1
    • Run L1 trigger simulation
  • Trigger.doHLT
    • Run the HLT algorithms
  • Trigger.AODEDMSet, Trigger.ESDEDMSet
    • Configure the trigger content to be written to (AOD/ESD) output files. Typically we use:
      • ‘AODSLIM’: standard MC production – minimal containers needed for analysis
      • ‘AODFULL’: data, MC production for performance studies – additional containers used for trigger studies
    • Other formats (‘BS’,’ESD’) usually contain the entire HLT fragment.
    • The assignments of trigger containers to particular formats is made in TrigEDMConfig.

The following flags can be useful for debugging

  • Trigger.forceEnableAllChains
    • Executes HLT regardless of L1 decisions, requiring only that all required L1 seed thresholds exist for activating a chain.
  • Trigger.doRuntimeNaviVal
  • Trigger.ExtraEDMList
    • Adds additional trigger containers to the output file – note that interface and auxiliary containers need to be added separately
  • Trigger.generateMenuDiagnostics
    • Produces graphs in .dot format for visualising the menu control flow construction
  • Trigger.fastMenuGeneration (default True)
    • Causes ComponentAccumulator generators to be executed immediately in the chain configuration, rather than being deferred to control flow creation – this may be necessary to understand conflicts or inconsistencies in signature configuration

As another specific use case, the following flags permit executing a restricted menu (defined in full Athena releases, not in AthAnalysis):

  • Trigger.enabledSignatures
    • Provide a list of signatures to be executed in this job; others will be disabled
  • Trigger.disabledSignatures
    • Conversely, this option allows disabling a list of signatures, which might be more convenient for avoiding bugs etc
  • Trigger.selectChains
    • Runs only the list of provided chains
  • Trigger.disableChains
    • Switches off the list of provided chains

E.g. one can run only the muon signature as follows:

athena.py --imf --perfmon=fastmonmt --threads=1 --evtMax=20 --filesInput=RDO.pool.root TriggerJobOpts/runHLT.py Trigger.triggerMenuSetup="Dev_pp_run3_v1" Trigger.enabledSignatures='[\"Muon\"]' > athena.log 2>&1

or similarly extract a pair of muon chains:

athena.py --imf --perfmon=fastmonmt --threads=1 --evtMax=20 --filesInput=RDO.pool.root TriggerJobOpts/runHLT.py Trigger.triggerMenuSetup="Dev_pp_run3_v1" Trigger.selectChains='[\"HLT_mu24_ivarmedium_L1MU14FCH\",\"HLT_mu24_ivarmedium_mu6_msonly_probe_L1MU14FCH\"]' > athena.log 2>&1