ATLAS Offline Software
MCTruthCommonConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 # MCTruthCommonConfig
4 # Contains the configuration for the common truth containers/decorations used in analysis DAODs
5 # including PHYS(LITE)
6 
7 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthDecayCollectionMakerCfg
10 
11 def TruthMetaDataWriterCfg(flags, name):
12  acc = ComponentAccumulator()
13  theTruthMetaDataWriter = CompFactory.DerivationFramework.TruthMetaDataWriter(name)
14  acc.addPublicTool(theTruthMetaDataWriter)
15  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
16  acc.addEventAlgo(CommonAugmentation(f"{name}Kernel", AugmentationTools = [theTruthMetaDataWriter]))
17  return acc
18 
20  """Conversion of HepMC to xAOD truth"""
21  acc = ComponentAccumulator()
22 
23  # Only run for MC input
24  if flags.Input.isMC is False:
25  raise RuntimeError("Common MC truth building requested for non-MC input")
26 
27  # Local steering flag to identify EVNT input
28  # Commented because the block it is needed for isn't working (TruthMetaData)
29  isEVNT = False
30 
31  # Ensure EventInfoCnvAlg is scheduled
32  if "EventInfo#McEventInfo" in flags.Input.TypedCollections and "xAOD::EventInfo#EventInfo" not in flags.Input.TypedCollections:
33  from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
34  acc.merge(EventInfoCnvAlgCfg(flags, inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=True))
35 
36  # Build truth collection if input is HepMC. Must be scheduled first to allow slimming.
37  # Input file is event generator output (EVNT)
38  from xAODTruthCnv.xAODTruthCnvConfig import GEN_EVNT2xAODCfg
39  if "McEventCollection#GEN_EVENT" in flags.Input.TypedCollections:
40  acc.merge(GEN_EVNT2xAODCfg(flags,name="GEN_EVNT2xAOD",AODContainerName="GEN_EVENT"))
41  isEVNT = True
42  # Input file is simulation output (HITS)
43  elif "McEventCollection#TruthEvent" in flags.Input.TypedCollections:
44  acc.merge(GEN_EVNT2xAODCfg(flags,name="GEN_EVNT2xAOD",AODContainerName="TruthEvent"))
45  # This is not really EVNT, but we do need to treat it like EVNT for Metadata
46  isEVNT = True
47  # Input file already has xAOD truth. Don't do anything.
48  elif "xAOD::TruthEventContainer#TruthEvents" in flags.Input.TypedCollections:
49  pass
50  else:
51  raise RuntimeError("No recognised HepMC truth information found in the input")
52 
53  # If it isn't available, make a truth meta data object (will hold MC Event Weights)
54  if "TruthMetaDataContainer#TruthMetaData" not in flags.Input.TypedCollections and not isEVNT:
55  # If we are going to be making the truth collection (isEVNT) then this will be made elsewhere
56  acc.merge(TruthMetaDataWriterCfg(flags, name = 'DFCommonTruthMetaDataWriter'))
57 
58  return acc
59 
60 
61 # Helper for adding truth jet collections via new jet config
62 def AddTruthJetsCfg(flags):
63  acc = ComponentAccumulator()
64 
65  from JetRecConfig.StandardSmallRJets import AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ,AntiKtVRTruthCharged
66  from JetRecConfig.StandardLargeRJets import AntiKt10TruthTrimmed,AntiKt10TruthSoftDrop
67  from JetRecConfig.JetRecConfig import JetRecCfg
68 
69 
70  jetList = [AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ,AntiKtVRTruthCharged,
71  AntiKt10TruthTrimmed,AntiKt10TruthSoftDrop]
72 
73  for jd in jetList:
74  acc.merge(JetRecCfg(flags,jd))
75 
76  return acc
77 
78 # Helper for scheduling the truth MET collection
79 def AddTruthMETCfg(flags):
80 
81  acc = ComponentAccumulator()
82 
83  # Only do this if the truth MET is not present
84  # This should handle EVNT correctly without an explicit check
85  if ( "MissingETContainer#MET_Truth") not in flags.Input.TypedCollections:
86  from METReconstruction.METTruth_Cfg import METTruth_Cfg
87  acc.merge(METTruth_Cfg(flags))
88 
89  return acc
90 
91 def PreJetMCTruthAugmentationsCfg(flags, **kwargs):
92 
93  acc = ComponentAccumulator()
94 
95  augmentationToolsList = []
96 
97  # These augmentations do *not* require truth jets at all
98  # If requested, add a decoration to photons that were used in the dressing
99 
100  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import ( DFCommonTruthElectronDressingToolCfg,
101  DFCommonTruthMuonDressingToolCfg, DFCommonTruthClassificationToolCfg, DFCommonTruthMuonToolCfg, DFCommonTruthElectronToolCfg,
102  DFCommonTruthPhotonToolSimCfg, DFCommonTruthNeutrinoToolCfg, DFCommonTruthBottomToolCfg, DFCommonTruthTopToolCfg,
103  DFCommonTruthBosonToolCfg, DFCommonTruthBSMToolCfg, DFCommonTruthForwardProtonToolCfg, DFCommonTruthElectronIsolationTool1Cfg,
104  DFCommonTruthElectronIsolationTool2Cfg, DFCommonTruthMuonIsolationTool1Cfg, DFCommonTruthMuonIsolationTool2Cfg,
105  DFCommonTruthPhotonIsolationTool1Cfg, DFCommonTruthPhotonIsolationTool2Cfg, DFCommonTruthPhotonIsolationTool3Cfg )
106 
107  # schedule the special truth building tools and add them to a common augmentation; note taus are handled separately below
108  for item in [ DFCommonTruthClassificationToolCfg, DFCommonTruthMuonToolCfg, DFCommonTruthElectronToolCfg,
109  DFCommonTruthPhotonToolSimCfg, DFCommonTruthNeutrinoToolCfg, DFCommonTruthBottomToolCfg, DFCommonTruthTopToolCfg,
110  DFCommonTruthBosonToolCfg, DFCommonTruthBSMToolCfg, DFCommonTruthElectronIsolationTool1Cfg,
111  DFCommonTruthElectronIsolationTool2Cfg, DFCommonTruthMuonIsolationTool1Cfg, DFCommonTruthMuonIsolationTool2Cfg,
112  DFCommonTruthPhotonIsolationTool1Cfg, DFCommonTruthPhotonIsolationTool2Cfg, DFCommonTruthPhotonIsolationTool3Cfg]:
113  augmentationToolsList.append(acc.getPrimaryAndMerge(item(flags)))
114  augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthForwardProtonToolCfg(flags)))
115 
116  if 'decorationDressing' in kwargs:
117  augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthElectronDressingToolCfg(flags, decorationName = kwargs['decorationDressing'])))
118  augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthMuonDressingToolCfg(flags, decorationName = kwargs['decorationDressing'])))
119 
120  for i, tool in enumerate(augmentationToolsList):
121  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(name ="MCTruthCommonPreJetKernelNo{num}".format(num = i+1), AugmentationTools = [tool]))
122 
123 
124  return(acc)
125 
126 
127 def PostJetMCTruthAugmentationsCfg(flags, **kwargs):
128 
129  acc = ComponentAccumulator()
130 
131  # Tau collections are built separately
132  # truth tau matching needs truth jets, truth electrons and truth muons
133  from DerivationFrameworkTau.TauTruthCommonConfig import TauTruthToolsCfg
134  acc.merge(TauTruthToolsCfg(flags))
135  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthTauDressingToolCfg
136  augmentationToolsList = [ acc.getPrimaryAndMerge(DFCommonTruthTauDressingToolCfg(flags)) ]
137 
138  #Save the post-shower HT and MET filter values that will make combining filtered samples easier (adds to the EventInfo)
139  from DerivationFrameworkMCTruth.GenFilterToolConfig import GenFilterToolCfg
140  # schedule the special truth building tools and add them to a common augmentation; note taus are handled separately below
141  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthDressedWZQGLabelToolCfg
142  augmentationToolsList += [ acc.getPrimaryAndMerge(GenFilterToolCfg(flags)) ,
143  acc.getPrimaryAndMerge(DFCommonTruthDressedWZQGLabelToolCfg(flags))]
144 
145  # SUSY signal decorations
146  from DerivationFrameworkSUSY.DecorateSUSYProcessConfig import IsSUSYSignalRun3
147  if IsSUSYSignalRun3(flags):
148  from DerivationFrameworkSUSY.DecorateSUSYProcessConfig import SUSYSignalTaggerCfg
149  augmentationToolsList += [ acc.getPrimaryAndMerge(SUSYSignalTaggerCfg(flags, 'MCTruthCommon')) ]
150 
151  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
152  for i, tool in enumerate(augmentationToolsList):
153  acc.addEventAlgo(CommonAugmentation(name = "MCTruthCommonPostJetKernelNo{num}".format(num = i+1),
154  AugmentationTools = [tool]))
155 
156  # add SoW of individual SUSY final states, relies on augmentation from DecorateSUSYProcess()
157  if IsSUSYSignalRun3(flags):
158  from DerivationFrameworkSUSY.SUSYWeightMetadataConfig import AddSUSYWeightsCfg
159  acc.merge(AddSUSYWeightsCfg(flags))
160 
161  return(acc)
162 
163 # This adds the entirety of TRUTH3
165  decorationDressing='dressedPhoton',
166  includeTausInDressingPhotonRemoval=False,
167  prefix=''):
168 
169  acc = ComponentAccumulator()
170 
171  # Schedule HepMC->xAOD truth conversion
172  acc.merge(HepMCtoXAODTruthCfg(flags))
173 
174  # Local flag
175  isEVNT = False
176  if "McEventCollection#GEN_EVENT" in flags.Input.TypedCollections: isEVNT = True
177  # Tools that must come before jets
178  acc.merge(PreJetMCTruthAugmentationsCfg(flags,decorationDressing = decorationDressing))
179  # Jets and MET
180  acc.merge(AddTruthJetsCfg(flags))
181  acc.merge(AddTruthMETCfg(flags))
182  # Tools that must come after jets
183  acc.merge(PostJetMCTruthAugmentationsCfg(flags, decorationDressing = decorationDressing))
184  # Should photons that are dressed onto taus also be removed from truth jets?
185  if includeTausInDressingPhotonRemoval:
186  acc.getPublicTool("DFCommonTruthTauDressingTool").decorationName=decorationDressing
187  acc.addEventAlgo(CompFactory.DerivationFramework.LockDecorations(name ="AddStandardTruthContentsLockDecoration", Decorations = ['TruthParticles.' + decorationDressing]))
188 
189  # Add back the navigation contect for the collections we want
190  acc.merge(AddTruthCollectionNavigationDecorationsCfg(flags, ["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos", "TruthBSM", "TruthBottom", "TruthTop", "TruthBoson"], prefix=prefix))
191  # Some more additions for standard TRUTH3
192  acc.merge(AddBosonsAndDownstreamParticlesCfg(flags))
193  if isEVNT: acc.merge(AddLargeRJetD2Cfg(flags))
194  # Special collection for BSM particles
195  acc.merge(AddBSMAndDownstreamParticlesCfg(flags))
196  # Special collection for Born leptons
197  acc.merge(AddBornLeptonCollectionCfg(flags))
198  # Energy density for isolation corrections
199  if isEVNT: acc.merge(AddTruthEnergyDensityCfg(flags))
200 
201  return acc
202 
204  generations=1,
205  parents=[6],
206  prefix='TopQuark',
207  collection_prefix=None,
208  rejectHadronChildren=False):
209  """Configure tools for adding immediate parents and descendants"""
210  acc = ComponentAccumulator()
211  collection_name=collection_prefix+'WithDecay' if collection_prefix is not None else 'Truth'+prefix+'WithDecay'
212  # Set up a tool to keep the W/Z/H bosons and all downstream particles
213  collection_maker = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(flags,
214  name ='DFCommon'+prefix+'AndDecaysTool',
215  NewCollectionName = collection_name,
216  PDGIDsToKeep = parents,
217  Generations = generations,
218  RejectHadronChildren = rejectHadronChildren))
219  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
220  kernel_name = 'MCTruthCommon'+prefix+'AndDecaysKernel'
221  acc.addEventAlgo(CommonAugmentation(kernel_name, AugmentationTools = [collection_maker] ))
222  return acc
223 
224 # Next two don't seem to be used for anything...
225 
240 
241 # Add W/Z/H bosons and their downstream particles (notice "boson" here does not include photons and gluons)
243  generations=1,
244  rejectHadronChildren=False):
245  """Add bosons and downstream particles (not photons/gluons)"""
247  generations = generations,
248  parents = [23,24,25],
249  prefix = 'Bosons',
250  rejectHadronChildren = rejectHadronChildren)
251 
252 # Add top quark and their downstream particles
254  generations=1,
255  rejectHadronChildren=False):
256  """Add top quarks and downstream particles"""
258  generations=generations,
259  parents=[6],
260  prefix='TopQuark',
261  rejectHadronChildren=rejectHadronChildren)
262 
264  generations=-1,
265  rejectHadronChildren=False):
266  """Add tau and downstream particles"""
268  generations=generations,
269  parents=[15],
270  prefix='Taus',
271  rejectHadronChildren=rejectHadronChildren)
272 
273 # Following commented methods don't seem to be used for anything...
274 
275 #def addBottomQuarkAndDownstreamParticles(kernel=None, generations=1, rejectHadronChildren=False):
276 # return addParentAndDownstreamParticles(kernel=kernel,
277 # generations=generations,
278 # parents=[5],
279 # prefix='BottomQuark',
280 # rejectHadronChildren=rejectHadronChildren)
281 #
282 #
283 
290 
291 # Add b/c-hadrons and their downstream particles (immediate and further decay products) in a special collection
292 def AddHFAndDownstreamParticlesCfg(flags, **kwargs):
293  """Add b/c-hadrons and their downstream particles"""
294  kwargs.setdefault("addB",True)
295  kwargs.setdefault("addC",True)
296  kwargs.setdefault("generations",-1)
297  kwargs.setdefault("prefix",'')
298  acc = ComponentAccumulator()
299  # Set up a tool to keep b- and c-quarks and all downstream particles
300  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthDecayCollectionMakerCfg
301  DFCommonHFAndDecaysTool = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(
302  flags,
303  name=kwargs['prefix']+"DFCommonHFAndDecaysTool",
304  NewCollectionName=kwargs['prefix']+"TruthHFWithDecay",
305  KeepBHadrons=kwargs['addB'],
306  KeepCHadrons=kwargs['addC'],
307  Generations=kwargs['generations']))
308  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
309  kwargs['prefix']+"MCTruthCommonHFAndDecaysKernel",
310  AugmentationTools = [DFCommonHFAndDecaysTool] ))
311  return acc
312 
313 
314 # Add a one-vertex-per event "primary vertex" container
316  """Add a one-vertex-per event "primary vertex" container"""
317  acc = ComponentAccumulator()
318  # Set up a tool to keep the primary vertices
319  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthPVCollectionMakerCfg
320  DFCommonTruthPVCollTool = acc.getPrimaryAndMerge(TruthPVCollectionMakerCfg(
321  flags,
322  name="DFCommonTruthPVCollTool",
323  NewCollectionName="TruthPrimaryVertices"))
324  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
325  "MCTruthCommonTruthPVCollKernel",
326  AugmentationTools = [DFCommonTruthPVCollTool] ))
327  return acc
328 
329 
330 # Add navigation decorations on the truth collections
331 def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix=''):
332  """Tool to add navigation decorations on the truth collections"""
333  acc = ComponentAccumulator()
334  if len(TruthCollections)==0: return
335  # Set up a tool to add the navigation decorations
336  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthNavigationDecoratorCfg
337  DFCommonTruthNavigationDecorator = acc.getPrimaryAndMerge(TruthNavigationDecoratorCfg(flags,
338  name = prefix+'DFCommonTruthNavigationDecorator',
339  InputCollections = TruthCollections))
340  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
341  acc.addEventAlgo(CommonAugmentation(prefix+"MCTruthNavigationDecoratorKernel",
342  AugmentationTools = [DFCommonTruthNavigationDecorator] ))
343  return acc
344 
345 # Add BSM particles and their downstream particles (immediate and further decay products) in a special collection
346 def AddBSMAndDownstreamParticlesCfg(flags, generations=-1):
347  """Add BSM particles and their downstream particles in a special collection"""
348  acc = ComponentAccumulator()
349  # Set up a tool to keep the taus and all downstream particles
350 
351  DFCommonBSMAndDecaysTool = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(flags,
352  name = "DFCommonBSMAndDecaysTool",
353  NewCollectionName = "TruthBSMWithDecay",
354  KeepBSM = True,
355  Generations = generations))
356  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
357  acc.addEventAlgo(CommonAugmentation(name = "MCTruthCommonBSMAndDecaysKernel",
358  AugmentationTools = [DFCommonBSMAndDecaysTool] ))
359  return acc
360 
361 # Add a mini-collection for the born leptons
363  """Add born leptons as a mini collection"""
364  acc = ComponentAccumulator()
365  # Set up a tool to keep the taus and all downstream particles
366  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthBornLeptonCollectionMakerCfg
367  DFCommonBornLeptonCollTool = acc.getPrimaryAndMerge(TruthBornLeptonCollectionMakerCfg(flags,
368  name = "DFCommonBornLeptonCollTool",
369  NewCollectionName ="BornLeptons"))
370  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
371  acc.addEventAlgo(CommonAugmentation("MCTruthCommonBornLeptonsKernel", AugmentationTools = [DFCommonBornLeptonCollTool] ))
372  return acc
373 
374 def AddLargeRJetD2Cfg(flags):
375  """Add large-R jet D2 variable"""
376  #Extra classifier for D2 variable
377  acc = ComponentAccumulator()
378  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthD2DecoratorCfg
379  theTruthD2Decorator = acc.getPrimaryAndMerge(TruthD2DecoratorCfg(flags,
380  name = "TruthD2Decorator",
381  JetContainerKey = "AntiKt10TruthSoftDropBeta100Zcut10Jets",
382  DecorationName = "D2"))
383  TruthD2DecoratorKernel = CompFactory.DerivationFramework.CommonAugmentation
384  acc.addEventAlgo(TruthD2DecoratorKernel("TRUTHD2Kernel", AugmentationTools = [theTruthD2Decorator] ))
385  return acc
386 
387 # Truth energy density tools
389  """Truth energy density tools"""
390  acc = ComponentAccumulator()
391  from EventShapeTools.EventDensityConfig import configEventDensityTool
392  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
393  EventDensityAthAlg = CompFactory.EventDensityAthAlg
394  # Algorithms for the energy density - needed only if e/gamma hasn't set things up already
395  DFCommonTruthCentralEDTool = configEventDensityTool("DFCommonTruthCentralEDTool",
396  cst.Truth,
397  0.5,
398  AbsRapidityMax = 1.5,
399  OutputContainer = "TruthIsoCentralEventShape",
400  )
401  acc.addPublicTool(DFCommonTruthCentralEDTool)
402  acc.addEventAlgo(EventDensityAthAlg("DFCommonTruthCentralEDAlg", EventDensityTool = DFCommonTruthCentralEDTool ))
403  DFCommonTruthForwardEDTool = configEventDensityTool("DFCommonTruthForwardEDTool",
404  cst.Truth,
405  0.5,
406  AbsRapidityMin = 1.5,
407  AbsRapidityMax = 3.0,
408  OutputContainer = "TruthIsoForwardEventShape",
409  )
410  acc.addPublicTool(DFCommonTruthForwardEDTool)
411  acc.addEventAlgo(EventDensityAthAlg("DFCommonTruthForwardEDAlg", EventDensityTool = DFCommonTruthForwardEDTool ))
412 
413  # Now add the tool to do the decoration
414  DFCommonTruthEDDecorator = CompFactory.DerivationFramework.TruthEDDecorator("DFCommonTruthEDDecorator",
415  EventInfoName="EventInfo",
416  EnergyDensityKeys=["TruthIsoCentralEventShape","TruthIsoForwardEventShape"],
417  DecorationSuffix="_rho"
418  )
419  acc.addPublicTool(DFCommonTruthEDDecorator)
420 
421  DFCommonTruthEDKernel = CompFactory.DerivationFramework.CommonAugmentation
422  acc.addEventAlgo(DFCommonTruthEDKernel("DFCommonTruthEDKernel", AugmentationTools = [DFCommonTruthEDDecorator] ))
423  return acc
424 
425 
426 # Sets up modifiers to move pointers to old truth collections to new mini truth collections
427 def AddMiniTruthCollectionLinksCfg(flags, **kwargs):
428  """Tool to move pointers to new mini truth collections"""
429  acc = ComponentAccumulator()
430  kwargs.setdefault("doElectrons",True)
431  kwargs.setdefault("doPhotons",True)
432  kwargs.setdefault("doMuons",True)
433  aug_tools = []
434  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthLinkRepointToolCfg
435  if kwargs['doElectrons']:
436  electron_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
437  flags,
438  name="ElMiniCollectionTruthLinkTool",
439  RecoCollection="Electrons",
440  TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
441  aug_tools += [ electron_relink ]
442  if kwargs['doPhotons']:
443  photon_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
444  flags,
445  name="PhMiniCollectionTruthLinkTool",
446  RecoCollection="Photons",
447  TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
448  aug_tools += [ photon_relink ]
449  if kwargs['doMuons']:
450  muon_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
451  flags,
452  name="MuMiniCollectionTruthLinkTool",
453  RecoCollection="Muons",
454  TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
455  aug_tools += [ muon_relink ]
456  for i, tool in enumerate(aug_tools):
457  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
458  "MiniCollectionTruthLinkKernelNo{num}".format(num=i+1),
459  AugmentationTools = [tool] ))
460  return acc
461 
463  slimmer.AllVariables += [
464  "MET_Truth",
465  "TruthElectrons",
466  "TruthMuons",
467  "TruthPhotons",
468  "TruthTaus",
469  "TruthNeutrinos",
470  "TruthBSM",
471  "TruthBottom",
472  "TruthTop",
473  "TruthBoson",
474  "TruthForwardProtons",
475  "BornLeptons",
476  "TruthBosonsWithDecayParticles",
477  "TruthBosonsWithDecayVertices",
478  "TruthBSMWithDecayParticles",
479  "TruthBSMWithDecayVertices",
480  ]
481  slimmer.ExtraVariables += [
482  "AntiKt4TruthDressedWZJets.GhostCHadronsFinalCount.GhostBHadronsFinalCount.pt.HadronConeExclTruthLabelID.PartonTruthLabelID.TrueFlavor",
483  "AntiKt10TruthSoftDropBeta100Zcut10Jets.pt.Tau1_wta.Tau2_wta.Tau3_wta.D2",
484  "TruthEvents.Q.XF1.XF2.PDGID1.PDGID2.PDFID1.PDFID2.X1.X2.crossSection"]
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
python.TruthDerivationToolsConfig.TruthD2DecoratorCfg
def TruthD2DecoratorCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:120
python.MCTruthCommonConfig.AddStandardTruthContentsCfg
def AddStandardTruthContentsCfg(flags, decorationDressing='dressedPhoton', includeTausInDressingPhotonRemoval=False, prefix='')
Definition: MCTruthCommonConfig.py:164
python.TruthDerivationToolsConfig.TruthBornLeptonCollectionMakerCfg
def TruthBornLeptonCollectionMakerCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:205
python.MCTruthCommonConfig.AddBosonsAndDownstreamParticlesCfg
def AddBosonsAndDownstreamParticlesCfg(flags, generations=1, rejectHadronChildren=False)
Add taus and their downstream particles (immediate and further decay products) in a special collectio...
Definition: MCTruthCommonConfig.py:242
python.MCTruthCommonConfig.AddTauAndDownstreamParticlesCfg
def AddTauAndDownstreamParticlesCfg(flags, generations=-1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:263
python.MCTruthCommonConfig.AddMiniTruthCollectionLinksCfg
def AddMiniTruthCollectionLinksCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:427
python.MCTruthCommonConfig.AddPVCollectionCfg
def AddPVCollectionCfg(flags)
Definition: MCTruthCommonConfig.py:315
EventDensityConfig.configEventDensityTool
def configEventDensityTool(name, jetOrConstitdef, radius=0.4, **options)
Definition: EventDensityConfig.py:36
python.TruthDerivationToolsConfig.TruthLinkRepointToolCfg
def TruthLinkRepointToolCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:382
python.TruthDerivationToolsConfig.TruthDecayCollectionMakerCfg
def TruthDecayCollectionMakerCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:197
python.MCTruthCommonConfig.TruthMetaDataWriterCfg
def TruthMetaDataWriterCfg(flags, name)
Definition: MCTruthCommonConfig.py:11
python.MCTruthCommonConfig.AddTopQuarkAndDownstreamParticlesCfg
def AddTopQuarkAndDownstreamParticlesCfg(flags, generations=1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:253
xAODTruthCnvConfig.GEN_EVNT2xAODCfg
def GEN_EVNT2xAODCfg(flags, name="GEN_EVNT2xAOD", **kwargs)
Definition: xAODTruthCnvConfig.py:5
python.MCTruthCommonConfig.AddLargeRJetD2Cfg
def AddLargeRJetD2Cfg(flags)
Definition: MCTruthCommonConfig.py:374
python.MCTruthCommonConfig.AddBornLeptonCollectionCfg
def AddBornLeptonCollectionCfg(flags)
Definition: MCTruthCommonConfig.py:362
python.TruthDerivationToolsConfig.DFCommonTruthTauDressingToolCfg
def DFCommonTruthTauDressingToolCfg(flags)
Definition: TruthDerivationToolsConfig.py:269
python.MCTruthCommonConfig.AddTruthMETCfg
def AddTruthMETCfg(flags)
Definition: MCTruthCommonConfig.py:79
python.MCTruthCommonConfig.AddBSMAndDownstreamParticlesCfg
def AddBSMAndDownstreamParticlesCfg(flags, generations=-1)
Definition: MCTruthCommonConfig.py:346
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:36
python.TruthDerivationToolsConfig.DFCommonTruthForwardProtonToolCfg
def DFCommonTruthForwardProtonToolCfg(flags)
Definition: TruthDerivationToolsConfig.py:106
python.MCTruthCommonConfig.PreJetMCTruthAugmentationsCfg
def PreJetMCTruthAugmentationsCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:91
python.SUSYWeightMetadataConfig.AddSUSYWeightsCfg
def AddSUSYWeightsCfg(flags, pref="")
Definition: SUSYWeightMetadataConfig.py:31
python.MCTruthCommonConfig.HepMCtoXAODTruthCfg
def HepMCtoXAODTruthCfg(flags)
Definition: MCTruthCommonConfig.py:19
python.MCTruthCommonConfig.PostJetMCTruthAugmentationsCfg
def PostJetMCTruthAugmentationsCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:127
python.MCTruthCommonConfig.AddTruthEnergyDensityCfg
def AddTruthEnergyDensityCfg(flags)
Definition: MCTruthCommonConfig.py:388
python.MCTruthCommonConfig.AddParentAndDownstreamParticlesCfg
def AddParentAndDownstreamParticlesCfg(flags, generations=1, parents=[6], prefix='TopQuark', collection_prefix=None, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:203
python.GenFilterToolConfig.GenFilterToolCfg
def GenFilterToolCfg(flags)
Definition: GenFilterToolConfig.py:8
python.TruthDerivationToolsConfig.DFCommonTruthMuonDressingToolCfg
def DFCommonTruthMuonDressingToolCfg(flags, decorationName="dressedPhoton")
Definition: TruthDerivationToolsConfig.py:259
python.TruthDerivationToolsConfig.TruthPVCollectionMakerCfg
def TruthPVCollectionMakerCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:392
python.TruthDerivationToolsConfig.TruthNavigationDecoratorCfg
def TruthNavigationDecoratorCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:189
python.TauTruthCommonConfig.TauTruthToolsCfg
def TauTruthToolsCfg(flags)
Definition: TauTruthCommonConfig.py:44
python.MCTruthCommonConfig.AddHFAndDownstreamParticlesCfg
def AddHFAndDownstreamParticlesCfg(flags, **kwargs)
Add electrons, photons, and their downstream particles in a special collection def addEgammaAndDownst...
Definition: MCTruthCommonConfig.py:292
python.DecorateSUSYProcessConfig.IsSUSYSignalRun3
def IsSUSYSignalRun3(flags)
Definition: DecorateSUSYProcessConfig.py:8
python.DecorateSUSYProcessConfig.SUSYSignalTaggerCfg
def SUSYSignalTaggerCfg(flags, derivationName)
Definition: DecorateSUSYProcessConfig.py:49
item
Definition: ItemListSvc.h:43
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.MCTruthCommonConfig.AddTruthCollectionNavigationDecorationsCfg
def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix='')
Definition: MCTruthCommonConfig.py:331
python.TruthDerivationToolsConfig.DFCommonTruthDressedWZQGLabelToolCfg
def DFCommonTruthDressedWZQGLabelToolCfg(flags)
Definition: TruthDerivationToolsConfig.py:357
EventDensityAthAlg
Definition: EventDensityAthAlg.h:24
python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg
def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
Definition: xAODEventInfoCnvConfig.py:11
python.TruthDerivationToolsConfig.DFCommonTruthElectronDressingToolCfg
def DFCommonTruthElectronDressingToolCfg(flags, decorationName="dressedPhoton")
Definition: TruthDerivationToolsConfig.py:249
python.MCTruthCommonConfig.AddTruthJetsCfg
def AddTruthJetsCfg(flags)
Definition: MCTruthCommonConfig.py:62
METTruth_Cfg
Definition: METTruth_Cfg.py:1