ATLAS Offline Software
Loading...
Searching...
No Matches
TLACommonConfigFunctions Namespace Reference

Functions

 TLAJetCommonCfg (ConfigFlags)
 These jet related functions are a copy of the ones in the JetCommonConfig file but we remove the jet collections we don't need.
 StandardTLAJetsCfg (ConfigFlags)
 AddTLATruthJetsCfg (flags)
 PostTLAJetMCTruthAugmentationsCfg (flags, **kwargs)
 AddStandardTLATruthContentsCfg (flags, decorationDressing='dressedPhoton', includeTausInDressingPhotonRemoval=False, prefix='', useTLAPostJetAugmentations=True)

Function Documentation

◆ AddStandardTLATruthContentsCfg()

TLACommonConfigFunctions.AddStandardTLATruthContentsCfg ( flags,
decorationDressing = 'dressedPhoton',
includeTausInDressingPhotonRemoval = False,
prefix = '',
useTLAPostJetAugmentations = True )

Definition at line 107 of file TLACommonConfigFunctions.py.

112 useTLAPostJetAugmentations=True):
113
114 acc = ComponentAccumulator()
115
116 # Schedule HepMC->xAOD truth conversion
117 acc.merge(HepMCtoXAODTruthCfg(flags))
118
119 # Local flag
120 isEVNT = False
121 if "McEventCollection#GEN_EVENT" in flags.Input.TypedCollections: isEVNT = True
122 # Tools that must come before jets
123 acc.merge(PreJetMCTruthAugmentationsCfg(flags,decorationDressing = decorationDressing))
124 # Jets and MET
125 acc.merge(AddTLATruthJetsCfg(flags))
126 # Tools that must come after jets
127 # configured for compatibility in case we want to
128 # revert to common MCTruth version
129 if not useTLAPostJetAugmentations:
130 acc.merge(PostJetMCTruthAugmentationsCfg(flags, decorationDressing = decorationDressing))
131 else:
132 acc.merge(PostTLAJetMCTruthAugmentationsCfg(flags, decorationDressing = decorationDressing))
133 # Should photons that are dressed onto taus also be removed from truth jets?
134 if includeTausInDressingPhotonRemoval:
135 acc.getPublicTool("DFCommonTruthTauDressingTool").decorationName=decorationDressing
136 acc.addEventAlgo(CompFactory.DerivationFramework.LockDecorations(name ="AddStandardTLATruthContentsLockDecoration", Decorations = ['TruthParticles.' + decorationDressing]))
137
138 # Add back the navigation contect for the collections we want
139 acc.merge(AddTruthCollectionNavigationDecorationsCfg(flags, ["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos", "TruthBSM", "TruthBottom", "TruthTop", "TruthBoson"], prefix=prefix))
140 # Some more additions for standard TRUTH3
141 acc.merge(AddBosonsAndDownstreamParticlesCfg(flags))
142
143 # Special collection for BSM particles
144 acc.merge(AddBSMAndDownstreamParticlesCfg(flags))
145
146 # Energy density for isolation corrections
147 if isEVNT: acc.merge(AddTruthEnergyDensityCfg(flags))
148
149 return acc
150

◆ AddTLATruthJetsCfg()

TLACommonConfigFunctions.AddTLATruthJetsCfg ( flags)

Definition at line 60 of file TLACommonConfigFunctions.py.

60def AddTLATruthJetsCfg(flags):
61 acc = ComponentAccumulator()
62
63 from JetRecConfig.StandardSmallRJets import AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ
64 from JetRecConfig.JetRecConfig import JetRecCfg
65
66
67 jetList = [AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ]
68
69 for jd in jetList:
70 acc.merge(JetRecCfg(flags,jd))
71
72 return acc
73

◆ PostTLAJetMCTruthAugmentationsCfg()

TLACommonConfigFunctions.PostTLAJetMCTruthAugmentationsCfg ( flags,
** kwargs )

Definition at line 74 of file TLACommonConfigFunctions.py.

