10 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
11 from AthenaConfiguration.ComponentFactory
import CompFactory
12 from AthenaConfiguration.Enums
import MetadataCategory
16 """Configure the example skimming tool"""
17 from TrigDecisionTool.TrigDecisionToolConfig
import TrigDecisionToolCfg
21 triggers = [
"HLT_mb_sptrk_ion_L1ZDC_A_C_VTE50",
"HLT_noalg_mb_L1TE50"]
23 expression =
' ( ' +
' || '.
join(triggers) +
' )'
26 acc.addPublicTool(CompFactory.DerivationFramework.xAODStringSkimmingTool(name =
"HION14StringSkimmingTool",
27 expression = expression,
28 TrigDecisionTool=tdt),
33 """Configure the example augmentation tool"""
38 augmentation_tool = CompFactory.DerivationFramework.HIGlobalAugmentationTool(name=
"HION14AugmentationTool",
41 acc.addPublicTool(augmentation_tool, primary=
True)
46 """Configure the example augmentation tool"""
50 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_HITight_Cfg
53 name=
"HITightTrackSelector",
59 acc.addPublicTool(HITightTrackSelector)
62 HITightDecorator = CompFactory.DerivationFramework.InDetTrackSelectionToolWrapper(name=
'HION14TighDecorator',
63 TrackSelectionTool=HITightTrackSelector,
64 DecorationName=
'HITight',
65 ContainerName=
"InDetTrackParticles"
69 acc.addPublicTool(HITightDecorator, primary=
True)
74 """Configure the example augmentation tool"""
78 HICentralityDecorator = CompFactory.DerivationFramework.HICentralityDecorationTool(name=
"HION14CentralityTool")
81 acc.addPublicTool(HICentralityDecorator, primary=
True)
86 """Configure the derivation framework driving algorithm (kernel)"""
90 if not flags.Input.isMC:
92 skimmingTool += [triggers]
98 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_HILoose_Cfg
101 name =
"HION14TrackSelectionToolLoose",
106 acc.addPublicTool(HILooseTrackSelector)
108 HION14TrackThinningTool = CompFactory.DerivationFramework.HITrackParticleThinningTool(name=
"HION14TrackThinningTool",
110 PrimaryVertexKey=
"PrimaryVertices",
111 PrimaryVertexSelection=
"sumPt2",
112 TrackSelectionTool=HILooseTrackSelector
115 acc.addPublicTool(HION14TrackThinningTool)
116 thinningTool += [HION14TrackThinningTool]
119 muonThinningTool = CompFactory.DerivationFramework.MuonTrackParticleThinning(name=
"HION14MuonThinningTool",
121 InDetTrackParticlesKey =
"InDetTrackParticles")
123 acc.addPublicTool(muonThinningTool)
124 thinningTool += [muonThinningTool]
128 truth_thinning_expression =
"(TruthParticles.status == 1) && ( (TruthParticles.pdgId != 2112 && TruthParticles.pdgId != 2212) || TruthParticles.pt > 0.1 )"
130 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import GenericTruthThinningCfg
133 name=
"HION14TruthThinningTool",
134 StreamName=kwargs[
'StreamName'],
135 ParticleSelectionString=truth_thinning_expression
139 thinningTool += [HION14TruthThinningTool]
146 augmentationTool = [globalAugmentationTool, tightAugmentationTool, centralityAugmentatioTool]
148 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
150 SkimmingTools= skimmingTool,
151 ThinningTools=thinningTool,
152 AugmentationTools=augmentationTool
160 acc.merge(
HION14KernelCfg(flags, name=
"HION14Kernel", StreamName=
"StreamDAOD_HION14"))
162 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
163 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
164 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
167 from DerivationFrameworkHI
import ListSlimming
169 HION14SlimmingHelper =
SlimmingHelper(
"HION14SlimmingHelper", NamesAndTypes=flags.Input.TypedCollections, flags=flags)
171 HION14SlimmingHelper.SmartCollections = ListSlimming.HION14SmartCollections()
173 HION14SlimmingHelper.AllVariables = ListSlimming.HION14AllVariablesGeneral()
175 HION14SlimmingHelper.ExtraVariables = ListSlimming.HION14ExtraContentAll()
179 HION14SlimmingHelper.ExtraVariables +=ListSlimming.HION14ExtraContentAllTruth()
180 HION14SlimmingHelper.AllVariables += ListSlimming.HION14TruthVariablesGeneral()
183 HION14ItemList = HION14SlimmingHelper.GetItemList()
185 acc.merge(
OutputStreamCfg(flags,
"DAOD_HION14", ItemList=HION14ItemList, AcceptAlgs=[
"HION14Kernel"]))
186 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_HION14", AcceptAlgs=[
"HION14Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))