6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from AthenaConfiguration.Enums
import MetadataCategory
12 """Configure the skimming tool"""
15 from DerivationFrameworkJetEtMiss
import TriggerLists
17 triggers = TriggerLists.get_jetTrig(flags)
19 if not flags.Input.isMC:
21 JETM1TrigSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool( name =
"JETM1TrigSkimmingTool1",
22 TriggerListOR = triggers )
24 acc.addPublicTool(JETM1TrigSkimmingTool)
26 expression =
'HLT_xe120_pufit_L1XE50'
27 JETM1OfflineSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(name =
"JETM1OfflineSkimmingTool1",
28 expression = expression)
30 acc.addPublicTool(JETM1OfflineSkimmingTool)
33 acc.addPublicTool(CompFactory.DerivationFramework.FilterCombinationOR(name=
"JETM1ORTool",
34 FilterList=[JETM1TrigSkimmingTool,JETM1OfflineSkimmingTool] ),
42 """Configure the derivation framework driving algorithm (kernel) for JETM1"""
46 if not flags.Input.isMC:
50 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
53 from DerivationFrameworkInDet.InDetToolsConfig
import InDetTrackSelectionToolWrapperCfg
56 name =
"DFJETM1CommonTrackSelectionLoose",
58 DecorationName =
"DFJETM1Loose"))
60 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
"JETM1CommonKernel", AugmentationTools = [DFCommonTrackSelection]))
63 from DerivationFrameworkInDet.InDetToolsConfig
import MuonTrackParticleThinningCfg, EgammaTrackParticleThinningCfg, JetTrackParticleThinningCfg
68 name =
"JETM1MuonTPThinningTool",
69 StreamName = kwargs[
'StreamName'],
71 InDetTrackParticlesKey =
"InDetTrackParticles"))
76 name =
"JETM1ElectronTPThinningTool",
77 StreamName = kwargs[
'StreamName'],
79 InDetTrackParticlesKey =
"InDetTrackParticles"))
81 JETM1_thinning_expression =
"InDetTrackParticles.DFJETM1Loose && ( abs(InDetTrackParticles.d0) < 5.0*mm ) && ( abs(DFCommonInDetTrackZ0AtPV*sin(InDetTrackParticles.theta)) < 5.0*mm )"
85 name =
"JETM1Akt4JetTPThinningTool",
86 StreamName = kwargs[
'StreamName'],
87 JetKey =
"AntiKt4EMTopoJets",
88 SelectionString =
"AntiKt4EMTopoJets.pt > 18*GeV",
89 TrackSelectionString = JETM1_thinning_expression,
90 InDetTrackParticlesKey =
"InDetTrackParticles"))
94 name =
"JETM1Akt4PFlowJetTPThinningTool",
95 StreamName = kwargs[
'StreamName'],
96 JetKey =
"AntiKt4EMPFlowJets",
97 SelectionString =
"AntiKt4EMPFlowJets.pt > 18*GeV",
98 TrackSelectionString = JETM1_thinning_expression,
99 InDetTrackParticlesKey =
"InDetTrackParticles"))
102 thinningTools = [JETM1MuonTPThinningTool,
103 JETM1ElectronTPThinningTool,
104 JETM1Akt4JetTPThinningTool,
105 JETM1Akt4PFlowJetTPThinningTool]
106 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
108 ThinningTools = thinningTools,
109 SkimmingTools = [skimmingTool]
if not flags.Input.isMC
else []))
122 from JetRecConfig.JetRecConfig
import JetRecCfg, getModifier
123 from JetRecConfig.StandardJetMods
import stdJetModifiers
124 from JetRecConfig.StandardSmallRJets
import AntiKt4PV0Track, AntiKt4EMPFlow, AntiKt4EMPFlowNoPtCut, AntiKt4EMTopoNoPtCut
129 bJVTTool =
getModifier(AntiKt4EMPFlow, stdJetModifiers[
'bJVT'], stdJetModifiers[
'bJVT'].modspec, flags=flags)
130 acc.addEventAlgo(CompFactory.JetDecorationAlg(name=
'bJVTAlg',
131 JetContainer=
'AntiKt4EMPFlowJets',
132 Decorators=[bJVTTool]))
137 jetList = [AntiKt4PV0Track]
143 jetList += [AntiKt4EMPFlowNoPtCut, AntiKt4EMTopoNoPtCut]
149 from JetRecConfig.StandardSmallRJets
import AntiKt4UFOCSSKNoPtCut
150 AntiKt4UFOCSSKNoPtCut_JETM1 = AntiKt4UFOCSSKNoPtCut.clone(
151 modifiers = AntiKt4UFOCSSKNoPtCut.modifiers+(
"NNJVT",)
153 jetList += [AntiKt4UFOCSSKNoPtCut_JETM1]
155 from JetRecConfig.StandardSmallRJets
import AntiKt4UFOCSSK
156 AntiKt4UFOCSSK_JETM1 = AntiKt4UFOCSSK.clone(
157 modifiers = AntiKt4UFOCSSK.modifiers+(
"NNJVT",)
159 jetList += [AntiKt4UFOCSSK_JETM1]
169 from JetRecConfig.JetRecConfig
import getConstitPJGAlg
170 from JetRecConfig.StandardJetConstits
import stdConstitDic
as cst
171 from JetRecConfig.JetInputConfig
import buildEventShapeAlg
182 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import AddTopQuarkAndDownstreamParticlesCfg
191 if flags.Trigger.EDMVersion == 2:
192 triggerNames = [
"JetContainer_a4tcemsubjesFS",
"JetContainer_a4tcemsubjesISFS",
"JetContainer_GSCJet",
193 "JetContainer_a10tclcwsubjesFS",
"JetContainer_a10tclcwsubFS",
"JetContainer_a10ttclcwjesFS"]
195 for trigger
in triggerNames:
196 wrapperName = trigger+
'AuxWrapper'
197 auxContainerName =
'HLT_xAOD__'+trigger+
'Aux'
199 acc.addEventAlgo(CompFactory.xAODMaker.AuxStoreWrapper( wrapperName, SGKeys = [ auxContainerName+
"." ] ))
211 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
212 JETM1TriggerListsHelper = TriggerListsHelper(flags)
215 acc.merge(
JETM1KernelCfg(flags, name=
"JETM1Kernel", StreamName =
'StreamDAOD_JETM1', TriggerListsHelper = JETM1TriggerListsHelper))
220 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
221 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
222 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
224 JETM1SlimmingHelper =
SlimmingHelper(
"JETM1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
226 JETM1SlimmingHelper.SmartCollections = [
"Electrons",
"Photons",
"Muons",
"PrimaryVertices",
227 "InDetTrackParticles",
229 "AntiKt10UFOCSSKJets",
230 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
231 "BTagging_AntiKt4EMPFlow"]
233 JETM1SlimmingHelper.ExtraVariables = [
"AntiKt4EMTopoJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1",
234 "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1",
235 "AntiKt4EMPFlowJets.passOnlyBJVT.DFCommonJets_bJvt.isJvtHS.isJvtPU",
236 "InDetTrackParticles.truthMatchProbability",
237 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets.zg.rg.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack",
238 "AntiKt10UFOCSSKJets.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.EnergyPerSampling.GhostTrack"]
240 JETM1SlimmingHelper.AllVariables = [
"MuonSegments",
"EventInfo",
241 "Kt4EMTopoOriginEventShape",
"Kt4EMPFlowEventShape",
"Kt4EMPFlowPUSBEventShape",
"Kt4EMPFlowNeutEventShape",
"Kt4UFOCSSKEventShape",
"Kt4UFOCSSKNeutEventShape",
242 "AntiKt4EMPFlowJets"]
247 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import addTruth3ContentToSlimmerTool
250 JETM1SlimmingHelper.AppendToDictionary.update({
'TruthParticles':
'xAOD::TruthParticleContainer',
251 'TruthParticlesAux':
'xAOD::TruthParticleAuxContainer'})
253 JETM1SlimmingHelper.SmartCollections += [
"AntiKt4TruthWZJets"]
254 JETM1SlimmingHelper.AllVariables += [
"TruthTopQuarkWithDecayParticles",
"TruthTopQuarkWithDecayVertices",
255 "AntiKt4TruthJets",
"InTimeAntiKt4TruthJets",
"OutOfTimeAntiKt4TruthJets",
"TruthParticles"]
256 JETM1SlimmingHelper.ExtraVariables += [
"TruthVertices.barcode.z"]
258 JETM1SlimmingHelper.AppendToDictionary.update({
'Kt4UFOCSSKEventShape':
'xAOD::EventShape',
259 'Kt4UFOCSSKEventShapeAux':
'xAOD::EventShapeAuxInfo',
260 'Kt4UFOCSSKNeutEventShape':
'xAOD::EventShape',
261 'Kt4UFOCSSKNeutEventShapeAux':
'xAOD::EventShapeAuxInfo'})
264 JETM1SlimmingHelper.IncludeTriggerNavigation =
False
265 JETM1SlimmingHelper.IncludeJetTriggerContent =
True
266 JETM1SlimmingHelper.IncludeMuonTriggerContent =
False
267 JETM1SlimmingHelper.IncludeEGammaTriggerContent =
False
268 JETM1SlimmingHelper.IncludeTauTriggerContent =
False
269 JETM1SlimmingHelper.IncludeEtMissTriggerContent =
False
270 JETM1SlimmingHelper.IncludeBJetTriggerContent =
False
271 JETM1SlimmingHelper.IncludeBPhysTriggerContent =
False
272 JETM1SlimmingHelper.IncludeMinBiasTriggerContent =
False
274 if flags.Trigger.EDMVersion == 2:
275 triggerNames = [
"a4tcemsubjesFS",
"a4tcemsubjesISFS",
"a10tclcwsubjesFS",
"a10tclcwsubFS",
"a10ttclcwjesFS",
"GSCJet"]
276 for trigger
in triggerNames:
277 JETM1SlimmingHelper.FinalItemList.append(
'xAOD::AuxContainerBase!#HLT_xAOD__JetContainer_'+trigger+
'Aux.pt.eta.phi.m')
279 jetOutputList = [
"AntiKt4PV0TrackJets",
"AntiKt4UFOCSSKJets"]
281 jetOutputList = [
"AntiKt4PV0TrackJets",
"AntiKt4UFOCSSKNoPtCutJets",
"AntiKt4EMPFlowNoPtCutJets",
"AntiKt4EMTopoNoPtCutJets"]
282 from DerivationFrameworkJetEtMiss.JetCommonConfig
import addJetsToSlimmingTool
286 JETM1ItemList = JETM1SlimmingHelper.GetItemList()
287 acc.merge(
OutputStreamCfg(flags,
"DAOD_JETM1", ItemList=JETM1ItemList, AcceptAlgs=[
"JETM1Kernel"]))
288 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_JETM1", AcceptAlgs=[
"JETM1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))