74def PostTLAJetMCTruthAugmentationsCfg(flags, **kwargs):
75
76 acc = ComponentAccumulator()
77
78 # Tau collections are built separately
79 # truth tau matching needs truth jets, truth electrons and truth muons
80 from DerivationFrameworkTau.TauTruthCommonConfig import TauTruthToolsCfg
81 acc.merge(TauTruthToolsCfg(flags))
82 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthTauDressingToolCfg
83 augmentationToolsList = [ acc.getPrimaryAndMerge(DFCommonTruthTauDressingToolCfg(flags)) ]
84
85
86 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import DFCommonTruthDressedWZQGLabelToolCfg
87 augmentationToolsList += [ acc.getPrimaryAndMerge(DFCommonTruthDressedWZQGLabelToolCfg(flags))]
88
89 # SUSY signal decorations
90 from DerivationFrameworkSUSY.DecorateSUSYProcessConfig import IsSUSYSignalRun3
91 if IsSUSYSignalRun3(flags):
92 from DerivationFrameworkSUSY.DecorateSUSYProcessConfig import SUSYSignalTaggerCfg
93 augmentationToolsList += [acc.getPrimaryAndMerge(SUSYSignalTaggerCfg(flags, 'MCTruthCommon'))]
94
95 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
96 acc.addEventAlgo(CommonAugmentation(name = "MCTruthCommonPostJetKernel",
97 AugmentationTools = augmentationToolsList))
98
99 # add SoW of individual SUSY final states, relies on augmentation from DecorateSUSYProcess()
100 if IsSUSYSignalRun3(flags):
101 from DerivationFrameworkSUSY.SUSYWeightMetadataConfig import AddSUSYWeightsCfg
102 acc.merge(AddSUSYWeightsCfg(flags))
103
104 return(acc)
105
106# This adds the entirety of TRUTH3

◆ StandardTLAJetsCfg()

TLACommonConfigFunctions.StandardTLAJetsCfg ( ConfigFlags)
Standard (offline) jets needed for TLA derivations

Definition at line 32 of file TLACommonConfigFunctions.py.

32def StandardTLAJetsCfg(ConfigFlags):
33 """Standard (offline) jets needed for TLA derivations"""
34
35 from JetRecConfig.StandardSmallRJets import AntiKt4EMTopo,AntiKt4EMPFlow
36 from JetRecConfig.JetRecConfig import JetRecCfg
37
38 acc = ComponentAccumulator()
39
40 AntiKt4EMTopo_deriv = AntiKt4EMTopo.clone(
41 modifiers = AntiKt4EMTopo.modifiers+("JetPtAssociation","QGTagging")
42 )
43
44 AntiKt4EMPFlow_deriv = AntiKt4EMPFlow.clone(
45 modifiers = AntiKt4EMPFlow.modifiers+("JetPtAssociation","QGTagging","fJVT","NNJVT","CaloEnergiesClus")
46 )
47
48 jetList = [AntiKt4EMTopo_deriv, AntiKt4EMPFlow_deriv]
49
50
51 for jd in jetList:
52 acc.merge(JetRecCfg(ConfigFlags,jd))
53
54 return acc
55

◆ TLAJetCommonCfg()

TLACommonConfigFunctions.TLAJetCommonCfg ( ConfigFlags)

These jet related functions are a copy of the ones in the JetCommonConfig file but we remove the jet collections we don't need.

TLA config for jet reconstruction and decorations

Definition at line 16 of file TLACommonConfigFunctions.py.

16def TLAJetCommonCfg(ConfigFlags):
17 """TLA config for jet reconstruction and decorations"""
18
19 acc = ComponentAccumulator()
20
21 acc.merge(StandardTLAJetsCfg(ConfigFlags))
22
23
24 if "McEventCollection#GEN_EVENT" not in ConfigFlags.Input.TypedCollections:
25 acc.merge(AddBadBatmanCfg(ConfigFlags))
26 acc.merge(AddDistanceInTrainCfg(ConfigFlags))
27 acc.merge(AddSidebandEventShapeCfg(ConfigFlags))
28 acc.merge(AddEventCleanFlagsCfg(ConfigFlags))
29
30 return acc
31