ATLAS Offline Software
Loading...
Searching...
No Matches
MUON5.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2#====================================================================
3# DAOD_MUON5.py
4# This defines the component accumulator version of DAOD_MUON5
5# It requires the flag MUON5 in Derivation_tf.py
6#====================================================================
7
8from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9from AthenaConfiguration.ComponentFactory import CompFactory
10from AthenaConfiguration.Enums import MetadataCategory
11import AthenaCommon.SystemOfUnits as Units
12
14 MuonContainer="Muons",
15 IdTrackContainer="InDetTrackParticles",
16 applyTrigger = False):
17 #copied from MUON1
18 acc = ComponentAccumulator()
19 from DerivationFrameworkMuons.MuonsToolsConfig import DiMuonTaggingAlgCfg
20
21 acc.merge(DiMuonTaggingAlgCfg(flags,
22 name = "DiMuonTaggingZmumuOC5",
23 Mu1PtMin = 24*Units.GeV,
24 Mu1AbsEtaMax = 2.5,
25 Mu1RequireQual = True,
26 Mu2PtMin = 3.0*Units.GeV,
27 Mu2RequireQual = True,
28 UseTrackProbe = False,
29 MuonContainerKey = MuonContainer,
30 TrackContainerKey = IdTrackContainer,
31 InvariantMassLow = 60*Units.GeV,
32 IDTrackThinningConeSize = 0.4,
33 applyTrigger = applyTrigger,
34 BranchPrefix = "Muon5ZmumuOC"))
35
36
37 acc.merge(DiMuonTaggingAlgCfg(flags,
38 name = "DiMuonTaggingZmumuSC5",
39 Mu1PtMin = 24*Units.GeV,
40 Mu1AbsEtaMax = 2.5,
41 Mu1RequireQual = True,
42 Mu2PtMin = 3.0*Units.GeV,
43 Mu2RequireQual = True,
44 UseTrackProbe = False,
45 MuonContainerKey = MuonContainer,
46 TrackContainerKey = IdTrackContainer,
47 OppositeCharge = False,
48 applyTrigger = applyTrigger,
49 InvariantMassLow = 60*Units.GeV,
50 BranchPrefix = "Muon5ZmumuSC"))
51 return acc
52
54 #copied from EGAM1
55 acc = ComponentAccumulator()
56
57 # ====================================================================
58 # 3. di-electron invariant mass for events passing the Z->ee
59 # selection for the e efficiencies with tag and probe.
60 # Based on single e trigger, for reco (central) and ID SF(central)
61 #
62 # 1 tight e, central, pT>25 GeV
63 # 1 e, central, pT>4 GeV
64 # opposite-sign + same-sign
65 # mee>50 GeV (cut applied in skimming step later)
66 # ====================================================================
67
68 requirement_tag = " && ".join(
69 ["(Electrons.DFCommonElectronsLHMedium)", "(Electrons.pt > 24.5*GeV)"]
70 )
71
72 requirement_probe = " && ".join(
73 ["(Electrons.DFCommonElectronsLHLoose)", "(Electrons.pt > 3.0*GeV)"]
74 )
75
76 acc.setPrivateTools(
77 CompFactory.DerivationFramework.EGInvariantMassTool(
78 name="EGAM1_ZEEMassTool3",
79 Object1Requirements=requirement_tag,
80 Object2Requirements=requirement_probe,
81 StoreGateEntryName="EGAM1_DiElectronMass3",
82 Mass1Hypothesis=0.511 * Units.MeV,
83 Mass2Hypothesis=0.511 * Units.MeV,
84 Container1Name="Electrons",
85 Container2Name="Electrons",
86 CheckCharge=False,
87 DoTransverseMass=False,
88 MinDeltaR=0.0,
89 )
90 )
91
92 return acc
93
94
95# Main algorithm config
96def MUON5KernelCfg(flags, name='MUON5Kernel', **kwargs):
97 """Configure the derivation framework driving algorithm (kernel) for MUON5"""
98 acc = ComponentAccumulator()
99
100 stream_name= 'StreamDAOD_MUON5'
101
102 kwargs.setdefault("MuonContainer", "Muons")
103 kwargs.setdefault("IdTrkContainer", "InDetTrackParticles")
104 kwargs.setdefault("MsTrkContainer", "ExtrapolatedMuonTrackParticles")
105 kwargs.setdefault("scheduleThinning", True)
106
107 # --------------------
108 # Common augmentations
109 # --------------------
110 from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
111 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
112
113
114 diMuonSelAcc = Muon5MumuSelectionCfg(flags,
115 MuonContainer= kwargs["MuonContainer"],
116 IdTrackContainer=kwargs["IdTrkContainer"])
117 # ------------
118 # Augmentation
119 # ------------
120 # Strings for applying cuts based on augmentations
121 dimuon_flags = ["pass{flag}".format(flag = algo.BranchPrefix) for algo in diMuonSelAcc.getEventAlgos()]
122 skimmingORs = [f"DIMU_{flag} > 0" for flag in dimuon_flags ]
123 acc.merge(diMuonSelAcc)
124
125 # ------------
126 # Augmentation
127 # ------------
128
129 # Augmentation tools
130 MUON5AugmentTools = []
131 muonThinFlags = []
132 trkThinFlags = []
133
134 Muon5ElElSelectionTool = acc.popToolsAndMerge(Muon5ElElSelectionCfg(flags))
135 acc.addPublicTool(Muon5ElElSelectionTool)
136 MUON5AugmentTools.append(Muon5ElElSelectionTool)
137 skimmingORs.append("(count( EGAM1_DiElectronMass3 > 60.0*GeV ) >= 1)")
138
139
140
141 from DerivationFrameworkMuons.TrackIsolationDecoratorConfig import TrackIsolationCfg
142 acc.merge(TrackIsolationCfg(flags, TrackCollection="InDetTrackParticles"))
143 acc.merge(TrackIsolationCfg(flags, TrackCollection="ExtrapolatedMuonTrackParticles"))
144
145 from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
146 contNames = [ "Muons", "Electrons", "Photons" ]
147 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite = False, containerNames = contNames, useSelTools = True, stream_name = stream_name))
148
149
150 from DerivationFrameworkMuons.MuonsToolsConfig import MuonCaloDepositAlgCfg
151 acc.merge(MuonCaloDepositAlgCfg(flags,
152 name = "MuonCaloDepositAlg",
153 ContainerKey="Muons"))
154 acc.merge(MuonCaloDepositAlgCfg(flags,
155 name = "IdTrkCaloDepositDecorator",
156 ContainerKey="InDetTrackParticles"))
158 from BTagging.BTagTrackAugmenterAlgConfig import BTagTrackAugmenterAlgCfg
159 acc.merge(BTagTrackAugmenterAlgCfg(
160 flags,
161 prefix="btagIp_",
162 TrackCollection="InDetTrackParticles",
163 PrimaryVertexCollectionName="PrimaryVertices"
164 ))
165
166 if flags.Input.isMC:
167
168 from DerivationFrameworkFlavourTag.FtagDerivationConfig import TrackTruthDecoratorCfg
169 acc.merge(TrackTruthDecoratorCfg(flags))
170 # For TruthVertexIndex
171 from ParticleJetTools.TruthVertexDecoratorConfig import TruthVertexDecoratorsCfg
172 acc.merge(TruthVertexDecoratorsCfg(flags))
173
174 # --------
175 # Skimming
176 # --------
177
178 #we are applying a Zmumu, Zee and a ttbar emu selection. At the moment tauJets selection is not included
179 #emu selection
180 elReq1 = '(Electrons.pt > 25*GeV && abs(Electrons.eta) < 2.5 && Electrons.DFCommonElectronsLHMedium)'
181 elReq2 = '(Electrons.pt > 3*GeV && abs(Electrons.eta) < 2.8 && Electrons.DFCommonElectronsLHLoose)'
182 muReq1 = '(Muons.DFCommonMuonPassPreselection && Muons.DFCommonMuonPassIDCuts && Muons.pt>25*GeV && abs(Muons.eta) <2.5)'
183 muReq2 = '(Muons.DFCommonMuonPassPreselection && Muons.DFCommonMuonPassIDCuts && Muons.pt>3*GeV && abs(Muons.eta) <2.8)'
184
185 el1 = '(count('+elReq1+') >= 1)'
186 el2 = '(count('+elReq2+') >= 1)'
187 mu1 = '(count('+muReq1+') >= 1)'
188 mu2 = '(count('+muReq2+') >= 1)'
189
190 emuSel='(('+el1+"&&"+mu2+')'+'||'+'('+el2+"&&"+mu1+'))'
191 skimmingORs.append(emuSel)
192
193 lepSelection = '||'.join(skimmingORs)
194
195 MUON5SkimmingTools = []
196 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import xAODStringSkimmingToolCfg
197 # if we are running on upgrade MC (no trigger), we disable the TDT inside the skimming tool.
198 # The TDT is not actually used as we skim only on offline objects.
199 SkimArgs={}
200 if not (flags.Reco.EnableTrigger or flags.Trigger.triggerConfig == 'INFILE'):
201 SkimArgs["TrigDecisionTool"] = ""
202 MUON5SkimmingTool1 = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(flags,
203 name = "MUON5SkimmingTool1",
204 expression = lepSelection,
205 **SkimArgs))
206 MUON5SkimmingTools.append(MUON5SkimmingTool1)
207
208 # --------
209 # Thinning
210 # --------
211
212 MUON5ThinningTools = []
213
214 # Track thinning: only keep tracks with |z0| at primary vertex < 10 mm
215 from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningCfg
216 MUON5TrackThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(flags,
217 name = "MUON5TrackThinningTool",
218 StreamName = stream_name,
219 SelectionString = "abs(InDetTrackParticles.DFCommonInDetTrackZ0AtPV) < 35.0 && abs(InDetTrackParticles.eta) < 3.2",
220 InDetTrackParticlesKey = "InDetTrackParticles")
221 )
222
223 MUON5ThinningTools.append(MUON5TrackThinningTool)
224
225 # Thinning tools
226 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import CaloClusterThinningCfg
227 from DerivationFrameworkMuons.MuonsToolsConfig import AnalysisMuonThinningAlgCfg
228
229 # protect against missing forward tracks in Upgrade
230 fwdTracks = "InDetForwardTrackParticles"
231 if fwdTracks not in flags.Input.Collections:
232 fwdTracks = ""
233 acc.merge(AnalysisMuonThinningAlgCfg(flags,
234 name = "AnalysisMuonThinningAlgMUON5",
235 MuonPassFlags = muonThinFlags,
236 TrkPassFlags = trkThinFlags,
237 StreamName = stream_name,
238 IdTrkFwdThinning=fwdTracks))
239
240
241 # keep topoclusters around muons
242 MUON5ThinningTool1 = acc.getPrimaryAndMerge(CaloClusterThinningCfg(flags,
243 name = "MUON5ThinningTool1",
244 StreamName = stream_name,
245 SGKey = "Muons",
246 SelectionString = "Muons.pt>4*GeV",
247 TopoClCollectionSGKey = "CaloCalTopoClusters",
248 ConeSize = 0.5))
249 MUON5ThinningTools.append(MUON5ThinningTool1)
250
251 # keep egammaclusters around electrons
252 MUON5ThinningTool2 = acc.getPrimaryAndMerge(CaloClusterThinningCfg(flags,
253 name = "MUON5ThinningTool2",
254 StreamName = stream_name,
255 SGKey = "Electrons",
256 SelectionString = "Electrons.pt>4*GeV",
257 CaloClCollectionSGKey = "egammaClusters",
258 ConeSize = 0.4))
259 MUON5ThinningTools.append(MUON5ThinningTool2)
260
261 # keep egammaclusters around photons
262 MUON5ThinningTool3 = acc.getPrimaryAndMerge(CaloClusterThinningCfg(flags,
263 name = "MUON5ThinningTool3",
264 StreamName = stream_name,
265 SGKey = "Photons",
266 SelectionString = "Photons.pt>4*GeV",
267 CaloClCollectionSGKey = "egammaClusters",
268 ConeSize = 0.4))
269 MUON5ThinningTools.append(MUON5ThinningTool3)
270
271
272 muon5CellThinAlg = CompFactory.CaloThinCellsByClusterAlg(
273 'MUON5_CaloThinCellsByClusterAlg_MuonClusterCollection',
274 StreamName = stream_name,
275 Clusters = 'MuonClusterCollection',
276 Cells = 'AllCalo')
277 acc.addEventAlgo(muon5CellThinAlg)
278
279
280 if flags.Input.isMC:
281 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import MenuTruthThinningCfg
282 MUON5TruthThinningTool = acc.getPrimaryAndMerge(MenuTruthThinningCfg(flags,
283 name = "MUON5TruthThinningTool",
284 StreamName = stream_name,
285 WritePartons = False,
286 WriteHadrons = False,
287 WriteCHadrons = True,
288 WriteBHadrons = True,
289 WriteGeant = False,
290 WriteTauHad = True,
291 PartonPtThresh = -1.0,
292 WriteBSM = True,
293 WriteBosons = True,
294 WriteBosonProducts = True,
295 WriteBSMProducts = True,
296 WriteTopAndDecays = True,
297 WriteEverything = False,
298 WriteAllLeptons = True,
299 WriteLeptonsNotFromHadrons = False,
300 WriteNotPhysical = False,
301 WriteFirstN = -1,
302 PreserveAncestors = False,
303 PreserveParentsSiblingsChildren = True,
304 PreserveGeneratorDescendants = False))
305 # Not sure what this should be set to nowadays
306 #SimBarcodeOffset = DerivationFrameworkSimBarcodeOffset)
307 MUON5ThinningTools.append(MUON5TruthThinningTool)
308
309 # --------------------
310 # The kernel algorithm
311 # --------------------
312 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
313 acc.addEventAlgo(DerivationKernel(name,
314 AugmentationTools = MUON5AugmentTools,
315 SkimmingTools = MUON5SkimmingTools,
316 ThinningTools = MUON5ThinningTools))
317 return acc
318
319
320def MUON5Cfg(flags):
321 stream_name = 'StreamDAOD_MUON5'
322 acc = ComponentAccumulator()
323
324 # Get the lists of triggers needed for trigger matching.
325 # This is needed at this scope (for the slimming) and further down in the config chain
326 # for actually configuring the matching, so we create it here and pass it down
327 from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
328 MUON5TriggerListsHelper = TriggerListsHelper(flags)
329
330 # J/psi vertexing
331 from DerivationFrameworkMuons.JPsiVertexFitSetupCfg import AddMCPJPsiVertexFitCfg
332 acc.merge(AddMCPJPsiVertexFitCfg(flags, prefix = 'MUON5'))
333
334 # Common augmentations
335 acc.merge(MUON5KernelCfg(flags, name="MUON5Kernel", StreamName = stream_name, TriggerListsHelper = MUON5TriggerListsHelper))
336
337 #Adding Lepton Taggers
338 from LeptonTaggers.LeptonTaggersConfig import DecorateImprovedPromptLeptonAlgsCfg, DecoratePLITAlgsCfg
339 acc.merge(DecorateImprovedPromptLeptonAlgsCfg(flags))
340 acc.merge(DecoratePLITAlgsCfg(flags))
341
342 # ============================
343 # Define contents of the format
344 # =============================
345 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
346 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
347 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
348
349 MUON5SlimmingHelper = SlimmingHelper("MUON5SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
350 # Many of these are added to AllVariables below as well. We add
351 # these items in both places in case some of the smart collections
352 # add variables from some other collection.
353 MUON5SlimmingHelper.SmartCollections = ["EventInfo",
354 "PrimaryVertices",
355 "InDetTrackParticles",
356 "Electrons",
357 "Photons",
358 "Muons",
359 "AntiKt4EMPFlowJets",
360 "MET_Baseline_AntiKt4EMPFlow",
361 ]
362
363
364 MUON5SlimmingHelper.AllVariables = [
365 "egammaClusters",
366 "CaloCalTopoClusters",
367 "MuonClusterCollection",
368 "TopoClusterIsoCentralEventShape",
369 "TopoClusterIsoForwardEventShape",
370 "GSFConversionVertices",
371 "GSFTrackParticles"
372 "PrimaryVertices",
373 ]
374
375 excludedVertexAuxData = "-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
376 StaticContent = []
377 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
378 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
379 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
380 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
381 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
382 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
383 StaticContent += ["CaloCellContainer#DFMUONCellContainer"]
384 StaticContent += ["CaloClusterCellLinkContainer#MuonClusterCollection_links"]
385
386 MUON5SlimmingHelper.StaticContent = StaticContent
387
388 # Extra content
389 CommonEgammaContent= [
390 "ptcone20","ptcone30","ptcone40", "ptvarcone20", "ptvarcone30", "ptvarcone40", "topoetcone30",
391 "neflowisol20", "neflowisol30", "neflowisol40",
392 "ptvarcone20_Nonprompt_All_MaxWeightTTVA_pt500" ,"ptvarcone20_Nonprompt_All_MaxWeightTTVA_pt1000",
393 "ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500","ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000",
394 "ptvarcone40_Nonprompt_All_MaxWeightTTVA_pt500","ptvarcone40_Nonprompt_All_MaxWeightTTVA_pt1000",
395 "ptcone20_Nonprompt_All_MaxWeightTTVA_pt500", "ptcone20_Nonprompt_All_MaxWeightTTVA_pt1000",
396 "ptcone30_Nonprompt_All_MaxWeightTTVA_pt500", "ptcone30_Nonprompt_All_MaxWeightTTVA_pt1000",
397 "ptcone40_Nonprompt_All_MaxWeightTTVA_pt500", "ptcone40_Nonprompt_All_MaxWeightTTVA_pt1000",
398 "topoetconecoreConeEnergyCorrection"
399 ]
400 ElectronsExtraContent = [
401 ".".join(
402 [
403 "Electrons",
404 "deltaPhiRescaled2","deltaPhiFromLastMeasurement",
405 "originalTrackParticle"
406 ] + CommonEgammaContent
407 )
408 ]
409
410 PhotonsExtraContent = [
411 ".".join(["Photons"] + CommonEgammaContent )
412 ]
413
414 MuonsExtraContent = [
415 ".".join(
416 [
417 "Muons",
418 "MeasEnergyLoss.MeasEnergyLossSigma.EnergyLossSigma.ParamEnergyLoss",
419 "ParamEnergyLossSigmaMinus.ParamEnergyLossSigmaPlus.clusterLink.scatteringCurvatureSignificance",
420 "deltaPhiRescaled2.deltaPhiFromLastMeasurement.scatteringNeighbourSignificance",
421 "ptcone20.ptcone30.ptcone40.ptvarcone20.ptvarcone30.ptvarcone40.topoetcone30",
422 "neflowisol20.neflowisol30.neflowisol40.ptvarcone20_Nonprompt_All_MaxWeightTTVA_pt500",
423 "ptvarcone20_Nonprompt_All_MaxWeightTTVA_pt1000.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500",
424 "ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000.ptvarcone40_Nonprompt_All_MaxWeightTTVA_pt500",
425 "ptvarcone40_Nonprompt_All_MaxWeightTTVA_pt1000.ptcone20_Nonprompt_All_MaxWeightTTVA_pt500",
426 "ptcone20_Nonprompt_All_MaxWeightTTVA_pt1000.ptcone30_Nonprompt_All_MaxWeightTTVA_pt500",
427 "ptcone30_Nonprompt_All_MaxWeightTTVA_pt1000.ptcone40_Nonprompt_All_MaxWeightTTVA_pt500",
428 "ptcone40_Nonprompt_All_MaxWeightTTVA_pt1000",
429 "msInnerMatchChi2",
430 ]
431 )
432 ]
433
434 InDetTrackParticlesExtraContent = [
435 ".".join(
436 [
437 "InDetTrackParticles","TTVA_AMVFVertices.TTVA_AMVFWeights",
438 "btagIp_d0.btagIp_z0SinTheta.btagIp_d0Uncertainty.btagIp_z0SinThetaUncertainty",
439 "numberOfNextToInnermostPixelLayerHits.numberOfInnermostPixelLayerSharedHits",
440 "numberOfInnermostPixelLayerSplitHits.numberOfPixelSplitHits.leptonID"
441 ]
442 )
443 ]
444
445 ExtraVariables = ElectronsExtraContent + PhotonsExtraContent + MuonsExtraContent + InDetTrackParticlesExtraContent
446 MUON5SlimmingHelper.ExtraVariables += ExtraVariables
447 MUON5SlimmingHelper.ExtraVariables += [
448 "CombinedMuonTrackParticles.definingParametersCovMatrix.definingParametersCovMatrix.vertexLink",
449 "ExtrapolatedMuonTrackParticles.definingParametersCovMatrix.vertexLink",
450 "MuonSpectrometerTrackParticles.definingParametersCovMatrix.vertexLink",
451 "CaloCalTopoClusters.calE.calEta.calM.calPhi.e_sampl.rawM.rawPhi.rawEta.rawE",
452 "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ",
453 "TauJets.jetLink",
454 ]
455 from LeptonTaggers.LeptonTaggersConfig import GetExtraImprovedPromptVariablesForDxAOD, GetExtraPLITVariablesForDxAOD
456 MUON5SlimmingHelper.ExtraVariables += GetExtraImprovedPromptVariablesForDxAOD()
457 MUON5SlimmingHelper.ExtraVariables += GetExtraPLITVariablesForDxAOD()
458
459 from DerivationFrameworkEGamma.ElectronsCPDetailedContent import ElectronsCPDetailedContent
460 MUON5SlimmingHelper.ExtraVariables += ElectronsCPDetailedContent
461 from DerivationFrameworkEGamma.ElectronsCPDetailedContent import GSFTracksCPDetailedContent
462 MUON5SlimmingHelper.ExtraVariables += GSFTracksCPDetailedContent
463
464 # Truth content
465 if flags.Input.isMC:
466 MUON5SlimmingHelper.SmartCollections += [
467 "AntiKt4TruthJets",
468 "AntiKt4TruthDressedWZJets",
469 ]
470 MUON5SlimmingHelper.AllVariables += [
471 "TruthBottom",
472 "TruthCharm",
473 "TruthElectrons",
474 "TruthMuons",
475 "TruthNeutrinos",
476 "TruthPhotons",
477 "TruthTaus",
478 "TruthEvents",
479 "TruthPrimaryVertices",
480 "TruthVertices",
481 ]
482 MUON5SlimmingHelper.ExtraVariables+= [
483 "TruthPrimaryVertices.t.x.y.z",
484 "InDetTrackParticles.ftagTruthTypeLabel.ftagTruthOriginLabel.ftagTruthVertexIndex"
485 ]
486
487
488 # Trigger content
489 MUON5SlimmingHelper.IncludeTriggerNavigation = False
490 MUON5SlimmingHelper.IncludeJetTriggerContent = False
491 MUON5SlimmingHelper.IncludeMuonTriggerContent = False
492 MUON5SlimmingHelper.IncludeEGammaTriggerContent = False
493 MUON5SlimmingHelper.IncludeTauTriggerContent = False
494 MUON5SlimmingHelper.IncludeEtMissTriggerContent = False
495 MUON5SlimmingHelper.IncludeBJetTriggerContent = False
496 MUON5SlimmingHelper.IncludeBPhysTriggerContent = False
497 MUON5SlimmingHelper.IncludeMinBiasTriggerContent = False
498
499 # Trigger matching
500 # Run 2
501 if flags.Trigger.EDMVersion == 2:
502 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
503 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = MUON5SlimmingHelper,
504 OutputContainerPrefix = "TrigMatch_",
505 TriggerList = MUON5TriggerListsHelper.Run2TriggerNamesTau)
506 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = MUON5SlimmingHelper,
507 OutputContainerPrefix = "TrigMatch_",
508 TriggerList = MUON5TriggerListsHelper.Run2TriggerNamesNoTau)
509 # Run 3, or Run 2 with navigation conversion
510 if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
511 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
512 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(MUON5SlimmingHelper)
513
514 # Output stream
515 MUON5ItemList = MUON5SlimmingHelper.GetItemList()
516 acc.merge(OutputStreamCfg(flags, "DAOD_MUON5", ItemList=MUON5ItemList, AcceptAlgs=["MUON5Kernel"]))
517 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_MUON5", AcceptAlgs=["MUON5Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
518 return acc
MUON5KernelCfg(flags, name='MUON5Kernel', **kwargs)
Definition MUON5.py:96
MUON5Cfg(flags)
Definition MUON5.py:320
Muon5ElElSelectionCfg(flags)
Definition MUON5.py:53
Muon5MumuSelectionCfg(flags, MuonContainer="Muons", IdTrackContainer="InDetTrackParticles", applyTrigger=False)
Definition MUON5.py:16