Skip to content

TriggerAnalysisAlgorithm ignore unconfigured containers when configuring TrigGlobalEfficiencyAlg

Ryan Quinn requested to merge rquinn/athena:FixTrigGlobalEffCorrAlg into main

Updated makeTriggerGlobalEffCorrAlg() to only configure particle types that have a container. This allows the user to not create any electrons/muons/photons containers if they are not using related triggers.

The original behaviour would not allow a user to leave out any of electrons/muons/photons, as passing an empty string to readNameAndSelection() throws an exception. Now, the call to readNameAndSelection() is skipped, and the unspecified options of TrigGlobalEfficiencyAlg will default to empty strings. This seems like the best way to do things instead of modifying the readNameAndSelection() function.

In my case, I don't use photon triggers, so there was no need to create a container for them. I tested this on a ttbar MC sample and everything seems to work fine if the photon container is unspecified.

Tagging @ravinab as he wrote the original code in e9559710, I think.

Edited by Ryan Quinn

Merge request reports