ATLAS Offline Software
Functions
python.JETM7 Namespace Reference

Functions

def JETM7SkimmingToolCfg (flags)
 
def JETM7KernelCfg (flags, name='JETM7Kernel', **kwargs)
 
def JETM7ExtraContentCfg (flags)
 
def JETM7Cfg (flags)
 

Function Documentation

◆ JETM7Cfg()

def python.JETM7.JETM7Cfg (   flags)

Definition at line 186 of file JETM7.py.

186 def JETM7Cfg(flags):
187 
188  acc = ComponentAccumulator()
189 
190  # Get the lists of triggers needed for trigger matching.
191  # This is needed at this scope (for the slimming) and further down in the config chain
192  # for actually configuring the matching, so we create it here and pass it down
193  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
194  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
195  JETM7TriggerListsHelper = TriggerListsHelper(flags)
196 
197  # Skimming, thinning, augmentation, extra content
198  acc.merge(JETM7KernelCfg(flags, name="JETM7Kernel", StreamName = 'StreamDAOD_JETM7', TriggerListsHelper = JETM7TriggerListsHelper))
199 
200  # ============================
201  # Define contents of the format
202  # =============================
203  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
204  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
205  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
206 
207  JETM7SlimmingHelper = SlimmingHelper("JETM7SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
208 
209  JETM7SlimmingHelper.SmartCollections = ["Electrons", "Photons", "Muons",
210  "PrimaryVertices",
211  "InDetTrackParticles",
212  "AntiKt4EMPFlowJets",
213  "EventInfo",
214  ]
215 
216 
217  JETM7SlimmingHelper.ExtraVariables = ["InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights"]
218 
219  # Truth containers
220  if flags.Input.isMC:
221 
222  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
223  addTruth3ContentToSlimmerTool(JETM7SlimmingHelper)
224 
225  JETM7SlimmingHelper.AppendToDictionary.update({'TruthParticles': 'xAOD::TruthParticleContainer',
226  'TruthParticlesAux': 'xAOD::TruthParticleAuxContainer'})
227 
228  JETM7SlimmingHelper.SmartCollections += ["AntiKt4TruthWZJets"]
229 
230  JETM7SlimmingHelper.AllVariables += ["TruthTopQuarkWithDecayParticles","TruthTopQuarkWithDecayVertices",
231  "AntiKt4TruthJets", "InTimeAntiKt4TruthJets", "OutOfTimeAntiKt4TruthJets", "TruthParticles",
232  "TruthVertices", "TruthEvents"]
233  JETM7SlimmingHelper.ExtraVariables += ["InDetTrackParticles.truthMatchProbability", "TruthVertices.barcode.z"]
234 
235 
236  # Trigger content
237  JETM7SlimmingHelper.IncludeTriggerNavigation = True
238  JETM7SlimmingHelper.IncludeJetTriggerContent = False
239  JETM7SlimmingHelper.IncludeMuonTriggerContent = False
240  JETM7SlimmingHelper.IncludeEGammaTriggerContent = False
241  JETM7SlimmingHelper.IncludeTauTriggerContent = False
242  JETM7SlimmingHelper.IncludeEtMissTriggerContent = False
243  JETM7SlimmingHelper.IncludeBJetTriggerContent = False
244  JETM7SlimmingHelper.IncludeBPhysTriggerContent = False
245  JETM7SlimmingHelper.IncludeMinBiasTriggerContent = False
246 
247  # Trigger matching
248  # Run 2
249  if flags.Trigger.EDMVersion == 2:
250  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
251  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = JETM7SlimmingHelper,
252  OutputContainerPrefix = "TrigMatch_",
253  TriggerList = JETM7TriggerListsHelper.Run2TriggerNamesTau)
254  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = JETM7SlimmingHelper,
255  OutputContainerPrefix = "TrigMatch_",
256  TriggerList = JETM7TriggerListsHelper.Run2TriggerNamesNoTau)
257  # Run 3, or Run 2 with navigation conversion
258  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
259  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
261 
262  jetOutputList = ["AntiKt4EMPFlowByVertexJets"]
263  from DerivationFrameworkJetEtMiss.JetCommonConfig import addJetsToSlimmingTool
264  addJetsToSlimmingTool(JETM7SlimmingHelper, jetOutputList, JETM7SlimmingHelper.SmartCollections)
265 
266  # Output stream
267  JETM7ItemList = JETM7SlimmingHelper.GetItemList()
268  acc.merge(OutputStreamCfg(flags, "DAOD_JETM7", ItemList=JETM7ItemList, AcceptAlgs=["JETM7Kernel"]))
269  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_JETM7", AcceptAlgs=["JETM7Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
270 
271  return acc
272 
273 
274 
275 

◆ JETM7ExtraContentCfg()

def python.JETM7.JETM7ExtraContentCfg (   flags)

Definition at line 140 of file JETM7.py.

