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 
64  acc = ComponentAccumulator()
65 
66  from JetRecConfig.StandardSmallRJets import AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ,AntiKtVRTruthCharged
67  from JetRecConfig.StandardLargeRJets import AntiKt10TruthSoftDrop
68  from JetRecConfig.JetRecConfig import JetRecCfg
69 
70  inputCollections = set(flags.Input.Collections)
71  jetList = [AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ,AntiKtVRTruthCharged,
72  AntiKt10TruthSoftDrop]
73 
74  for jd in jetList:
75  # Encode the expected name to match the bytes in inputCollections.
76  expectedName = jd.fullname().encode("utf-8")
77  if expectedName in inputCollections:
78  continue
79  acc.merge(JetRecCfg(flags, jd))
80  return acc
81 
82 # Helper for scheduling the truth MET collection
83 def AddTruthMETCfg(flags):
84 
85  acc = ComponentAccumulator()
86 
87  # Only do this if the truth MET is not present
88  # This should handle EVNT correctly without an explicit check
89  if ( "MissingETContainer#MET_Truth") not in flags.Input.TypedCollections:
90  from METReconstruction.METTruth_Cfg import METTruth_Cfg
91  acc.merge(METTruth_Cfg(flags))
92 
93  return acc
94 
95 def PreJetMCTruthAugmentationsCfg(flags, **kwargs):
96 
97  acc = ComponentAccumulator()
98 
99  augmentationToolsList = []
100 
101  # These augmentations do *not* require truth jets at all
102  # If requested, add a decoration to photons that were used in the dressing
103 
104  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import ( DFCommonTruthElectronDressingToolCfg,
105  DFCommonTruthMuonDressingToolCfg, DFCommonTruthClassificationToolCfg, DFCommonTruthMuonToolCfg, DFCommonTruthElectronToolCfg,
106  DFCommonTruthPhotonToolSimCfg, DFCommonTruthNeutrinoToolCfg, DFCommonTruthBottomToolCfg, DFCommonTruthTopToolCfg,
107  DFCommonTruthBosonToolCfg, DFCommonTruthBSMToolCfg, DFCommonTruthForwardProtonToolCfg, DFCommonTruthElectronIsolationTool1Cfg,
108  DFCommonTruthElectronIsolationTool2Cfg, DFCommonTruthMuonIsolationTool1Cfg, DFCommonTruthMuonIsolationTool2Cfg,
109  DFCommonTruthPhotonIsolationTool1Cfg, DFCommonTruthPhotonIsolationTool2Cfg, DFCommonTruthPhotonIsolationTool3Cfg )
110 
111  # schedule the special truth building tools and add them to a common augmentation; note taus are handled separately below
112  for item in [ DFCommonTruthClassificationToolCfg, DFCommonTruthMuonToolCfg, DFCommonTruthElectronToolCfg,
113  DFCommonTruthPhotonToolSimCfg, DFCommonTruthNeutrinoToolCfg, DFCommonTruthBottomToolCfg, DFCommonTruthTopToolCfg,
114  DFCommonTruthBosonToolCfg, DFCommonTruthBSMToolCfg, DFCommonTruthElectronIsolationTool1Cfg,
115  DFCommonTruthElectronIsolationTool2Cfg, DFCommonTruthMuonIsolationTool1Cfg, DFCommonTruthMuonIsolationTool2Cfg,
116  DFCommonTruthPhotonIsolationTool1Cfg, DFCommonTruthPhotonIsolationTool2Cfg, DFCommonTruthPhotonIsolationTool3Cfg]:
117  augmentationToolsList.append(acc.getPrimaryAndMerge(item(flags)))
118  augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthForwardProtonToolCfg(flags)))
119 
120  if 'decorationDressing' in kwargs:
121  augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthElectronDressingToolCfg(flags, decorationName = kwargs['decorationDressing'])))
122  augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthMuonDressingToolCfg(flags, decorationName = kwargs['decorationDressing'])))
123 
124  for i, tool in enumerate(augmentationToolsList):
125  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(name ="MCTruthCommonPreJetKernelNo{num}".format(num = i+1), AugmentationTools = [tool]))
126 
127 
128  return(acc)
129 
130 
131 def PostJetMCTruthAugmentationsCfg(flags, **kwargs):
132 
133  acc = ComponentAccumulator()
134 
135  # Tau collections are built separately
136  # truth tau matching needs truth jets, truth electrons and truth muons
137  from DerivationFrameworkTau.TauTruthCommonConfig import TauTruthToolsCfg
138  acc.merge(TauTruthToolsCfg(flags))
139  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthTauDressingToolCfg
140  augmentationToolsList = [ acc.getPrimaryAndMerge(DFCommonTruthTauDressingToolCfg(flags)) ]
141 
142  #Save the post-shower HT and MET filter values that will make combining filtered samples easier (adds to the EventInfo)
143  from DerivationFrameworkMCTruth.GenFilterToolConfig import GenFilterToolCfg
144  # schedule the special truth building tools and add them to a common augmentation; note taus are handled separately below
145  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthDressedWZQGLabelToolCfg
146  augmentationToolsList += [ acc.getPrimaryAndMerge(GenFilterToolCfg(flags)) ,
147  acc.getPrimaryAndMerge(DFCommonTruthDressedWZQGLabelToolCfg(flags))]
148 
149  # SUSY signal decorations
150  from DerivationFrameworkSUSY.DecorateSUSYProcessConfig import IsSUSYSignalRun3
151  if IsSUSYSignalRun3(flags):
152  from DerivationFrameworkSUSY.DecorateSUSYProcessConfig import SUSYSignalTaggerCfg
153  augmentationToolsList += [ acc.getPrimaryAndMerge(SUSYSignalTaggerCfg(flags, 'MCTruthCommon')) ]
154 
155  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
156  for i, tool in enumerate(augmentationToolsList):
157  acc.addEventAlgo(CommonAugmentation(name = "MCTruthCommonPostJetKernelNo{num}".format(num = i+1),
158  AugmentationTools = [tool]))
159 
160  # add SoW of individual SUSY final states, relies on augmentation from DecorateSUSYProcess()
161  if IsSUSYSignalRun3(flags):
162  from DerivationFrameworkSUSY.SUSYWeightMetadataConfig import AddSUSYWeightsCfg
163  acc.merge(AddSUSYWeightsCfg(flags))
164 
165  return(acc)
166 
167 # This adds the entirety of TRUTH3
169  decorationDressing='dressedPhoton',
170  includeTausInDressingPhotonRemoval=False,
171  prefix=''):
172 
173  acc = ComponentAccumulator()
174 
175  # Schedule HepMC->xAOD truth conversion
176  acc.merge(HepMCtoXAODTruthCfg(flags))
177 
178  # Local flag
179  isEVNT = False
180  if "McEventCollection#GEN_EVENT" in flags.Input.TypedCollections: isEVNT = True
181  # Tools that must come before jets
182  acc.merge(PreJetMCTruthAugmentationsCfg(flags,decorationDressing = decorationDressing))
183  # Jets and MET
184  acc.merge(AddTruthJetsCfg(flags))
185  acc.merge(AddTruthMETCfg(flags))
186  # Tools that must come after jets
187  acc.merge(PostJetMCTruthAugmentationsCfg(flags))
188  # Should photons that are dressed onto taus also be removed from truth jets?
189  if includeTausInDressingPhotonRemoval:
190  acc.getPublicTool("DFCommonTruthTauDressingTool").decorationName=decorationDressing+"_tau"
191 
192  # Add back the navigation contect for the collections we want
193  acc.merge(AddTruthCollectionNavigationDecorationsCfg(flags, ["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos", "TruthBSM", "TruthBottom", "TruthTop", "TruthBoson"], prefix=prefix))
194  # Some more additions for standard TRUTH3
195  acc.merge(AddBosonsAndDownstreamParticlesCfg(flags))
196  if isEVNT: acc.merge(AddLargeRJetD2Cfg(flags))
197  # Special collection for BSM particles
198  acc.merge(AddBSMAndDownstreamParticlesCfg(flags))
199  # Special collection for Born leptons
200  acc.merge(AddBornLeptonCollectionCfg(flags))
201  # Energy density for isolation corrections
202  if isEVNT: acc.merge(AddTruthEnergyDensityCfg(flags))
203 
204  return acc
205 
207  generations=1,
208  parents=[6],
209  prefix='TopQuark',
210  collection_prefix=None,
211  rejectHadronChildren=False):
212  """Configure tools for adding immediate parents and descendants"""
213  acc = ComponentAccumulator()
214  collection_name=collection_prefix+'WithDecay' if collection_prefix is not None else 'Truth'+prefix+'WithDecay'
215  # Set up a tool to keep the W/Z/H bosons and all downstream particles
216  collection_maker = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(flags,
217  name ='DFCommon'+prefix+'AndDecaysTool',
218  NewCollectionName = collection_name,
219  PDGIDsToKeep = parents,
220  Generations = generations,
221  RejectHadronChildren = rejectHadronChildren))
222  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
223  kernel_name = 'MCTruthCommon'+prefix+'AndDecaysKernel'
224  acc.addEventAlgo(CommonAugmentation(kernel_name, AugmentationTools = [collection_maker] ))
225  return acc
226 
227 # Next two don't seem to be used for anything...
228 
243 
244 # Add W/Z/H bosons and their downstream particles (notice "boson" here does not include photons and gluons)
246  generations=1,
247  rejectHadronChildren=False):
248  """Add bosons and downstream particles (not photons/gluons)"""
250  generations = generations,
251  parents = [23,24,25],
252  prefix = 'Bosons',
253  rejectHadronChildren = rejectHadronChildren)
254 
255 # Add top quark and their downstream particles
257  generations=1,
258  rejectHadronChildren=False):
259  """Add top quarks and downstream particles"""
261  generations=generations,
262  parents=[6],
263  prefix='TopQuark',
264  rejectHadronChildren=rejectHadronChildren)
265 
267  generations=-1,
268  rejectHadronChildren=False):
269  """Add tau and downstream particles"""
271  generations=generations,
272  parents=[15],
273  prefix='Taus',
274  rejectHadronChildren=rejectHadronChildren)
275 
276 # Following commented methods don't seem to be used for anything...
277 
278 #def addBottomQuarkAndDownstreamParticles(kernel=None, generations=1, rejectHadronChildren=False):
279 # return addParentAndDownstreamParticles(kernel=kernel,
280 # generations=generations,
281 # parents=[5],
282 # prefix='BottomQuark',
283 # rejectHadronChildren=rejectHadronChildren)
284 #
285 #
286 
293 
294 # Add b/c-hadrons and their downstream particles (immediate and further decay products) in a special collection
295 def AddHFAndDownstreamParticlesCfg(flags, **kwargs):
296  """Add b/c-hadrons and their downstream particles"""
297  kwargs.setdefault("addB",True)
298  kwargs.setdefault("addC",True)
299  kwargs.setdefault("generations",-1)
300  kwargs.setdefault("prefix",'')
301  acc = ComponentAccumulator()
302  # Set up a tool to keep b- and c-quarks and all downstream particles
303  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthDecayCollectionMakerCfg
304  DFCommonHFAndDecaysTool = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(
305  flags,
306  name=kwargs['prefix']+"DFCommonHFAndDecaysTool",
307  NewCollectionName=kwargs['prefix']+"TruthHFWithDecay",
308  KeepBHadrons=kwargs['addB'],
309  KeepCHadrons=kwargs['addC'],
310  Generations=kwargs['generations']))
311  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
312  kwargs['prefix']+"MCTruthCommonHFAndDecaysKernel",
313  AugmentationTools = [DFCommonHFAndDecaysTool] ))
314  return acc
315 
316 
317 # Add a one-vertex-per event "primary vertex" container
319  """Add a one-vertex-per event "primary vertex" container"""
320  acc = ComponentAccumulator()
321  # Set up a tool to keep the primary vertices
322  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthPVCollectionMakerCfg
323  DFCommonTruthPVCollTool = acc.getPrimaryAndMerge(TruthPVCollectionMakerCfg(
324  flags,
325  name="DFCommonTruthPVCollTool",
326  NewCollectionName="TruthPrimaryVertices"))
327  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
328  "MCTruthCommonTruthPVCollKernel",
329  AugmentationTools = [DFCommonTruthPVCollTool] ))
330  return acc
331 
332 
333 # Add navigation decorations on the truth collections
334 def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix=''):
335  """Tool to add navigation decorations on the truth collections"""
336  acc = ComponentAccumulator()
337  if len(TruthCollections)==0: return
338  # Set up a tool to add the navigation decorations
339  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthNavigationDecoratorCfg
340  DFCommonTruthNavigationDecorator = acc.getPrimaryAndMerge(TruthNavigationDecoratorCfg(flags,
341  name = prefix+'DFCommonTruthNavigationDecorator',
342  InputCollections = TruthCollections))
343  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
344  acc.addEventAlgo(CommonAugmentation(prefix+"MCTruthNavigationDecoratorKernel",
345  AugmentationTools = [DFCommonTruthNavigationDecorator] ))
346  return acc
347 
348 # Add BSM particles and their downstream particles (immediate and further decay products) in a special collection
349 def AddBSMAndDownstreamParticlesCfg(flags, generations=-1):
350  """Add BSM particles and their downstream particles in a special collection"""
351  acc = ComponentAccumulator()
352  # Set up a tool to keep the taus and all downstream particles
353 
354  DFCommonBSMAndDecaysTool = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(flags,
355  name = "DFCommonBSMAndDecaysTool",
356  NewCollectionName = "TruthBSMWithDecay",
357  KeepBSM = True,
358  Generations = generations))
359  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
360  acc.addEventAlgo(CommonAugmentation(name = "MCTruthCommonBSMAndDecaysKernel",
361  AugmentationTools = [DFCommonBSMAndDecaysTool] ))
362  return acc
363 
364 # Add a mini-collection for the born leptons
366  """Add born leptons as a mini collection"""
367  acc = ComponentAccumulator()
368  # Set up a tool to keep the taus and all downstream particles
369  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthBornLeptonCollectionMakerCfg
370  DFCommonBornLeptonCollTool = acc.getPrimaryAndMerge(TruthBornLeptonCollectionMakerCfg(flags,
371  name = "DFCommonBornLeptonCollTool",
372  NewCollectionName ="BornLeptons"))
373  CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
374  acc.addEventAlgo(CommonAugmentation("MCTruthCommonBornLeptonsKernel", AugmentationTools = [DFCommonBornLeptonCollTool] ))
375  return acc
376 
377 def AddLargeRJetD2Cfg(flags):
378  """Add large-R jet D2 variable"""
379  #Extra classifier for D2 variable
380  acc = ComponentAccumulator()
381  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthD2DecoratorCfg
382  theTruthD2Decorator = acc.getPrimaryAndMerge(TruthD2DecoratorCfg(flags,
383  name = "TruthD2Decorator",
384  JetContainerKey = "AntiKt10TruthSoftDropBeta100Zcut10Jets",
385  DecorationName = "D2"))
386  TruthD2DecoratorKernel = CompFactory.DerivationFramework.CommonAugmentation
387  acc.addEventAlgo(TruthD2DecoratorKernel("TRUTHD2Kernel", AugmentationTools = [theTruthD2Decorator] ))
388  return acc
389 
390 # Truth energy density tools
392  """Truth energy density tools"""
393  acc = ComponentAccumulator()
394  from EventShapeTools.EventDensityConfig import configEventDensityTool
395  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
396  EventDensityAthAlg = CompFactory.EventDensityAthAlg
397  # Algorithms for the energy density - needed only if e/gamma hasn't set things up already
398  DFCommonTruthCentralEDTool = configEventDensityTool("DFCommonTruthCentralEDTool",
399  cst.Truth,
400  0.5,
401  AbsRapidityMax = 1.5,
402  OutputContainer = "TruthIsoCentralEventShape",
403  )
404  acc.addPublicTool(DFCommonTruthCentralEDTool)
405  acc.addEventAlgo(EventDensityAthAlg("DFCommonTruthCentralEDAlg", EventDensityTool = DFCommonTruthCentralEDTool ))
406  DFCommonTruthForwardEDTool = configEventDensityTool("DFCommonTruthForwardEDTool",
407  cst.Truth,
408  0.5,
409  AbsRapidityMin = 1.5,
410  AbsRapidityMax = 3.0,
411  OutputContainer = "TruthIsoForwardEventShape",
412  )
413  acc.addPublicTool(DFCommonTruthForwardEDTool)
414  acc.addEventAlgo(EventDensityAthAlg("DFCommonTruthForwardEDAlg", EventDensityTool = DFCommonTruthForwardEDTool ))
415 
416  # Now add the tool to do the decoration
417  DFCommonTruthEDDecorator = CompFactory.DerivationFramework.TruthEDDecorator("DFCommonTruthEDDecorator",
418  EventInfoName="EventInfo",
419  EventShapeKeys=["TruthIsoCentralEventShape","TruthIsoForwardEventShape"],
420  DecorationSuffix="_rho"
421  )
422  acc.addPublicTool(DFCommonTruthEDDecorator)
423 
424  DFCommonTruthEDKernel = CompFactory.DerivationFramework.CommonAugmentation
425  acc.addEventAlgo(DFCommonTruthEDKernel("DFCommonTruthEDKernel", AugmentationTools = [DFCommonTruthEDDecorator] ))
426  return acc
427 
428 
429 # Sets up modifiers to move pointers to old truth collections to new mini truth collections
430 def AddMiniTruthCollectionLinksCfg(flags, **kwargs):
431  """Tool to move pointers to new mini truth collections"""
432  acc = ComponentAccumulator()
433  kwargs.setdefault("doElectrons",True)
434  kwargs.setdefault("doPhotons",True)
435  kwargs.setdefault("doMuons",True)
436  aug_tools = []
437  from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthLinkRepointToolCfg
438  if kwargs['doElectrons']:
439  electron_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
440  flags,
441  name="ElMiniCollectionTruthLinkTool",
442  RecoCollection="Electrons",
443  TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
444  aug_tools += [ electron_relink ]
445  if kwargs['doPhotons']:
446  photon_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
447  flags,
448  name="PhMiniCollectionTruthLinkTool",
449  RecoCollection="Photons",
450  TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
451  aug_tools += [ photon_relink ]
452  if kwargs['doMuons']:
453  muon_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
454  flags,
455  name="MuMiniCollectionTruthLinkTool",
456  RecoCollection="Muons",
457  TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
458  aug_tools += [ muon_relink ]
459  for i, tool in enumerate(aug_tools):
460  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
461  "MiniCollectionTruthLinkKernelNo{num}".format(num=i+1),
462  AugmentationTools = [tool] ))
463  return acc
464 
466  slimmer.AllVariables += [
467  "MET_Truth",
468  "TruthElectrons",
469  "TruthMuons",
470  "TruthPhotons",
471  "TruthTaus",
472  "TruthNeutrinos",
473  "TruthBSM",
474  "TruthBottom",
475  "TruthTop",
476  "TruthBoson",
477  "TruthForwardProtons",
478  "BornLeptons",
479  "TruthBosonsWithDecayParticles",
480  "TruthBosonsWithDecayVertices",
481  "TruthBSMWithDecayParticles",
482  "TruthBSMWithDecayVertices",
483  ]
484  slimmer.ExtraVariables += [
485  "AntiKt4TruthDressedWZJets.GhostCHadronsFinalCount.GhostBHadronsFinalCount.pt.HadronConeExclTruthLabelID.PartonTruthLabelID.TrueFlavor",
486  "AntiKt10TruthSoftDropBeta100Zcut10Jets.pt.Tau1_wta.Tau2_wta.Tau3_wta.D2",
487  "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:168
python.TruthDerivationToolsConfig.TruthBornLeptonCollectionMakerCfg
def TruthBornLeptonCollectionMakerCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:197
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:245
python.MCTruthCommonConfig.AddTauAndDownstreamParticlesCfg
def AddTauAndDownstreamParticlesCfg(flags, generations=-1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:266
python.MCTruthCommonConfig.AddMiniTruthCollectionLinksCfg
def AddMiniTruthCollectionLinksCfg(flags, **kwargs)
Definition: MCTruthCommonConfig.py:430
python.MCTruthCommonConfig.AddPVCollectionCfg
def AddPVCollectionCfg(flags)
Definition: MCTruthCommonConfig.py:318
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:375
python.TruthDerivationToolsConfig.TruthDecayCollectionMakerCfg
def TruthDecayCollectionMakerCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:189
python.MCTruthCommonConfig.TruthMetaDataWriterCfg
def TruthMetaDataWriterCfg(flags, name)
Definition: MCTruthCommonConfig.py:11
python.MCTruthCommonConfig.AddTopQuarkAndDownstreamParticlesCfg
def AddTopQuarkAndDownstreamParticlesCfg(flags, generations=1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:256
xAODTruthCnvConfig.GEN_EVNT2xAODCfg
def GEN_EVNT2xAODCfg(flags, name="GEN_EVNT2xAOD", **kwargs)
Definition: xAODTruthCnvConfig.py:5
python.MCTruthCommonConfig.AddLargeRJetD2Cfg
def AddLargeRJetD2Cfg(flags)
Definition: MCTruthCommonConfig.py:377
python.MCTruthCommonConfig.AddBornLeptonCollectionCfg
def AddBornLeptonCollectionCfg(flags)
Definition: MCTruthCommonConfig.py:365
python.TruthDerivationToolsConfig.DFCommonTruthTauDressingToolCfg
def DFCommonTruthTauDressingToolCfg(flags)
Definition: TruthDerivationToolsConfig.py:262
AtlasMcWeight::encode
number_type encode(double weight)
Definition: AtlasMcWeight.cxx:65
python.MCTruthCommonConfig.AddTruthMETCfg
def AddTruthMETCfg(flags)
Definition: MCTruthCommonConfig.py:83
python.MCTruthCommonConfig.AddBSMAndDownstreamParticlesCfg
def AddBSMAndDownstreamParticlesCfg(flags, generations=-1)
Definition: MCTruthCommonConfig.py:349
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:95
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:131
python.MCTruthCommonConfig.AddTruthEnergyDensityCfg
def AddTruthEnergyDensityCfg(flags)
Definition: MCTruthCommonConfig.py:391
python.MCTruthCommonConfig.AddParentAndDownstreamParticlesCfg
def AddParentAndDownstreamParticlesCfg(flags, generations=1, parents=[6], prefix='TopQuark', collection_prefix=None, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:206
python.GenFilterToolConfig.GenFilterToolCfg
def GenFilterToolCfg(flags)
Definition: GenFilterToolConfig.py:8
python.TruthDerivationToolsConfig.DFCommonTruthMuonDressingToolCfg
def DFCommonTruthMuonDressingToolCfg(flags, decorationName="dressedPhoton")
Definition: TruthDerivationToolsConfig.py:252
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.TruthDerivationToolsConfig.TruthPVCollectionMakerCfg
def TruthPVCollectionMakerCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:385
python.TruthDerivationToolsConfig.TruthNavigationDecoratorCfg
def TruthNavigationDecoratorCfg(flags, name, **kwargs)
Definition: TruthDerivationToolsConfig.py:181
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:295
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:465
python.MCTruthCommonConfig.AddTruthCollectionNavigationDecorationsCfg
def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix='')
Definition: MCTruthCommonConfig.py:334
python.TruthDerivationToolsConfig.DFCommonTruthDressedWZQGLabelToolCfg
def DFCommonTruthDressedWZQGLabelToolCfg(flags)
Definition: TruthDerivationToolsConfig.py:350
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:242
python.MCTruthCommonConfig.AddTruthJetsCfg
def AddTruthJetsCfg(flags)
Definition: MCTruthCommonConfig.py:62
METTruth_Cfg
Definition: METTruth_Cfg.py:1