Skip to content

WIP: Unified TLA Stream + Alignment of TLA Steps for combined TLA Chains

Marco Montella requested to merge mmontell/athena:TLAAlignment into master

Status of MR as of July 30 2021: Work in Progress

Dear experts, we would like to reprise this MR with the goal of finalising the modifications to the chain steps alignment allowing to run the combined Photon+Jets TLA chain.

We updated the MR to 22.0.41, and we are currently observing the following issues:

1 - Error resolving empty steps while running the full menu generation test: This is most likely provoked by special PEB chains such as HLT_noalg_AlfaPEB_L1ALFA_ANY, which only have no steps besides the PEB step, triggering the exception during full menu generation here

ctest -R Menu -j16 --rerun-failed --output-on-failure
Start 26: TriggerMenuMT_generateMenuMT_ctest 
Py:TriggerMenuMT:GenerateMenuMT    INFO [generateAllChainConfigs] all chain configurations have been generated.
Py:TriggerMenuMT:GenerateMenuMT    INFO Length of FinalListofChainConfigs 1111
Py:TriggerMenuMT:GenerateMenuMT    INFO Are there any fully empty steps? [False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
Py:TriggerMenuMT:GenerateMenuMT   ERROR [resolveEmptySteps] The menu you are trying to generate contains a fully empty step. This is only allowed for partial menus.

2 - The previously working HLT_g35_loose_3j25_PhysicsTLA_L1EM22VHI chain now produces zero counts. Individual jet-only and photon-only TLA chains do not show this behaviour.

The logfile from the combined TLA chain shows that the TLAPhoton(Jet)ReAlgo, HypoAlg and HypoTool identify, copy and process the 31 events that would normally be saved to the output. The same chain, without the PhysicsTLA tag (and which therefore does not make use of the PEBInfoWriterTool), does produce 31 counts.

31 output events are also observed running the PhysicsTLA version in an alternative non up-to-date working branch set to Athena/22.0.39.

Have there been changes to the PEB or the way that leg decisions are counted that might have caused this @rbielski ?


Dear all, this MR covers the following changes:

As discussed and agreed with Manu experts, we would like to propose a unified stream as the endpoint for all events triggered by chains displaying the 'physicsTLA' chainParts identifier. This new stream is to be called 'TLA', and its EDM is presently set to only include TLA containers and their Aux stores:

xAOD::PhotonAuxContainer_v3#HLT_egamma_Photons_TLAAux xAOD::JetAuxContainer_v1#HLT_AntiKt4EMTopoJets_subjesIS_TLAAux. xAOD::JetContainer_v1#HLT_AntiKt4EMTopoJets_subjesIS_TLA xAOD::PhotonContainer_v1#HLT_egamma_Photons_TLA

As discussed in the JIRA ticket, the main challenge for combined TLA chains is for the copying steps (which create the TLA containers) to be executed only once the 'HLT' result of all legs is verified to be positive.

In order to accomplish this we tried to implement a pseudo-alignment for all TLA steps by executing of the following algorithm on the menu just prior to the alignment of PEB steps (GenerateMenuMT.py, L0326):

  1. Single out all TLA chains in the Menu (function is_tla_dict in TLAALignmentSequences.py) using the value of "eventBuildingType" in the chainDict;
  2. Identify the position of all TLA Copying steps in their respective chains. TLA steps are identified thanks to a new member flag called buildType in the ChainStep class;
  3. Find the absolute maximal position of a TLA step in any chain (say 18th in a specific chain);
  4. Insert as many empty steps in each chain as necessary so that EVERY TLA step is (in our example) 18th in their respective chain. This ensure that by the time any TLA Copying step is performed, all physical objects involved in the TLA chains have been reconstructed, and all 'HLT' outcomes verified. (this step uses the existing member function of the Chain class named insertEmptySteps)

An additional item is added to the algorithm between 3 and 4 in the case of combined chains. These chains typically have more than one TLA Copying steps (one per signature). As a practical example, consider the native chainSteps of a photon+jets chain such as the one we wish to implement: HLT_g35_loose_3j25_physicsTLA_L1EM22VHI

['Egamma_FastCalo' > 'Egamma_FastPhoton' > 'Egamma_PrecCalo' > 'Egamma_PrecPhoton' > 'TLA_Photon' > 'Jets_Main' > 'TLA_Jets' > 'PEBInfoWriter' ]

Before we can conform the length of this chain to the maximal TLA step position of any TLA chain, the 'TLA_Photon' step has to be moved after the HLT Jet step in order to run only after jets are reconstructed. This task is performed by a new member function of the Chain class, moveStepInChain(start_position, end_position), which singles out a step in the chain and moves it to a new position (MenuComponents.py, line 665). The chain becomes

['Egamma_FastCalo' > 'Egamma_FastPhoton' > 'Egamma_PrecCalo' > 'Egamma_PrecPhoton' > 'Jets_Main' > 'TLA_Photon' > 'TLA_Jets', 'PEBInfoWriter' ]

Once both TLA steps have been placed at the end, both steps are aligned to the other chains as described in step 4 of the algorithm:

['Egamma_FastCalo' > 'Egamma_FastPhoton' > 'Egamma_PrecCalo' > 'Egamma_PrecPhoton' > 'Jets_Main' > '[EmptyTLAAlignmentSteps]' > 'TLA_Photon' > 'TLA_Jets', 'PEBInfoWriter' ]

Tagging @rbielski, @tamartin, @khoo, @dzanzi, @hrussell, @boveia

Cheers,

Marco and Caterina


Status of the MR:: Work in progress

Currently the unified stream seems to work, running a single-legged chain produces a credible output (the EDM printout at the beginning of the MR was created running trigbs_dumpHLTContentInBS_run3.py on the output of athena_HLT at the latest branch commit).

The combined photon+Jets chain doesn't work yet, with the following error message being printed relative to the final PEBInfoWriter step (which I believe actually writes out the output to the special stream).

ERROR Found 2 connections and 1 MenuSequences in Step Step8_PEBInfoWriter_physicsTLA

ERROR [createDataFlow] lengths of chainlegs = ['HLT_g35_loose_3j25_physicsTLA_L1EM22VHI'] differ from inputs=['HLTNav_ComboHypo_merged_1PhotonTLACopyingStep_EmptyEgammaAlign5_1JetFS_EgammaTLAPhotonHypoMT_HLT_egamma_Photons', 'HLTNav_ComboHypo_merged_1PhotonTLACopyingStep_EmptyEgammaAlign5_1JetFS_IMEmptyEgammaSeq5_JetFS']

Edited by Marco Montella

Merge request reports