140 def JETM7ExtraContentCfg(flags):
141 
142  acc = ComponentAccumulator()
143 
144  from JetRecConfig.JetRecConfig import JetRecCfg
145  from JetRecConfig.StandardSmallRJets import AntiKt4PV0Track, AntiKt4EMPFlowByVertex
146 
147  #=======================================
148  # R = 0.4 track-jets (needed for Rtrk)
149  #=======================================
150  jetList = [AntiKt4PV0Track]
151 
152  #=======================================
153  # R = 0.4 by-vertex jets
154  #=======================================
155  jetList += [AntiKt4EMPFlowByVertex]
156 
157 
158  for jd in jetList:
159  acc.merge(JetRecCfg(flags,jd))
160 
161  #=======================================
162  # More detailed truth information
163  #=======================================
164 
165  if flags.Input.isMC:
166  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTopQuarkAndDownstreamParticlesCfg
167  acc.merge(AddTopQuarkAndDownstreamParticlesCfg(flags, generations=4, rejectHadronChildren=True))
168 
169  #=======================================
170  # Add Run-2 jet trigger collections
171  # Only needed for Run-2 due to different aux container type (JetTrigAuxContainer) which required special wrapper for conversion to AuxContainerBase
172  # In Run-3, the aux. container type is directly JetAuxContainer (no conversion needed)
173  #=======================================
174 
175  if flags.Trigger.EDMVersion == 2:
176  triggerNames = ["JetContainer_a4tcemsubjesFS", "JetContainer_a4tcemsubjesISFS", "JetContainer_a10tclcwsubjesFS", "JetContainer_GSCJet"]
177 
178  for trigger in triggerNames:
179  wrapperName = trigger+'AuxWrapper'
180  auxContainerName = 'HLT_xAOD__'+trigger+'Aux'
181 
182  acc.addEventAlgo(CompFactory.xAODMaker.AuxStoreWrapper( wrapperName, SGKeys = [ auxContainerName+"." ] ))
183 
184  return acc
185 

◆ JETM7KernelCfg()

def python.JETM7.JETM7KernelCfg (   flags,
  name = 'JETM7Kernel',
**  kwargs 
)
Configure the derivation framework driving algorithm (kernel) for JETM7

Definition at line 26 of file JETM7.py.

26 def JETM7KernelCfg(flags, name='JETM7Kernel', **kwargs):
27  """Configure the derivation framework driving algorithm (kernel) for JETM7"""
28  acc = ComponentAccumulator()
29 
30  # Skimming
31  if not flags.Input.isMC:
32  skimmingTool = acc.getPrimaryAndMerge(JETM7SkimmingToolCfg(flags))
33 
34  # Common augmentations
35  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
36  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
37 
38  from DerivationFrameworkInDet.InDetToolsConfig import InDetTrackSelectionToolWrapperCfg
39  DFCommonTrackSelection = acc.getPrimaryAndMerge(InDetTrackSelectionToolWrapperCfg(
40  flags,
41  name = "DFJETM7CommonTrackSelectionLoose",
42  CutLevel = "Loose",
43  DecorationName = "DFJETM7Loose"))
44 
45  acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation("JETM7CommonKernel", AugmentationTools = [DFCommonTrackSelection]))
46 
47  # Thinning tools...
48  from DerivationFrameworkInDet.InDetToolsConfig import MuonTrackParticleThinningCfg, EgammaTrackParticleThinningCfg, JetTrackParticleThinningCfg
49  # from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import GenericTruthThinningCfg
50  from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
51 
52  muonSelectionString = "(Muons.pt > 5*GeV)"
53  electronSelectionString = "(Electrons.pt > 5*GeV)"
54  photonSelectionString = "(Photons.pt > 5*GeV)"
55  jetSelectionString = "(AntiKt4EMPFlowByVertexJets.pt > 7.*GeV && AntiKt4EMPFlowByVertexJets.Jvt > 0.4)"
56 
57  # Include inner detector tracks associated with muons
58  JETM7MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(flags,
59  name = "JETM7MuonTPThinningTool",
60  StreamName = kwargs['StreamName'],
61  MuonKey = "Muons",
62  SelectionString = muonSelectionString,
63  InDetTrackParticlesKey = "InDetTrackParticles"))
64 
65  # Include inner detector tracks associated with electrons
66  JETM7ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(flags,
67  name = "JETM7ElectronTPThinningTool",
68  StreamName = kwargs['StreamName'],
69  SGKey = "Electrons",
70  SelectionString = electronSelectionString,
71  InDetTrackParticlesKey = "InDetTrackParticles"))
72 
73  # Include inner detector tracks associated with by-vertex jets
74  JETM7Akt4JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(flags,
75  name = "JETM7Akt4JetTPThinningTool",
76  StreamName = kwargs['StreamName'],
77  JetKey = "AntiKt4EMPFlowByVertexJets",
78  SelectionString = jetSelectionString,
79  InDetTrackParticlesKey = "InDetTrackParticles"))
80 
81 
82  # Store EMPFlowByVertexJets with JVT > 0.4. This will result in jets extending up to about 2.6 in |eta|
83  JETM7Akt4PFlowByVertexJetThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(flags,
84  name = "JETM7Akt4PFlowByVertexJetThinningTool",
85  ContainerName = "AntiKt4EMPFlowByVertexJets",
86  StreamName = kwargs['StreamName'],
87  SelectionString = jetSelectionString))
88 
89  # Store regular EMPFlowJets for |eta| > 2.4 to retain forward jets with a PV0 interpretation
90  JETM7Akt4PFlowJetThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(flags,
91  name = "JETM7Akt4PFlowJetThinningTool",
92  ContainerName = "AntiKt4EMPFlowJets",
93  StreamName = kwargs['StreamName'],
94  SelectionString = "(abs(AntiKt4EMPFlowJets.eta) > 2.4)"))
95 
96 
97  JETM7MuonThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(flags,
98  name = "JETM7MuonThinningTool",
99  ContainerName = "Muons",
100  StreamName = kwargs['StreamName'],
101  SelectionString = muonSelectionString))
102 
103 
104  JETM7ElectronThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(flags,
105  name = "JETM7ElectronThinningTool",
106  ContainerName = "Electrons",
107  StreamName = kwargs['StreamName'],
108  SelectionString = electronSelectionString))
109 
110 
111  JETM7PhotonThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(flags,
112  name = "JETM7PhotonThinningTool",
113  ContainerName = "Photons",
114  StreamName = kwargs['StreamName'],
115  SelectionString = photonSelectionString))
116 
117 
118  # Extra jet content:
119  acc.merge(JETM7ExtraContentCfg(flags))
120 
121  # Finally the kernel itself
122  thinningTools = [JETM7MuonTPThinningTool,
123  JETM7ElectronTPThinningTool,
124  JETM7Akt4JetTPThinningTool,
125  JETM7Akt4PFlowByVertexJetThinningTool,
126  JETM7Akt4PFlowJetThinningTool,
127  JETM7MuonThinningTool,
128  JETM7ElectronThinningTool,
129  JETM7PhotonThinningTool,
130  ]
131 
132  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
133  acc.addEventAlgo(DerivationKernel(name,
134  ThinningTools = thinningTools,
135  SkimmingTools =[skimmingTool] if not flags.Input.isMC else []))
136 
137 
138  return acc
139 

