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