4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 from AthenaConfiguration.Enums
import MetadataCategory
7 from AthenaCommon.CFElements
import seqAND
8 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionToolCfg
13 """Configure the example skimming tool"""
14 from TrigDecisionTool.TrigDecisionToolConfig
import TrigDecisionToolCfg
18 ExtraData += [
'xAOD::VertexContainer/PrimaryVertices']
20 acc.addSequence(
seqAND(
"HION2Sequence") )
21 acc.getSequence(
"HION2Sequence").ExtraDataForDynamicConsumers = ExtraData
22 acc.getSequence(
"HION2Sequence").ProcessDynamicDataDependencies =
True
25 from DerivationFrameworkHI
import ListTriggers
28 triggers += ListTriggers.HION2MinBias2023()
30 expression =
' ( ' +
' || '.
join(triggers) +
' ) && (count(abs(PrimaryVertices.z)<100)>1)'
33 acc.addPublicTool(CompFactory.DerivationFramework.xAODStringSkimmingTool(name =
"HION2StringSkimmingTool",
34 expression = expression,
35 TrigDecisionTool=tdt),
42 kwargs.setdefault(
"CutLevel",
"HITight")
47 """Configure the example augmentation tool"""
50 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_HILoose_Cfg
53 name =
"TrackSelectionTool_hi_loose",
57 name =
"TrackSelectionTool_hi_tight",
59 acc.addPublicTool(TrkSelTool_hi_loose)
60 acc.addPublicTool(TrkSelTool_hi_tight)
62 acc.addPublicTool(CompFactory.DerivationFramework.HITrackQualityAugmentationTool(name=
"HION2AugmentationTool",
63 TrackSelectionTool_pp = TrkSelTool_hi_loose,
64 TrackSelectionTool_hi_loose =TrkSelTool_hi_loose,
65 TrackSelectionTool_hi_tight =TrkSelTool_hi_tight),
70 """Configure the derivation framework driving algorithm (kernel)"""
76 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
78 SkimmingTools = [skimmingTool],
79 AugmentationTools = [augmentationTool]),
80 sequenceName =
"HION2Sequence")
87 acc.merge(
HION2KernelCfg(flags, name=
"HION2Kernel",StreamName =
"StreamDAOD_HION2"))
89 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
90 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
91 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
95 from DerivationFrameworkHI
import ListSlimming
97 HION2SlimmingHelper =
SlimmingHelper(
"HION2SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
100 AllVar += ListSlimming.HION2AllVariablesGeneral()
101 AllVar += ListSlimming.HION2AllVariablesPbPb_2015_5TeV()
102 AllVar += ListSlimming.HION2AllVariablespPb_2016()
105 ExtraVar += ListSlimming.HION2ExtraVariablesGeneral()
106 ExtraVar += ListSlimming.HION2ExtraVariablesPbPb_2015_5TeV()
108 HION2SlimmingHelper.AllVariables = AllVar
109 HION2SlimmingHelper.ExtraVariables = ExtraVar
111 HION2ItemList = HION2SlimmingHelper.GetItemList()
113 acc.merge(
OutputStreamCfg(flags,
"DAOD_HION2", ItemList=HION2ItemList, AcceptAlgs=[
"HION2Kernel"]))
114 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_HION2", AcceptAlgs=[
"HION2Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))