8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from AthenaConfiguration.Enums
import MetadataCategory
14 """Configure the example skimming tool"""
15 from TrigDecisionTool.TrigDecisionToolConfig
import TrigDecisionToolCfg
19 triggers = [
"HLT_mb_sptrk_ion_L1ZDC_A_C_VTE50",
"HLT_noalg_mb_L1TE50"]
21 expression =
' ( ' +
' || '.
join(triggers) +
' )'
24 acc.addPublicTool(CompFactory.DerivationFramework.xAODStringSkimmingTool(name =
"HION14StringSkimmingTool",
25 expression = expression,
26 TrigDecisionTool=tdt),
31 """Configure the example augmentation tool"""
36 augmentation_tool = CompFactory.DerivationFramework.HIGlobalAugmentationTool(name=
"HION14AugmentationTool",
39 acc.addPublicTool(augmentation_tool, primary=
True)
44 """Configure the example augmentation tool"""
48 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_HITight_Cfg
51 name=
"HITightTrackSelector",
57 acc.addPublicTool(HITightTrackSelector)
60 HITightDecorator = CompFactory.DerivationFramework.InDetTrackSelectionToolWrapper(name=
'HION14TighDecorator',
61 TrackSelectionTool=HITightTrackSelector,
62 DecorationName=
'HITight',
63 ContainerName=
"InDetTrackParticles"
67 acc.addPublicTool(HITightDecorator, primary=
True)
72 """Configure the example augmentation tool"""
76 HICentralityDecorator = CompFactory.DerivationFramework.HICentralityDecorationTool(name=
"HION14CentralityTool")
79 acc.addPublicTool(HICentralityDecorator, primary=
True)
84 """Configure the derivation framework driving algorithm (kernel)"""
88 if not flags.Input.isMC:
90 skimmingTool += [triggers]
96 from InDetConfig.InDetTrackSelectionToolConfig
import InDetTrackSelectionTool_HILoose_Cfg
99 name =
"HION14TrackSelectionToolLoose",
104 acc.addPublicTool(HILooseTrackSelector)
106 HION14TrackThinningTool = CompFactory.DerivationFramework.HITrackParticleThinningTool(name=
"HION14TrackThinningTool",
108 PrimaryVertexKey=
"PrimaryVertices",
109 PrimaryVertexSelection=
"sumPt2",
110 TrackSelectionTool=HILooseTrackSelector
113 acc.addPublicTool(HION14TrackThinningTool)
114 thinningTool += [HION14TrackThinningTool]
117 muonThinningTool = CompFactory.DerivationFramework.MuonTrackParticleThinning(name=
"HION14MuonThinningTool",
119 InDetTrackParticlesKey =
"InDetTrackParticles")
121 acc.addPublicTool(muonThinningTool)
122 thinningTool += [muonThinningTool]
126 truth_thinning_expression =
"(TruthParticles.status == 1) && ( (TruthParticles.pdgId != 2112 && TruthParticles.pdgId != 2212) || TruthParticles.pt > 0.1 )"
128 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import GenericTruthThinningCfg
131 name=
"HION14TruthThinningTool",
132 StreamName=kwargs[
'StreamName'],
133 ParticleSelectionString=truth_thinning_expression
137 thinningTool += [HION14TruthThinningTool]
144 augmentationTool = [globalAugmentationTool, tightAugmentationTool, centralityAugmentatioTool]
146 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
148 SkimmingTools= skimmingTool,
149 ThinningTools=thinningTool,
150 AugmentationTools=augmentationTool
158 acc.merge(
HION14KernelCfg(flags, name=
"HION14Kernel", StreamName=
"StreamDAOD_HION14"))
160 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
161 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
162 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
165 from DerivationFrameworkHI
import ListSlimming
167 HION14SlimmingHelper =
SlimmingHelper(
"HION14SlimmingHelper", NamesAndTypes=flags.Input.TypedCollections, flags=flags)
169 HION14SlimmingHelper.SmartCollections = ListSlimming.HION14SmartCollections()
171 HION14SlimmingHelper.AllVariables = ListSlimming.HION14AllVariablesGeneral()
173 HION14SlimmingHelper.ExtraVariables = ListSlimming.HION14ExtraContentAll()
177 HION14SlimmingHelper.ExtraVariables +=ListSlimming.HION14ExtraContentAllTruth()
178 HION14SlimmingHelper.AllVariables += ListSlimming.HION14TruthVariablesGeneral()
181 HION14ItemList = HION14SlimmingHelper.GetItemList()
183 acc.merge(
OutputStreamCfg(flags,
"DAOD_HION14", ItemList=HION14ItemList, AcceptAlgs=[
"HION14Kernel"]))
184 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_HION14", AcceptAlgs=[
"HION14Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))