136 log = logging.getLogger(
"TrigNavSlimmingMTCfg.py")
138 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
141 if flags.Trigger.EDMVersion
in [1, 2]
and not flags.Trigger.doEDMVersionConversion:
142 log.debug(
"Not going to run Run 3 navigation slimming on a R2 input file as we are not setup to run the navigation conversion in this job")
146 if flags.Trigger.decodeHLT
is False:
147 log.debug(
"Nothing to do as Trigger.decodeHLT is False")
150 if flags.Trigger.doNavigationSlimming
is False:
151 log.debug(
"Nothing to do as Trigger.doNavigationSlimming is False")
154 doESD = flags.Output.doWriteESD
155 doAOD = flags.Output.doWriteAOD
157 from TrigDecisionTool.TrigDecisionToolConfig
import TrigDecisionToolCfg, getRun3NavigationContainerFromInput
158 from TrigDecisionTool.TrigDecisionToolHelpers
import possible_keys
166 if doESD
and doESDSlim:
168 esdSlim = CompFactory.TrigNavSlimmingMTAlg(
'TrigNavSlimmingMTAlg_ESD')
169 esdSlim.TrigDecisionTool = tdt
170 esdSlim.OutputCollection =
"HLTNav_Summary_ESDSlimmed"
171 esdSlim.PrimaryInputCollection = inputCollection
172 esdSlim.AllOutputContainers = possible_keys
173 esdSlim.KeepFailedBranched =
True
174 esdSlim.KeepOnlyFinalFeatures =
False
175 esdSlim.RemoveEmptySteps =
False
176 esdSlim.RepackROIs =
False
177 esdSlim.RepackFeatures =
False
178 esdSlim.EdgesToDrop = [
"view"]
179 esdSlim.NodesToDrop = [
"F"]
180 esdSlim.ChainsFilter = []
181 ca.addEventAlgo(esdSlim)
183 collections = [f
"xAOD::TrigCompositeContainer#{esdSlim.OutputCollection}", f
"xAOD::TrigCompositeAuxContainer#{esdSlim.OutputCollection}Aux.-"]
184 from OutputStreamAthenaPool.OutputStreamConfig
import addToESD
185 ca.merge(
addToESD(flags, collections))
187 log.info(
"Producing ESD Slimmed Trigger Navigation Collection. Reading {} and writing {}".
format(esdSlim.PrimaryInputCollection, esdSlim.OutputCollection))
188 if esdSlim.OutputCollection
not in possible_keys:
189 log.error(
"Producing a collection {} which is not listed in 'possible_keys'! Add this here too.".
format(esdSlim.OutputCollection))
191 log.info(
"Will not create ESD Slimmed Trigger Navigation Collection in this job")
193 if doAOD
and doAODSlim:
195 aodSlim = CompFactory.TrigNavSlimmingMTAlg(
'TrigNavSlimmingMTAlg_AOD')
196 aodSlim.TrigDecisionTool = tdt
197 aodSlim.OutputCollection =
"HLTNav_Summary_AODSlimmed"
198 aodSlim.PrimaryInputCollection = inputCollection
199 aodSlim.AllOutputContainers = possible_keys
200 aodSlim.RemoveEmptySteps =
False
201 aodSlim.RepackROIs =
False
202 aodSlim.RepackFeatures =
False
203 aodSlim.EdgesToDrop = [
"view"]
204 aodSlim.NodesToDrop = [
"F"]
205 aodSlim.ChainsFilter = []
207 if flags.Trigger.AODEDMSet ==
"AODSLIM":
208 aodSlim.KeepFailedBranched =
False
209 aodSlim.KeepOnlyFinalFeatures =
True
210 log.info(
"Producing AODSLIM Trigger Navigation Collection. Reading {} and writing {}".
format(aodSlim.PrimaryInputCollection, aodSlim.OutputCollection))
212 aodSlim.KeepFailedBranched =
True
213 aodSlim.KeepOnlyFinalFeatures =
False
214 log.info(
"Producing AODFULL Slimmed Trigger Navigation Collection. Reading {} and writing {}".
format(aodSlim.PrimaryInputCollection, aodSlim.OutputCollection))
215 ca.addEventAlgo(aodSlim)
217 collections = [f
"xAOD::TrigCompositeContainer#{aodSlim.OutputCollection}", f
"xAOD::TrigCompositeAuxContainer#{aodSlim.OutputCollection}Aux.-"]
218 from OutputStreamAthenaPool.OutputStreamConfig
import addToAOD
219 ca.merge(
addToAOD(flags, collections))
221 if aodSlim.OutputCollection
not in possible_keys:
222 log.error(
"Producing a collection {} which is not listed in 'possible_keys'! Add this here too.".
format(esdSlim.OutputCollection))
224 log.info(
"Will not create AOD Slimmed Trigger Navigation Collection in this job")