◆ JETM7SkimmingToolCfg()

def python.JETM7.JETM7SkimmingToolCfg (   flags)
Configure the skimming tool

Definition at line 12 of file JETM7.py.

12 def JETM7SkimmingToolCfg(flags):
13  """Configure the skimming tool"""
14  acc = ComponentAccumulator()
15 
16 
17  jetSelection = '(count(AntiKt4EMPFlowJets.pt > 10.*GeV && abs(AntiKt4EMPFlowJets.eta) < 2.5) >= 1)'
18  JETM7OfflineSkimmingTool = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "JETM7OfflineSkimmingTool1",
19  expression = jetSelection)
20 
21  acc.addPublicTool(JETM7OfflineSkimmingTool, primary=True)
22 
23  return(acc)
24 
25 # Main algorithm config
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.InDetToolsConfig.InDetTrackSelectionToolWrapperCfg
def InDetTrackSelectionToolWrapperCfg(flags, name, CutLevel="TightPrimary", **kwargs)
Definition: InDetToolsConfig.py:426
python.JETM7.JETM7ExtraContentCfg
def JETM7ExtraContentCfg(flags)
Definition: JETM7.py:140
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.JETM7.JETM7SkimmingToolCfg
def JETM7SkimmingToolCfg(flags)
Definition: JETM7.py:12
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
python.JETM7.JETM7Cfg
def JETM7Cfg(flags)
Definition: JETM7.py:186
python.MCTruthCommonConfig.AddTopQuarkAndDownstreamParticlesCfg
def AddTopQuarkAndDownstreamParticlesCfg(flags, generations=1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:253
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:36
python.JetCommonConfig.addJetsToSlimmingTool
def addJetsToSlimmingTool(slimhelper, contentlist, smartlist=[])
Definition: JetCommonConfig.py:262
python.DerivationFrameworkToolsConfig.GenericObjectThinningCfg
def GenericObjectThinningCfg(ConfigFlags, name, **kwargs)
Definition: DerivationFrameworkToolsConfig.py:20
python.JETM7.JETM7KernelCfg
def JETM7KernelCfg(flags, name='JETM7Kernel', **kwargs)
Definition: JETM7.py:26
python.InDetToolsConfig.JetTrackParticleThinningCfg
def JetTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:560
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:528
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.InDetToolsConfig.EgammaTrackParticleThinningCfg
def EgammaTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:579
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:14
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1
python.HION12.DerivationKernel
DerivationKernel
Definition: HION12.py:66