ATLAS Offline Software
LLP1.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 #====================================================================
3 # DAOD_LLP1.py
4 # This defines DAOD_LLP1, an unskimmed DAOD format for Run 3.
5 # It contains the variables and objects needed for the large majority
6 # of physics analyses in ATLAS.
7 # It requires the flag LLP1 in Derivation_tf.py
8 #====================================================================
9 
10 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
11 from AthenaConfiguration.ComponentFactory import CompFactory
12 from AthenaConfiguration.Enums import LHCPeriod, MetadataCategory
13 
14 MergedElectronContainer = "StdWithLRTElectrons"
15 MergedMuonContainer = "StdWithLRTMuons"
16 MergedMuonContainer_wZPH = "StdWithLRTMuons_wZPH"
17 MergedTrackCollection = "InDetWithLRTTrackParticles"
18 MergedTrackletCollection = "InDetDisappearingWithLRTTrackParticles"
19 MergedGSFTrackCollection = "InDetWithLRTGSFTrackParticles"
20 LLP1VrtSecInclusiveSuffixes = []
21 LLP1NewVSISuffixes = []
22 
23 # Main algorithm config
24 def LLP1KernelCfg(flags, name='LLP1Kernel', **kwargs):
25 
26  """Configure the derivation framework driving algorithm (kernel) for LLP1"""
27  acc = ComponentAccumulator()
28 
29  # Augmentations
30 
31 
32  # LRT track merge
33  from DerivationFrameworkInDet.InDetToolsConfig import InDetLRTMergeCfg
34  acc.merge(InDetLRTMergeCfg(flags))
35  acc.merge(InDetLRTMergeCfg(flags, name="GSFTrackMergerAlg", InputTrackParticleLocations = ["GSFTrackParticles", "LRTGSFTrackParticles"], OutputTrackParticleLocation = MergedGSFTrackCollection, OutputTrackParticleLocationCopy = MergedGSFTrackCollection))
36  acc.merge(InDetLRTMergeCfg(flags, name="InDetDisappearingLRTMerge",InputTrackParticleLocations = ["InDetDisappearingTrackParticles", "InDetLargeD0TrackParticles"],OutputTrackParticleLocation = MergedTrackletCollection))
37 
38  # LRT muons merge
39  from DerivationFrameworkLLP.LLPToolsConfig import LRTMuonMergerAlg
40  acc.merge(LRTMuonMergerAlg( flags,
41  PromptMuonLocation = "Muons",
42  LRTMuonLocation = "MuonsLRT",
43  OutputMuonLocation = MergedMuonContainer,
44  CreateViewCollection = True,
45  UseRun3WP = flags.GeoModel.Run == LHCPeriod.Run3))
46 
47  # LRT electrons merge
48  from DerivationFrameworkLLP.LLPToolsConfig import LRTElectronMergerAlg
49  acc.merge(LRTElectronMergerAlg( flags,
50  PromptElectronLocation = "Electrons",
51  LRTElectronLocation = "LRTElectrons",
52  OutputCollectionName = MergedElectronContainer,
53  isDAOD = False,
54  CreateViewCollection = True))
55 
56  # Max Cell sum decoration tool
57  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import (
58  MaxCellDecoratorCfg, MaxCellDecoratorKernelCfg)
59 
60  # Default configuration
61  acc.merge(MaxCellDecoratorKernelCfg(flags))
62 
63  # Specific for LRTElectrons
64  LLP1LRTMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
65  flags,
66  name = "LLP1LRTMaxCellDecoratorTool",
67  SGKey_electrons = "LRTElectrons",
68  SGKey_egammaClusters = ("" if flags.GeoModel.Run == LHCPeriod.Run3
69  else "egammaClusters"),
70  SGKey_photons = ''))
71  acc.addPublicTool(LLP1LRTMaxCellDecoratorTool)
72 
73  # Vertex constraint tools
74  from TrkConfig.TrkVertexFitterUtilsConfig import AtlasFullLinearizedTrackFactoryCfg
75  AtlasFullLinearizedTrackFactoryTool = acc.popToolsAndMerge(AtlasFullLinearizedTrackFactoryCfg(flags,
76  name = "LLP1AtlasFullLinearizedTrackFactory"))
77  acc.addPublicTool(AtlasFullLinearizedTrackFactoryTool)
78 
79  from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg
80  ExtrapolatorTool = acc.popToolsAndMerge(AtlasExtrapolatorCfg(flags,
81  name = "LLP1ExtrapolatorTool"))
82  acc.addPublicTool(ExtrapolatorTool)
83 
84 
85  from DerivationFrameworkLLP.LLPToolsConfig import TrackParametersKVUCfg
86  LLP1TrackParametersKVUTool = acc.getPrimaryAndMerge(TrackParametersKVUCfg(flags,
87  name = "LLP1TrackParametersKVU",
88  TrackParticleContainerName = "InDetDisappearingTrackParticles",
89  VertexContainerName = "PrimaryVertices",
90  LinearizedTrackFactory = AtlasFullLinearizedTrackFactoryTool,
91  TrackExtrapolator = ExtrapolatorTool))
92  acc.addPublicTool(LLP1TrackParametersKVUTool)
93 
94  # Track isolation tools
95  import ROOT
96  isoPar = ROOT.xAOD.Iso.IsolationType
97  deco_ptcones = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20]
98  deco_ptcones_suffix = ["ptcone40", "ptcone30", "ptcone20"]
99  deco_prefix = 'LLP1_'
100 
101  from InDetConfig.InDetTrackSelectionToolConfig import InDetTrackSelectionTool_Loose_Cfg
102  TrackSelectionToolStd = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
103  name = "TrackSelectionToolStd",
104  maxZ0SinTheta = 3.0,
105  minPt = 1000.))
106 
107  TrackSelectionToolPdEdx = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
108  name = "TrackSelectionToolPdEdx",
109  maxD0 = 0.5,
110  maxZ0SinTheta = 3.0,
111  minPt = 1000.))
112 
113  TrackSelectionToolPdEdxTight = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
114  name = "TrackSelectionToolPdEdxTight",
115  maxD0 = 0.5,
116  maxZ0SinTheta = 0.5,
117  minPt = 1000.))
118 
119  from IsolationAlgs.IsoToolsConfig import TrackIsolationToolCfg, CaloIsolationToolCfg
120  TrackIsoToolStd = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
121  name = "TrackIsoToolStd",
122  TrackSelectionTool = TrackSelectionToolStd))
123  acc.addPublicTool(TrackIsoToolStd)
124 
125  TrackIsoToolPdEdx = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
126  name = "TrackIsoToolPdEdx",
127  TrackSelectionTool = TrackSelectionToolPdEdx))
128  acc.addPublicTool(TrackIsoToolPdEdx)
129 
130  TrackIsoToolPdEdxTight = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
131  name = "TrackIsoToolPdEdxTight",
132  TrackSelectionTool = TrackSelectionToolPdEdxTight))
133  acc.addPublicTool(TrackIsoToolPdEdxTight)
134 
135  from CaloIdentifier import SUBCALO
136  CaloIsoTool = acc.popToolsAndMerge(CaloIsolationToolCfg(flags,
137  name = "CaloIsoTool",
138  EMCaloNums = [SUBCALO.LAREM],
139  HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
140  UseEMScale = True,
141  UseCaloExtensionCaching = False,
142  saveOnlyRequestedCorrections = True))
143  acc.addPublicTool(CaloIsoTool)
144 
145  from DerivationFrameworkInDet.InDetToolsConfig import IsolationTrackDecoratorCfg
146  LLP1IsolationTrackDecoratorTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
147  name = "LLP1IsolationTrackDecorator",
148  TrackIsolationTool = TrackIsoToolStd,
149  CaloIsolationTool = CaloIsoTool,
150  TargetContainer = "InDetTrackParticles",
151  SelectionString = "InDetTrackParticles.pt>10*GeV",
152  iso = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20, isoPar.ptvarcone40, isoPar.ptvarcone30, isoPar.ptvarcone20, isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
153  isoSuffix = ["ptcone40", "ptcone30", "ptcone20", "ptvarcone40", "ptvarcone30", "ptvarcone20", "topoetcone40", "topoetcone30", "topoetcone20"],
154  Prefix = deco_prefix))
155  acc.addPublicTool(LLP1IsolationTrackDecoratorTool)
156 
157  LLP1IsolationTrackDecoratorDTTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
158  name = "LLP1IsolationTrackDecoratorDT",
159  TrackIsolationTool = TrackIsoToolStd,
160  CaloIsolationTool = CaloIsoTool,
161  TargetContainer = "InDetDisappearingTrackParticles",
162  SelectionString = "InDetDisappearingTrackParticles.pt>10*GeV",
163  iso = [isoPar.ptcone40, isoPar.ptcone30, isoPar.ptcone20, isoPar.ptvarcone40, isoPar.ptvarcone30, isoPar.ptvarcone20, isoPar.topoetcone40, isoPar.topoetcone30, isoPar.topoetcone20],
164  isoSuffix = ["ptcone40", "ptcone30", "ptcone20", "ptvarcone40", "ptvarcone30", "ptvarcone20", "topoetcone40", "topoetcone30", "topoetcone20"],
165  Prefix = deco_prefix))
166  acc.addPublicTool(LLP1IsolationTrackDecoratorDTTool)
167 
168  LLP1IsolationTrackDecoratorPdEdxTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
169  name = "LLP1IsolationTrackDecoratorPdEdx",
170  TrackIsolationTool = TrackIsoToolPdEdx,
171  CaloIsolationTool = CaloIsoTool,
172  TargetContainer = "InDetTrackParticles",
173  iso = deco_ptcones,
174  Prefix = 'TrkIsoPtPdEdx_',
175  isoSuffix = deco_ptcones_suffix))
176  acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTool)
177 
178  LLP1IsolationTrackDecoratorPdEdxDTTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
179  name = "LLP1IsolationTrackDecoratorPdEdxDT",
180  TrackIsolationTool = TrackIsoToolPdEdx,
181  CaloIsolationTool = CaloIsoTool,
182  TargetContainer = "InDetDisappearingTrackParticles",
183  iso = deco_ptcones,
184  Prefix = 'TrkIsoPtPdEdx_',
185  isoSuffix = deco_ptcones_suffix))
186  acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxDTTool)
187 
188  LLP1IsolationTrackDecoratorPdEdxTightTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
189  name = "LLP1IsolationTrackDecoratorPdEdxTight",
190  TrackIsolationTool = TrackIsoToolPdEdxTight,
191  CaloIsolationTool = CaloIsoTool,
192  TargetContainer = "InDetTrackParticles",
193  iso = deco_ptcones,
194  Prefix = 'TrkIsoPtTightPdEdx_',
195  isoSuffix = deco_ptcones_suffix))
196  acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTightTool)
197 
198  LLP1IsolationTrackDecoratorPdEdxTightDTTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
199  name = "LLP1IsolationTrackDecoratorPdEdxTightDT",
200  TrackIsolationTool = TrackIsoToolPdEdxTight,
201  CaloIsolationTool = CaloIsoTool,
202  TargetContainer = "InDetDisappearingTrackParticles",
203  iso = deco_ptcones,
204  Prefix = 'TrkIsoPtTightPdEdx_',
205  isoSuffix = deco_ptcones_suffix))
206  acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTightDTTool)
207 
208  from DerivationFrameworkLLP.LLPToolsConfig import TrackParticleCaloCellDecoratorCfg
209  LLP1TrackParticleCaloCellDecoratorTool = acc.getPrimaryAndMerge(TrackParticleCaloCellDecoratorCfg(flags,
210  name = "LLP1TrackParticleCaloCellDecorator",
211  DecorationPrefix = "LLP1",
212  ContainerName = "InDetTrackParticles"))
213  acc.addPublicTool(LLP1TrackParticleCaloCellDecoratorTool)
214 
215  augmentationTools = [ LLP1LRTMaxCellDecoratorTool,
216  LLP1TrackParametersKVUTool,
217  LLP1IsolationTrackDecoratorTool,
218  LLP1IsolationTrackDecoratorDTTool,
219  LLP1IsolationTrackDecoratorPdEdxTool,
220  LLP1IsolationTrackDecoratorPdEdxDTTool,
221  LLP1IsolationTrackDecoratorPdEdxTightTool,
222  LLP1IsolationTrackDecoratorPdEdxTightDTTool,
223  LLP1TrackParticleCaloCellDecoratorTool ]
224 
225  # Specific for Taus
226  LLP1TauMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
227  flags,
228  name = "LLP1TauMaxCellDecoratorTool",
229  SGKey_taus = 'TauJets',
230  SGKey_electrons = '',
231  SGKey_photons = ''))
232  acc.addPublicTool(LLP1TauMaxCellDecoratorTool)
233 
234  augmentationTools += [ LLP1TauMaxCellDecoratorTool ]
235 
236  # Specific for Jets: AntiKt4EMTopoJets
237  LLP1AntiKt4EMTopoJetMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
238  flags,
239  name = "LLP1AntiKt4EMTopoJetMaxCellDecoratorTool",
240  SGKey_jets = 'AntiKt4EMTopoJets',
241  SGKey_taus = '',
242  SGKey_electrons = '',
243  SGKey_photons = ''))
244  acc.addPublicTool(LLP1AntiKt4EMTopoJetMaxCellDecoratorTool)
245 
246  augmentationTools += [ LLP1AntiKt4EMTopoJetMaxCellDecoratorTool ]
247 
248  # Specific for Jets: AntiKt4EMPFlowJets
249  LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
250  flags,
251  name = "LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool",
252  SGKey_jets = 'AntiKt4EMPFlowJets',
253  SGKey_taus = '',
254  SGKey_electrons = '',
255  SGKey_photons = ''))
256  acc.addPublicTool(LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool)
257 
258  augmentationTools += [ LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool ]
259 
260  # Reclustered jets definitions
261  from JetRecConfig.JetRecConfig import registerAsInputConstit, JetRecCfg
262  from JetRecConfig.StandardSmallRJets import AntiKt4Truth, AntiKt4EMTopo
263  from JetRecConfig.JetDefinition import JetDefinition
264  from JetRecConfig.StandardJetConstits import stdConstitDic as cst
265 
266  registerAsInputConstit(AntiKt4EMTopo)
267  registerAsInputConstit(AntiKt4Truth)
268  cst.AntiKt4EMTopoJets.label = "EMTopoRC"
269  cst.AntiKt4TruthJets.label = "TruthRC"
270 
271  AntiKt10RCEMTopo = JetDefinition( "AntiKt",1.0,cst.AntiKt4EMTopoJets,
272  ghostdefs = ["Track", "TrackLRT", "LCTopoOrigin"],
273  modifiers = ("Sort", "Filter:200000",),
274  standardRecoMode = True,
275  lock = True,
276  )
277  if flags.Input.isMC:
278  AntiKt10RCTruth = JetDefinition("AntiKt",1.0,cst.AntiKt4TruthJets,
279  ghostdefs = [],
280  modifiers = ("Sort", "Filter:200000",),
281  standardRecoMode = True,
282  lock = True
283  )
284 
285  from DerivationFrameworkPhys.PhysCommonConfig import PhysCommonAugmentationsCfg
286  acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs['TriggerListsHelper']))
287  acc.merge(JetRecCfg(flags,AntiKt10RCEMTopo))
288  if flags.Input.isMC: acc.merge(JetRecCfg(flags,AntiKt10RCTruth))
289 
290  # MET with LRT in association map
291  from DerivationFrameworkJetEtMiss.METCommonConfig import METLRTCfg
292  acc.merge(METLRTCfg(flags, "AntiKt4EMTopo"))
293  acc.merge(METLRTCfg(flags, "AntiKt4EMPFlow"))
294 
295  # LRT Egamma
296  from DerivationFrameworkEGamma.EGammaLRTConfig import EGammaLRTCfg
297  acc.merge(EGammaLRTCfg(flags))
298 
299  from DerivationFrameworkLLP.LLPToolsConfig import LRTElectronLHSelectorsCfg
300  acc.merge(LRTElectronLHSelectorsCfg(flags))
301 
302  #Photon ID Selector
303  from DerivationFrameworkLLP.LLPToolsConfig import PhotonIsEMSelectorsCfg
304  acc.merge(PhotonIsEMSelectorsCfg(flags))
305 
306  # LRT Muons
307  from DerivationFrameworkMuons.MuonsCommonConfig import MuonsCommonCfg
308  acc.merge(MuonsCommonCfg(flags,
309  suff="LRT"))
310 
311  # Recover Zero Pixel Hit Muons
312  from DerivationFrameworkLLP.LLPToolsConfig import RecoverZeroPixelHitMuonsCfg
313  acc.merge(RecoverZeroPixelHitMuonsCfg(flags))
314 
315  # flavor tagging
316  from BTagging.FlavorTaggingConfig import FlavorTaggingCfg
317  acc.merge(FlavorTaggingCfg(flags, 'AntiKt4EMTopoJets'))
318 
319  # VrtSecInclusive
320  from VrtSecInclusive.VrtSecInclusiveConfig import VrtSecInclusiveCfg
321 
322  # MuSAVtxFitter
323  from MuSAVtxFitter.MuSAVtxFitterConfig import MuSAVtxFitterConfig, MuSAVtxJPsiValidationAlgCfg, MuSAVtxFitterValidationConfig
324 
325  acc.merge(VrtSecInclusiveCfg(flags,
326  name = "VrtSecInclusive",
327  AugmentingVersionString = "",
328  FillIntermediateVertices = False,
329  TrackLocation = MergedTrackCollection))
330  LLP1VrtSecInclusiveSuffixes.append("")
331 
332  # short-lifetime VSI
333  shortLifetimeSuffix = "_shortLifetime"
334  acc.merge(VrtSecInclusiveCfg(flags,
335  name = "VrtSecInclusive_InDet"+shortLifetimeSuffix,
336  AugmentingVersionString = shortLifetimeSuffix,
337  FillIntermediateVertices = False,
338  TrackLocation = MergedTrackCollection,
339  twoTrkVtxFormingD0Cut = 1.0))
340  LLP1VrtSecInclusiveSuffixes.append(shortLifetimeSuffix)
341 
342  # disappearing track + LRT VSI
343  dissapearingSuffix = "_disappearing"
344  acc.merge(VrtSecInclusiveCfg(flags,
345  name = "VrtSecInclusive_"+dissapearingSuffix,
346  AugmentingVersionString = dissapearingSuffix,
347  FillIntermediateVertices = False,
348  TrackLocation = MergedTrackletCollection,
349  doReassembleVertices = True,
350  doMergeByShuffling = False,
351  doMergeFinalVerticesDistance= False,
352  doAssociateNonSelectedTracks= False,
353  DoPVcompatibility = True,
354  RemoveFake2TrkVrt = False,
355  PassThroughTrackSelection = True,
356  TruncateListOfWorkingVertices = False,
357  twoTrkVtxFormingD0Cut = 0.0,
358  SelVrtChi2Cut = 1000000.0,
359  twoTrVrtMaxPerigeeDist = 50.0,
360  twoTrVrtMinRadius = 50.0,
361  doDisappearingTrackVertexing= True
362  ))
363  LLP1VrtSecInclusiveSuffixes.append(dissapearingSuffix)
364 
365 
366 
367  if flags.Input.isMC and flags.Derivation.LLP.doTrackSystematics:
368  from InDetTrackSystematicsTools.InDetTrackSystematicsToolsConfig import TrackSystematicsAlgCfg
369  TrackSystSuffix = "_TRK_EFF_LARGED0_GLOBAL__1down"
370  acc.merge(TrackSystematicsAlgCfg(
371  flags,
372  name=f"InDetTrackSystematicsAlg{TrackSystSuffix}",
373  InputTrackContainer = MergedTrackCollection,
374  OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffix}"))
375  acc.merge(VrtSecInclusiveCfg(flags,
376  name = f"VrtSecInclusive{TrackSystSuffix}",
377  AugmentingVersionString = TrackSystSuffix,
378  FillIntermediateVertices = False,
379  TrackLocation = f"{MergedTrackCollection}{TrackSystSuffix}"))
380  LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffix)
381 
382  TrackSystSuffixShortLifetime = "_TRK_EFF_LARGED0_GLOBAL__1down_shortLifetime"
383  acc.merge(TrackSystematicsAlgCfg(
384  flags,
385  name=f"InDetTrackSystematicsAlg{TrackSystSuffixShortLifetime}",
386  InputTrackContainer = MergedTrackCollection,
387  OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}"))
388  acc.merge(VrtSecInclusiveCfg(flags,
389  name = f"VrtSecInclusive{TrackSystSuffixShortLifetime}",
390  AugmentingVersionString = TrackSystSuffixShortLifetime,
391  FillIntermediateVertices = False,
392  TrackLocation = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}",
393  twoTrkVtxFormingD0Cut = 1.0))
394  LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffixShortLifetime)
395 
396  # LRT muons merge
397  from DerivationFrameworkLLP.LLPToolsConfig import ZeroPixelHitMuonMergerAlgCfg
398  acc.merge(ZeroPixelHitMuonMergerAlgCfg(flags,
399  InputMuonContainers = [MergedMuonContainer, "ZeroPixelHitMuons"],
400  OutputMuonLocation = MergedMuonContainer_wZPH))
401 
402 
403  # leptons-only VSI
404  LeptonsSuffix = "_Leptons"
405  acc.merge(VrtSecInclusiveCfg(flags,
406  name = "VrtSecInclusive_InDet"+LeptonsSuffix,
407  AugmentingVersionString = LeptonsSuffix,
408  FillIntermediateVertices = False,
409  TrackLocation = MergedTrackCollection,
410  twoTrkVtxFormingD0Cut = 1.0,
411  doSelectTracksFromMuons = True,
412  doRemoveCaloTaggedMuons = True,
413  doSelectTracksFromElectrons = True,
414  MuonLocation = MergedMuonContainer,
415  ElectronLocation = MergedElectronContainer))
416  LLP1VrtSecInclusiveSuffixes.append(LeptonsSuffix)
417 
418  # track VSI
419  LepTrackSuffix = "_LepTrack"
420  acc.merge(VrtSecInclusiveCfg(flags,
421  name = "VrtSecInclusive_InDet"+LepTrackSuffix,
422  AugmentingVersionString = LepTrackSuffix,
423  FillIntermediateVertices = False,
424  TrackLocation = MergedTrackCollection,
425  MuonLocation = MergedMuonContainer,
426  ElectronLocation = MergedElectronContainer,
427  twoTrkVtxFormingD0Cut = 1.0,
428  doSelectIDAndGSFTracks = True,
429  doRemoveCaloTaggedMuons = True,
430  doRemoveNonLeptonVertices = True,
431  doAssociateNonSelectedTracks= False))
432  LLP1VrtSecInclusiveSuffixes.append(LepTrackSuffix)
433 
434  # Small-d0 Muons VSI
435  BoostedMuonsSuffix = "_BoostedMuons"
436  acc.merge(VrtSecInclusiveCfg(flags,
437  name = "VrtSecInclusive_InDet"+BoostedMuonsSuffix,
438  AugmentingVersionString = BoostedMuonsSuffix,
439  FillIntermediateVertices = False,
440  TrackLocation = MergedTrackCollection,
441  twoTrkVtxFormingD0Cut = 0.0,
442  doSelectTracksFromMuons = True,
443  doRemoveCaloTaggedMuons = True,
444  doSelectTracksFromElectrons = False,
445  MuonLocation = MergedMuonContainer_wZPH,
446  do_PVvetoCut = False,
447  DoTwoTrSoftBtag = True,
448  TwoTrVrtMinDistFromPVCut = 0.5,
449  associatePtCut = 500.))
450  LLP1VrtSecInclusiveSuffixes.append(BoostedMuonsSuffix)
451 
452  # MuSA Vertices
453  acc.merge(MuSAVtxFitterConfig(flags,
454  MuonContainerName=MergedMuonContainer))
455 
456  if flags.Derivation.LLP.doMuSAValidation:
457  #Create JPsi tagged muon container
458  acc.merge(MuSAVtxJPsiValidationAlgCfg(flags,
459  MuonContainer=MergedMuonContainer,
460  JPsiMuonContainer="JPsiMuons"))
461 
462  # JPsi validation MuSA Vertices
463  acc.merge(MuSAVtxFitterValidationConfig(flags,
464  name="MuSAVtxFitterValidationJPsi",
465  MuonContainerName="JPsiMuons"))
466  # all MSTPs validation MuSA Vertices
467  acc.merge(MuSAVtxFitterValidationConfig(flags,
468  MuonContainerName=MergedMuonContainer,
469  MuSAVtxContainerName="ValidationMuSAVertices",
470  MuSAExtrapolatedTracksName="ValidationMuSAExtrapolatedTrackParticles",
471  MSTPContainerName="MuonSpectrometerTrackParticles"))
472 
473 
474  # NewVSI: LepTrack variation
475  from NewVrtSecInclusiveTool.NewVrtSecInclusiveAlgConfig import NewVrtSecInclusiveAlgLLPCfg
476  from NewVrtSecInclusiveTool.NewVrtSecInclusiveConfig import DVFinderToolCfg
477  IDAndGSFSuffix = "_IDAndGSF_LepTrack"
478 
479  NVSILepTrack_Tool = acc.popToolsAndMerge(DVFinderToolCfg(flags,FillHist=False,AugmentingVersionString=IDAndGSFSuffix,MaxZVrt=1000.,AntiPileupSigRCut=2.))
480  acc.merge(NewVrtSecInclusiveAlgLLPCfg(flags,
481  algname = "NVSI"+IDAndGSFSuffix,
482  AugmentingVersionString = IDAndGSFSuffix,
483  ElectronContainer = MergedElectronContainer,
484  MuonContainer = MergedMuonContainer,
485  TrackParticleContainer = MergedTrackCollection,
486  GSFTrackParticleContainer = MergedGSFTrackCollection,
487  BVertexContainerName = "NewVrtSecInclusive_SecondaryVertices"+IDAndGSFSuffix,
488  AddIDTracks = True,
489  AddGSFTracks = True,
490  RemoveNonLepVertices = True,
491  BVertexTool = NVSILepTrack_Tool))
492  LLP1NewVSISuffixes.append(IDAndGSFSuffix)
493 
494  # bad jet cleaning
495  jet_clean_prefix="DFCommonJets_"
496  jet_clean_container="AntiKt4EMTopoJets"
497  jet_clean_level="SuperLooseBadLLP"
498  from JetSelectorTools.JetSelectorToolsConfig import EventCleaningToolCfg, JetCleaningToolCfg
499  LLP1JetCleanSuperLLPTool = acc.popToolsAndMerge(JetCleaningToolCfg(flags,
500  "LLP1JetCleanSuperLLP",
501  jet_clean_container,
502  jet_clean_level,
503  False))
504  acc.addPublicTool(LLP1JetCleanSuperLLPTool)
505 
506  LLP1EventCleanSuperLLPTool = acc.popToolsAndMerge(EventCleaningToolCfg(flags,
507  "LLP1EventCleanSuperLLP",
508  jet_clean_level))
509  LLP1EventCleanSuperLLPTool.JetCleanPrefix = jet_clean_prefix
510  LLP1EventCleanSuperLLPTool.JetContainer = jet_clean_container
511  LLP1EventCleanSuperLLPTool.JetCleaningTool = LLP1JetCleanSuperLLPTool
512  acc.addPublicTool(LLP1EventCleanSuperLLPTool)
513 
514  LLP1EventCleanAlg = CompFactory.EventCleaningTestAlg(
515  "LLP1JetCleanDecoratorSuperLLP",
516  EventCleaningTool = LLP1EventCleanSuperLLPTool,
517  JetCollectionName = jet_clean_container,
518  EventCleanPrefix = jet_clean_prefix,
519  CleaningLevel = jet_clean_level,
520  doEvent = True)
521 
522  # Sequence for decorator locking.
523  # See comments in JetCommonConfig.AddEventCleanFlagsCfg.
524  acc.addSequence(CompFactory.AthSequencer('EventCleanSeq', Sequential=True))
525  acc.addEventAlgo(LLP1EventCleanAlg, 'EventCleanSeq')
526 
527 
528  from DerivationFrameworkLLP.LLPToolsConfig import AugmentationToolLeadingJetsCfg
529  augmentationToolLeadingJets = acc.getPrimaryAndMerge(AugmentationToolLeadingJetsCfg(flags))
530  acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, AugmentationTools = [augmentationToolLeadingJets]))
531 
532  # Thinning tools...
533  from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningCfg, EgammaTrackParticleThinningCfg, MuonTrackParticleThinningCfg, TauTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
534  from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
535  from DerivationFrameworkTau.TauCommonConfig import TauThinningCfg
536 
537  # Inner detector tracks need to have greater than 10 GeV of pT
538  LLP1TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
539  flags,
540  name = "LLP1TrackParticleThinningTool",
541  StreamName = kwargs['StreamName'],
542  SelectionString = "InDetTrackParticles.pt>10*GeV",
543  InDetTrackParticlesKey = "InDetTrackParticles"))
544  # Keep all GSF LRT Tracks
545  LLP1LRTGSFTrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
546  flags,
547  name = "LLP1LRTGSFTrackParticleThinningTool",
548  StreamName = kwargs['StreamName'],
549  SelectionString = "LRTGSFTrackParticles.pt>0*GeV",
550  InDetTrackParticlesKey = "LRTGSFTrackParticles"))
551  # Pixel tracklets need to have greater than 5 GeV of pT
552  LLP1DTTrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
553  flags,
554  name = "LLP1DTTrackParticleThinningTool",
555  StreamName = kwargs['StreamName'],
556  SelectionString = "InDetDisappearingTrackParticles.pt>5*GeV",
557  InDetTrackParticlesKey = "InDetDisappearingTrackParticles"))
558 
559  # Include inner detector tracks associated with electrons
560  LLP1ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
561  flags,
562  name = "LLP1ElectronTPThinningTool",
563  StreamName = kwargs['StreamName'],
564  SGKey = "Electrons",
565  InDetTrackParticlesKey = "InDetTrackParticles"))
566  # Include inner detector tracks associated with LRT electrons
567  LLP1LRTElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
568  flags,
569  name = "LLP1LRTElectronTPThinningTool",
570  StreamName = kwargs['StreamName'],
571  SGKey = "LRTElectrons",
572  InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
573  GSFTrackParticlesKey = "LRTGSFTrackParticles"))
574  # Include inner detector tracks associated with muons
575  LLP1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
576  flags,
577  name = "LLP1MuonTPThinningTool",
578  StreamName = kwargs['StreamName'],
579  MuonKey = "Muons",
580  InDetTrackParticlesKey = "InDetTrackParticles"))
581  # Include LRT inner detector tracks associated with LRT muons
582  LLP1LRTMuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
583  flags,
584  name = "LLP1LRTMuonTPThinningTool",
585  StreamName = kwargs['StreamName'],
586  MuonKey = "MuonsLRT",
587  InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
588 
589  # Tau-related containers: taus, tau tracks and associated ID tracks, neutral PFOs, secondary vertices
590  tau_thinning_expression = f"TauJets.pt >= {flags.Tau.MinPtDAOD}"
591  LLP1TauJetsThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
592  flags,
593  name = "LLP1TauJetThinningTool",
594  StreamName = kwargs['StreamName'],
595  Taus = "TauJets",
596  TauTracks = "TauTracks",
597  TrackParticles = "InDetTrackParticles",
598  TauNeutralPFOs = "TauNeutralParticleFlowObjects",
599  TauSecondaryVertices = "TauSecondaryVertices",
600  SelectionString = tau_thinning_expression))
601 
602  # Only keep tau tracks (and associated ID tracks) classified as charged tracks
603  LLP1TauTPThinningTool = acc.getPrimaryAndMerge(TauTrackParticleThinningCfg(
604  flags,
605  name = "LLP1TauTPThinningTool",
606  StreamName = kwargs['StreamName'],
607  TauKey = "TauJets",
608  InDetTrackParticlesKey = "InDetTrackParticles",
609  DoTauTracksThinning = True,
610  TauTracksKey = "TauTracks"))
611 
612  tau_murm_thinning_expression = tau_thinning_expression.replace('TauJets', 'TauJets_MuonRM')
613  LLP1TauJetMuonRMParticleThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
614  flags,
615  name = "LLP1TauJets_MuonRMThinningTool",
616  StreamName = kwargs['StreamName'],
617  Taus = "TauJets_MuonRM",
618  TauTracks = "TauTracks_MuonRM",
619  TrackParticles = "InDetTrackParticles",
620  TauNeutralPFOs = "TauNeutralParticleFlowObjects_MuonRM",
621  TauSecondaryVertices = "TauSecondaryVertices_MuonRM",
622  SelectionString = tau_murm_thinning_expression))
623 
624  # ID tracks associated with high-pt di-tau
625  LLP1DiTauTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
626  flags,
627  name = "LLP1DiTauTPThinningTool",
628  StreamName = kwargs['StreamName'],
629  DiTauKey = "DiTauJets",
630  InDetTrackParticlesKey = "InDetTrackParticles"))
631 
632 
633  LLP1DiTauLowPtThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(
634  flags,
635  name = "LLP1DiTauLowPtThinningTool",
636  StreamName = kwargs['StreamName'],
637  ContainerName = "DiTauJetsLowPt",
638  SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
639 
640  # ID tracks associated with low-pt ditau
641  LLP1DiTauLowPtTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
642  flags,
643  name = "LLP1DiTauLowPtTPThinningTool",
644  StreamName = kwargs['StreamName'],
645  DiTauKey = "DiTauJetsLowPt",
646  InDetTrackParticlesKey = "InDetTrackParticles",
647  SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
648 
649 
650  # ID Tracks associated with secondary vertices
651  from DerivationFrameworkLLP.LLPToolsConfig import VSITrackParticleThinningCfg
652  LLP1VSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
653  name = "LLP1VSITPThinningTool",
654  StreamName = kwargs['StreamName'],
655  InDetTrackParticlesKey = "InDetTrackParticles",
656  AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
657  LLP1LRTVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
658  name = "LLP1LRTVSITPThinningTool",
659  StreamName = kwargs['StreamName'],
660  InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
661  AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
662  LLP1GSFVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
663  name = "LLP1GSFVSITPThinningTool",
664  StreamName = kwargs['StreamName'],
665  InDetTrackParticlesKey = "GSFTrackParticles",
666  AugVerStrings = [IDAndGSFSuffix]))
667 
668  # ID Tracks associated with jets
669  from DerivationFrameworkLLP.LLPToolsConfig import JetTrackParticleThinningCfg, JetLargeD0TrackParticleThinningCfg
670  LLP1JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(flags,
671  name = "LLP1JetTPThinningTool",
672  StreamName = kwargs['StreamName'],
673  JetKey = "AntiKt4EMTopoJets",
674  SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
675  InDetTrackParticlesKey = "InDetTrackParticles"))
676 
677  LLP1FatJetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg( flags,
678  name = "LLP1FatJetTPThinningTool",
679  StreamName = kwargs['StreamName'],
680  JetKey = "AntiKt10EMTopoRCJets",
681  SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
682  InDetTrackParticlesKey = "InDetTrackParticles",
683  ))
684 
685  # LRT Tracks associated with jets
686  if flags.Tracking.doLargeD0:
687  LLP1LRTJetTPThinningTool = acc.getPrimaryAndMerge(JetLargeD0TrackParticleThinningCfg(flags,
688  name = "LLP1LRTJetTPThinningTool",
689  StreamName = kwargs['StreamName'],
690  JetKey = "AntiKt4EMTopoJets",
691  SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
692  InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
693 
694  LLP1LRTFatJetTPThinningTool = acc.getPrimaryAndMerge(JetLargeD0TrackParticleThinningCfg(flags,
695  name = "LLP1LRTFatJetTPThinningTool",
696  StreamName = kwargs['StreamName'],
697  JetKey = "AntiKt10EMTopoRCJets",
698  SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
699  InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
700  ))
701 
702  # high dE/dx and low pT tracks
703  from DerivationFrameworkLLP.LLPToolsConfig import PixeldEdxTrackParticleThinningCfg
704  LLP1PixeldEdxTrackParticleThinningTool = acc.getPrimaryAndMerge(PixeldEdxTrackParticleThinningCfg(
705  flags,
706  name = "LLP1PixeldEdxTrackParticleThinningTool",
707  StreamName = kwargs['StreamName'],
708  InDetTrackParticlesKey = "InDetTrackParticles"))
709 
710 
711  #Thinning CaloCalTopoClusters associated to AntiKt4EMTopoJets
712  from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import JetCaloClusterThinningCfg
713 
714  LLP1CCThinningTool = acc.getPrimaryAndMerge(JetCaloClusterThinningCfg(
715  flags,
716  name = "LLP1CCTool",
717  StreamName = kwargs['StreamName'],
718  SGKey = "AntiKt4EMTopoJets",
719  TopoClCollectionSGKey = "CaloCalTopoClusters",
720  SelectionString = "(AntiKt4EMTopoJets.DFDecoratorLeadingJets)",
721  AdditionalClustersKey = ["EMOriginTopoClusters","LCOriginTopoClusters"]
722  ))
723 
724 
725 
726 
727 
728  # Finally the kernel itself
729  thinningTools = [LLP1TrackParticleThinningTool,
730  LLP1DTTrackParticleThinningTool,
731  LLP1ElectronTPThinningTool,
732  LLP1LRTElectronTPThinningTool,
733  LLP1MuonTPThinningTool,
734  LLP1LRTMuonTPThinningTool,
735  LLP1TauJetsThinningTool,
736  LLP1TauTPThinningTool,
737  LLP1TauJetMuonRMParticleThinningTool,
738  LLP1DiTauTPThinningTool,
739  LLP1DiTauLowPtThinningTool,
740  LLP1DiTauLowPtTPThinningTool,
741  LLP1VSITPThinningTool,
742  LLP1LRTVSITPThinningTool,
743  LLP1GSFVSITPThinningTool,
744  LLP1JetTPThinningTool,
745  LLP1FatJetTPThinningTool,
746  LLP1PixeldEdxTrackParticleThinningTool,
747  LLP1CCThinningTool,
748  LLP1LRTGSFTrackParticleThinningTool
749  ]
750 
751  if flags.Tracking.doLargeD0:
752  thinningTools.append(LLP1LRTJetTPThinningTool)
753  thinningTools.append(LLP1LRTFatJetTPThinningTool)
754 
755  # Additionnal augmentations
756 
757  # Compute RC substructure variables from energy clusters
758  from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
759  LLP1RCJetSubstructureClustTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
760  name = "LLP1RCJetSubstructureClustTrimAugTool",
761  StreamName = kwargs['StreamName'],
762  JetContainerKey = "AntiKt10EMTopoRCJets",
763  SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
764  GhostConstitNames = ["GhostLCTopoOrigin"],
765  Suffix = "clusterTrim",
766  Grooming = "Trimming",
767  RClusTrim = 0.2,
768  PtFracTrim = 0.05
769  ))
770  RCSubstructureClusterTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterTrimAug", AugmentationTools = [LLP1RCJetSubstructureClustTrimAugTool])
771  acc.addEventAlgo(RCSubstructureClusterTrimAug)
772 
773  LLP1RCJetSubstructureClustSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
774  name = "LLP1RCJetSubstructureClustSDAugTool",
775  StreamName = kwargs['StreamName'],
776  JetContainerKey = "AntiKt10EMTopoRCJets",
777  SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
778  GhostConstitNames = ["GhostLCTopoOrigin"],
779  Suffix = "clusterSoftDrop",
780  Grooming = "SoftDrop",
781  BetaSoft = 1.0,
782  ZcutSoft = 0.1
783  ))
784  RCSubstructureClusterSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterSDAug", AugmentationTools = [LLP1RCJetSubstructureClustSDAugTool])
785  acc.addEventAlgo(RCSubstructureClusterSDAug)
786 
787  # Compute RC substructure variables from tracks
788  from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
789  LLP1RCJetSubstructureTrackTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
790  name = "LLP1RCJetSubstructureTrackTrimAugTool",
791  StreamName = kwargs['StreamName'],
792  JetContainerKey = "AntiKt10EMTopoRCJets",
793  SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
794  GhostConstitNames = ["GhostTrack", "GhostTrackLRT"],
795  Suffix = "trackTrim",
796  Grooming = "Trimming",
797  RClusTrim = 0.2,
798  PtFracTrim = 0.05
799  ))
800  RCSubstructureTrackTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackTrimAug", AugmentationTools = [LLP1RCJetSubstructureTrackTrimAugTool])
801  acc.addEventAlgo(RCSubstructureTrackTrimAug)
802 
803  from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
804  LLP1RCJetSubstructureTrackSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
805  name = "LLP1RCJetSubstructureTrackSDAugTool",
806  StreamName = kwargs['StreamName'],
807  JetContainerKey = "AntiKt10EMTopoRCJets",
808  SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
809  GhostConstitNames = ["GhostTrack", "GhostTrackLRT"],
810  Suffix = "trackSoftDrop",
811  Grooming = "SoftDrop",
812  BetaSoft = 1.0,
813  ZcutSoft = 0.1
814  ))
815  RCSubstructureTrackSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackSDAug", AugmentationTools = [LLP1RCJetSubstructureTrackSDAugTool])
816  acc.addEventAlgo(RCSubstructureTrackSDAug)
817 
818 
819 
820  # Skimming
821  skimmingTools = []
822 
823  from DerivationFrameworkLLP.LLPToolsConfig import LLP1TriggerSkimmingToolCfg
824  LLP1TriggerSkimmingTool = acc.getPrimaryAndMerge(LLP1TriggerSkimmingToolCfg(flags,
825  name = "LLP1TriggerSkimmingTool",
826  TriggerListsHelper = kwargs['TriggerListsHelper']))
827 
828  skimmingTools.append(LLP1TriggerSkimmingTool)
829 
830  DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
831  acc.addEventAlgo(DerivationKernel(name,
832  SkimmingTools = skimmingTools,
833  ThinningTools = thinningTools,
834  AugmentationTools = augmentationTools))
835 
836  return acc
837 
838 
839 
840 
841 
842 
843 def LLP1Cfg(flags):
844  acc = ComponentAccumulator()
845  # Get the lists of triggers needed for trigger matching.
846  # This is needed at this scope (for the slimming) and further down in the config chain
847  # for actually configuring the matching, so we create it here and pass it down
848  # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
849  from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
850  LLP1TriggerListsHelper = TriggerListsHelper(flags)
851 
852  # Common augmentations
853  acc.merge(LLP1KernelCfg(flags, name="LLP1Kernel", StreamName = 'StreamDAOD_LLP1', TriggerListsHelper = LLP1TriggerListsHelper))
854 
855 
858  from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
859  # We can't pass non-LRT containers to the LLP algorithm.
860  # Otherwise, if this is run in conjunction with PHYS, the decorations
861  # produced by the PHYS algorithm will be overwritten. To get those
862  # decorations produced when LLP1 is run alone, we schedule a separate
863  # algorithm for those but make it the same as the one in PHYS so that
864  # they'll be merged when both formats are used together.
865  acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite = False, stream_name = 'StreamDAOD_LLP1'))
866  contNames = [ "LRTElectrons", "MuonsLRT" ]
867  acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1", isPhysLite = False, containerNames = contNames, useSelTools = True, stream_name = 'StreamDAOD_LLP1', hasLRT = True))
868  contNames = [ MergedMuonContainer, MergedElectronContainer, "Photons" ]
869  acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_LRTMerged", isPhysLite = False, containerNames = contNames, useSelTools = True, stream_name = 'StreamDAOD_LLP1', isoDecSuffix = "CloseByCorr_LRT", caloDecSuffix = '_LRT', hasLRT = True))
870  contNames = [ "ZeroPixelHitMuons" ]
871  acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_ZeroPixelHitsMuons", isPhysLite = False, containerNames = contNames, stream_name = 'StreamDAOD_LLP1', isoDecSuffix = "CloseByCorr_ZPH"))
872 
873  # ============================
874  # Define contents of the format
875  # =============================
876  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
877  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
878  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
879 
880  LLP1SlimmingHelper = SlimmingHelper("LLP1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
881 
882  LLP1SlimmingHelper.SmartCollections = ["EventInfo",
883  "Electrons",
884  "LRTElectrons",
885  "Photons",
886  "Muons",
887  "MuonsLRT",
888  "PrimaryVertices",
889  "InDetTrackParticles",
890  "InDetLargeD0TrackParticles",
891  "AntiKt4EMTopoJets",
892  "AntiKt4EMPFlowJets",
893  "AntiKt4EMPFlowJets_FTAG",
894  "BTagging_AntiKt4EMTopo",
895  "BTagging_AntiKt4EMPFlow",
896  "BTagging_AntiKtVR30Rmax4Rmin02Track",
897  "MET_Baseline_AntiKt4EMTopo",
898  "MET_Baseline_AntiKt4EMPFlow",
899  "TauJets",
900  "TauJets_MuonRM",
901  "DiTauJets",
902  "DiTauJetsLowPt",
903  "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
904  "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
905  "AntiKtVR30Rmax4Rmin02PV0TrackJets",
906  ]
907 
908  LLP1SlimmingHelper.AllVariables = ["InDetDisappearingTrackParticles",
909  "MSDisplacedVertex",
910  "MuonSpectrometerTrackParticles",
911  "UnAssocMuonSegments",
912  "MuonSegments",
913  "MuonSegments_LRT",
914  "MSonlyTracklets",
915  "CombinedMuonTrackParticles",
916  "ExtrapolatedMuonTrackParticles",
917  "CombinedMuonsLRTTrackParticles",
918  "ExtraPolatedMuonsLRTTrackParticles",
919  "MSOnlyExtraPolatedMuonsLRTTrackParticles",
920  "CombinedStauTrackParticles",
921  "AntiKt4EMTopoJets",
922  "egammaClusters",
923  "ElectronRingSets",
924  "ElectronCaloRings",
925  "JetRingSets",
926  "JetCaloRings",
927  "SlowMuons",
928  #"LCOriginTopoClusters",
929  "EMOriginTopoClusters",
930  "Staus",
931  "METAssoc_AntiKt4EMTopo",
932  "MET_Core_AntiKt4EMTopo",
933  "METAssoc_AntiKt4EMPFlow",
934  "MET_Core_AntiKt4EMPFlow",
935  "InDetLowPtRoITrackParticles",
936  "PixelClusters",
937  "PixelMSOSs",
938  "DisappearingPixelMSOSs",
939  "LowPtRoIPixelMSOSs",
940  "SCT_Clusters",
941  "SCT_MSOSs",
942  "DisappearingSCT_MSOSs",
943  "LowPtRoISCT_MSOSs",
944  ]
945 
946 
947  excludedVertexAuxData = "-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
948  StaticContent = []
949  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
950  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
951  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
952  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
953  StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
954  StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
955  StaticContent += ["xAOD::JetContainer#AntiKt10EMTopoRCJets","xAOD::JetAuxContainer#AntiKt10EMTopoRCJetsAux.-PseudoJet"]
956  StaticContent += ["CaloClusterCellLinkContainer#CaloCalTopoClusters_links"]
957 
958  for wp in LLP1VrtSecInclusiveSuffixes:
959  StaticContent += ["xAOD::VertexContainer#VrtSecInclusive_SecondaryVertices" + wp]
960  StaticContent += ["xAOD::VertexAuxContainer#VrtSecInclusive_SecondaryVertices" + wp + "Aux."]
961 
962  for wp in LLP1NewVSISuffixes:
963  StaticContent += ["xAOD::VertexContainer#NewVrtSecInclusive_SecondaryVertices" + wp]
964  StaticContent += ["xAOD::VertexAuxContainer#NewVrtSecInclusive_SecondaryVertices" + wp + "Aux." + excludedVertexAuxData]
965 
966  StaticContent += ["xAOD::VertexContainer#MuSAVertices"]
967  StaticContent += ["xAOD::VertexAuxContainer#MuSAVerticesAux."]
968  StaticContent += ["xAOD::TrackParticleContainer#MuSAExtrapolatedTrackParticles"]
969  StaticContent += ["xAOD::TrackParticleAuxContainer#MuSAExtrapolatedTrackParticlesAux."]
970 
971  if flags.Derivation.LLP.doMuSAValidation:
972  StaticContent += ["xAOD::VertexContainer#JPsiMuSAVertices"]
973  StaticContent += ["xAOD::VertexAuxContainer#JPsiMuSAVerticesAux."]
974  StaticContent += ["xAOD::VertexContainer#JPsiVertices"]
975  StaticContent += ["xAOD::VertexAuxContainer#JPsiVerticesAux."]
976  StaticContent += ["xAOD::TrackParticleContainer#JPsiMuSAExtrapolatedTrackParticles"]
977  StaticContent += ["xAOD::TrackParticleAuxContainer#JPsiMuSAExtrapolatedTrackParticlesAux."]
978  StaticContent += ["xAOD::VertexContainer#ValidationMuSAVertices"]
979  StaticContent += ["xAOD::VertexAuxContainer#ValidationMuSAVerticesAux."]
980  StaticContent += ["xAOD::TrackParticleContainer#ValidationMuSAExtrapolatedTrackParticles"]
981  StaticContent += ["xAOD::TrackParticleAuxContainer#ValidationMuSAExtrapolatedTrackParticlesAux."]
982 
983  LLP1SlimmingHelper.ExtraVariables += ["AntiKt10TruthTrimmedPtFrac5SmallR20Jets.Tau1_wta.Tau2_wta.Tau3_wta.D2.GhostBHadronsFinalCount",
984  "Electrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
985  "LRTElectrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
986  "Photons.DFCommonPhotonsIsEMMedium.DFCommonPhotonsIsEMMediumIsEMValue.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
987  "Muons.meanDeltaADCCountsMDT",
988  "egammaClusters.phi_sampl.eta0.phi0",
989  "LRTegammaClusters.phi_sampl.eta0.phi0",
990  "AntiKt4EMTopoJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.PartonTruthLabelID.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostBHadronsFinal.GhostCHadronsFinal.GhostTrack.GhostTrackCount.GhostTrackLRT.GhostTrackLRTCount.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
991  "AntiKt4EMPFlowJets.DFCommonJets_QGTagger_truthjet_nCharged.DFCommonJets_QGTagger_truthjet_pt.DFCommonJets_QGTagger_truthjet_eta.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.PartonTruthLabelID.DFCommonJets_fJvt.ConeExclBHadronsFinal.ConeExclCHadronsFinal.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostBHadronsFinal.GhostCHadronsFinal.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
992  "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostTausFinal.GhostTausFinalCount",
993  "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810.GhostBHadronsFinal.GhostCHadronsFinal.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.GhostCHadronsFinalPt.GhostTausFinal.GhostTausFinalCount",
994  "TruthPrimaryVertices.t.x.y.z.sumPt2",
995  "PrimaryVertices.t.x.y.z.sumPt2.covariance",
996  "InDetTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
997  "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
998  "InDetTrackParticles.numberOfIBLOverflowsdEdx.numberOfUsedHitsdEdx.pixeldEdx",
999  "InDetTrackParticles.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfNextToInnermostPixelLayerHits.numberOfContribPixelLayers.numberOfGangedFlaggedFakes.numberOfPixelOutliers.numberOfPixelSplitHits.numberOfPixelSpoiltHits",
1000  "InDetTrackParticles.numberOfSCTOutliers.numberOfSCTSpoiltHits",
1001  "InDetTrackParticles.numberOfTRTHoles.numberOfTRTDeadStraws.numberOfTRTSharedHits.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdHitsTotal.numberOfTRTHighThresholdOutliers.TRTdEdx.TRTdEdxUsedHits.hitPattern",
1002  "InDetTrackParticles.truthMatchProbability.truthOrigin.truthType",
1003  "InDetTrackParticles.TrkIsoPtPdEdx_ptcone20.TrkIsoPtPdEdx_ptcone30.TrkIsoPtPdEdx_ptcone40.TrkIsoPtTightPdEdx_ptcone20.TrkIsoPtTightPdEdx_ptcone30.TrkIsoPtTightPdEdx_ptcone40",
1004  "InDetTrackParticles.LLP1_ptcone20.LLP1_ptcone30.LLP1_ptcone40.LLP1_ptvarcone20.LLP1_ptvarcone30.LLP1_ptvarcone40.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag",
1005  "InDetTrackParticles.LLP1_topoetcone20.LLP1_topoetcone30.LLP1_topoetcone40.LLP1_topoetcone20NonCoreCone.LLP1_topoetcone30NonCoreCone.LLP1_topoetcone40NonCoreCone",
1006  "InDetTrackParticles.LLP1_CaloCelldEta.LLP1_CaloCelldPhi.LLP1_CaloCelldR.LLP1_CaloCelldX.LLP1_CaloCelldY.LLP1_CaloCelldZ.LLP1_CaloCellE.LLP1_CaloCellEta.LLP1_CaloCellGain.LLP1_CaloCellID.LLP1_CaloCellPhi.LLP1_CaloCellProvenance.LLP1_CaloCellQuality.LLP1_CaloCellR.LLP1_CaloCellSampling.LLP1_CaloCellTime.LLP1_CaloCellX.LLP1_CaloCellY.LLP1_CaloCellZ.LLP1_CaloCellEneDiff.LLP1_CaloCellTimeDiff",
1007  "InDetTrackParticles.Reco_msosLink",
1008 
1009  "InDetLargeD0TrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1010  "GSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthOrigin.truthType",
1011  "LRTGSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthOrigin.truthType",
1012  "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1013  "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ",
1014  "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1015  "EventInfo.DFCommonJets_eventClean_SuperLooseBadLLP.DFCommonJets_eventClean_SuperLooseBadLLP_EMTopo.DFCommonJets_eventClean_LooseBadLLP_EMTopo",
1016  "TauJets.dRmax.etOverPtLeadTrk.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
1017  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
1018  "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
1019 
1020  # Isolation close by correction content for the LRT included corrections
1021  LLP1SlimmingHelper.ExtraVariables += ["Muons.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1022  "MuonsLRT.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1023  "Electrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1024  "LRTElectrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1025  "Photons.topoetcone20_CloseByCorr_LRT.topoetcone40_CloseByCorr_LRT.ptcone20_CloseByCorr_LRT"
1026  ]
1027 
1028  VSITrackAuxVars = [
1029  "is_selected", "is_associated", "is_svtrk_final", "pt_wrtSV", "eta_wrtSV",
1030  "phi_wrtSV", "d0_wrtSV", "z0_wrtSV", "errP_wrtSV", "errd0_wrtSV",
1031  "errz0_wrtSV", "chi2_toSV"
1032  ]
1033 
1034  for suffix in LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes:
1035  LLP1SlimmingHelper.ExtraVariables += [ "InDetTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1036  LLP1SlimmingHelper.ExtraVariables += [ "InDetLargeD0TrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1037  LLP1SlimmingHelper.ExtraVariables += [ "GSFTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1038  LLP1SlimmingHelper.ExtraVariables += [ "LRTGSFTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1039 
1040  LLP1SlimmingHelper.ExtraVariables.append('CaloCalTopoClusters.e_sampl.calM.calE.calEta.calPhi.CENTER_MAG.SECOND_TIME')
1041  LLP1SlimmingHelper.AppendToDictionary["EMOriginTopoClusters"]='xAOD::CaloClusterContainer'
1042  LLP1SlimmingHelper.AppendToDictionary["EMOriginTopoClustersAux"]='xAOD::ShallowAuxContainer'
1043  LLP1SlimmingHelper.ExtraVariables.append('EMOriginTopoClusters.e_sampl.calM.calE.calEta.calPhi.CENTER_MAG.SECOND_TIME')
1044 
1045 
1046  # Truth containers
1047  if flags.Input.isMC:
1048 
1049  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
1050  addTruth3ContentToSlimmerTool(LLP1SlimmingHelper)
1051  LLP1SlimmingHelper.AllVariables += ['TruthHFWithDecayParticles','TruthHFWithDecayVertices','TruthCharm','TruthPileupParticles','InTimeAntiKt4TruthJets','OutOfTimeAntiKt4TruthJets', 'AntiKt4TruthJets']
1052  LLP1SlimmingHelper.ExtraVariables += ["Electrons.TruthLink",
1053  "LRTElectrons.TruthLink",
1054  "Muons.TruthLink",
1055  "MuonsLRT.TruthLink",
1056  "Photons.TruthLink"]
1057 
1058  if flags.Derivation.LLP.saveFullTruth:
1059  LLP1SlimmingHelper.ExtraVariables += ['TruthParticles', 'TruthVertices']
1060  StaticContent += ["xAOD::JetContainer#AntiKt10TruthRCJets","xAOD::JetAuxContainer#AntiKt10TruthRCJetsAux.-PseudoJet"]
1061 
1062  # ZeroPixelHitMuons container
1063  StaticContent += ["xAOD::MuonContainer#ZeroPixelHitMuons", "xAOD::MuonAuxContainer#ZeroPixelHitMuonsAux."]
1064 
1065  from DerivationFrameworkEGamma.PhotonsCPDetailedContent import (
1066  PhotonsCPDetailedContent,
1067  )
1068  LLP1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
1069 
1070 
1071  from DerivationFrameworkJetEtMiss.JetCommonConfig import addOriginCorrectedClustersToSlimmingTool
1072  addOriginCorrectedClustersToSlimmingTool(LLP1SlimmingHelper,writeLC=True,writeEM=True)
1073  LLP1SlimmingHelper.StaticContent = StaticContent
1074 
1075  # Trigger content
1076  LLP1SlimmingHelper.IncludeTriggerNavigation = False
1077  LLP1SlimmingHelper.IncludeJetTriggerContent = False
1078  LLP1SlimmingHelper.IncludeMuonTriggerContent = False
1079  LLP1SlimmingHelper.IncludeEGammaTriggerContent = False
1080  LLP1SlimmingHelper.IncludeTauTriggerContent = False
1081  LLP1SlimmingHelper.IncludeEtMissTriggerContent = False
1082  LLP1SlimmingHelper.IncludeBJetTriggerContent = False
1083  LLP1SlimmingHelper.IncludeBPhysTriggerContent = False
1084  LLP1SlimmingHelper.IncludeMinBiasTriggerContent = False
1085 
1086  # Trigger matching
1087  # Run 2
1088  if flags.Trigger.EDMVersion == 2:
1089  from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
1090  from DerivationFrameworkLLP.LLPToolsConfig import LLP1TriggerMatchingToolRun2Cfg
1091  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1092  OutputContainerPrefix = "TrigMatch_",
1093  TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesTau)
1094  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1095  OutputContainerPrefix = "TrigMatch_",
1096  TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau)
1097  # Schedule additional pre-matching against LLP offline muons and electrons
1098  acc.merge(LLP1TriggerMatchingToolRun2Cfg(flags,
1099  name = "LRTTriggerMatchingTool_LLP1",
1100  OutputContainerPrefix = "LRTTrigMatch_LLP1_",
1101  TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1102  InputElectrons=MergedElectronContainer,
1103  InputMuons=MergedMuonContainer_wZPH
1104  ))
1105  # And add the additional LLP trigger matching branches to the slimming helper
1106  AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1107  OutputContainerPrefix = "LRTTrigMatch_LLP1_",
1108  TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1109  InputElectrons=MergedElectronContainer,
1110  InputMuons=MergedMuonContainer_wZPH
1111  )
1112  # Run 3, or Run 2 with navigation conversion
1113  if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
1114  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
1116 
1117  # Output stream
1118  LLP1ItemList = LLP1SlimmingHelper.GetItemList()
1119  acc.merge(OutputStreamCfg(flags, "DAOD_LLP1", ItemList=LLP1ItemList, AcceptAlgs=["LLP1Kernel"]))
1120  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_LLP1", AcceptAlgs=["LLP1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
1121 
1122  return acc
python.LLPToolsConfig.RCJetSubstructureAugCfg
def RCJetSubstructureAugCfg(flags, name, **kwargs)
Definition: LLPToolsConfig.py:39
python.LLPToolsConfig.LLP1TriggerSkimmingToolCfg
def LLP1TriggerSkimmingToolCfg(flags, name, TriggerListsHelper, **kwargs)
Definition: LLPToolsConfig.py:91
TrigNavSlimmingMTConfig.AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
def AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(slimmingHelper)
Definition: TrigNavSlimmingMTConfig.py:98
python.LLPToolsConfig.LRTMuonMergerAlg
def LRTMuonMergerAlg(flags, name="LLP1_MuonLRTMergingAlg", **kwargs)
Definition: LLPToolsConfig.py:181
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.LLPToolsConfig.VSITrackParticleThinningCfg
def VSITrackParticleThinningCfg(flags, name, **kwargs)
Definition: LLPToolsConfig.py:12
python.EGammaLRTConfig.EGammaLRTCfg
def EGammaLRTCfg(ConfigFlags)
Definition: EGammaLRTConfig.py:15
python.JetSelectorToolsConfig.EventCleaningToolCfg
def EventCleaningToolCfg(ConfigFlags, name, cleaningLevel)
Definition: JetSelectorToolsConfig.py:14
python.JetCommonConfig.addOriginCorrectedClustersToSlimmingTool
def addOriginCorrectedClustersToSlimmingTool(slimhelper, writeLC=False, writeEM=False)
Helper to add origin corrected clusters to output.
Definition: JetCommonConfig.py:250
MuSAVtxFitterConfig.MuSAVtxFitterValidationConfig
def MuSAVtxFitterValidationConfig(flags, name="MuSAVtxFitterValidation", **kwargs)
Definition: MuSAVtxFitterConfig.py:107
DerivationFrameworkCaloConfig.JetCaloClusterThinningCfg
def JetCaloClusterThinningCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:133
python.LLPToolsConfig.TrackParametersKVUCfg
def TrackParametersKVUCfg(flags, name, **kwargs)
Definition: LLPToolsConfig.py:56
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, keepProvenanceTagsRegEx=None, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:16
python.LLPToolsConfig.ZeroPixelHitMuonMergerAlgCfg
def ZeroPixelHitMuonMergerAlgCfg(flags, name='LLP1_MuonZPHMergingAlg', **kwargs)
Definition: LLPToolsConfig.py:187
VrtSecInclusiveConfig.VrtSecInclusiveCfg
def VrtSecInclusiveCfg(flags, name="VrtSecInclusive", **kwargs)
Definition: VrtSecInclusiveConfig.py:9
python.JetSelectorToolsConfig.JetCleaningToolCfg
def JetCleaningToolCfg(ConfigFlags, name, jetdef, cleaningLevel, useDecorations)
Definition: JetSelectorToolsConfig.py:6
python.InDetToolsConfig.TrackParticleThinningCfg
def TrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:516
python.LLPToolsConfig.TrackParticleCaloCellDecoratorCfg
def TrackParticleCaloCellDecoratorCfg(flags, name, **kwargs)
Definition: LLPToolsConfig.py:74
python.InDetTrackSelectionToolConfig.InDetTrackSelectionTool_Loose_Cfg
def InDetTrackSelectionTool_Loose_Cfg(flags, name="InDetTrackSelectionTool_Loose", **kwargs)
Configs based on CutLevel Loose #####.
Definition: InDetTrackSelectionToolConfig.py:36
python.InDetToolsConfig.DiTauTrackParticleThinningCfg
def DiTauTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:621
python.TriggerMatchingCommonConfig.AddRun2TriggerMatchingToSlimmingHelper
def AddRun2TriggerMatchingToSlimmingHelper(**kwargs)
Definition: TriggerMatchingCommonConfig.py:49
DerivationFrameworkCaloConfig.MaxCellDecoratorCfg
def MaxCellDecoratorCfg(flags, **kwargs)
Definition: DerivationFrameworkCaloConfig.py:17
NewVrtSecInclusiveAlgConfig.NewVrtSecInclusiveAlgLLPCfg
def NewVrtSecInclusiveAlgLLPCfg(flags, algname="NVSI", AugmentingVersionString="", **kwargs)
Definition: NewVrtSecInclusiveAlgConfig.py:20
python.LLPToolsConfig.LRTElectronLHSelectorsCfg
def LRTElectronLHSelectorsCfg(flags)
Definition: LLPToolsConfig.py:235
python.LLPToolsConfig.LRTElectronMergerAlg
def LRTElectronMergerAlg(flags, name="LLP1_ElectronLRTMergingAlg", **kwargs)
Definition: LLPToolsConfig.py:200
python.AtlasExtrapolatorConfig.AtlasExtrapolatorCfg
def AtlasExtrapolatorCfg(flags, name='AtlasExtrapolator')
Definition: AtlasExtrapolatorConfig.py:63
python.JetRecConfig.registerAsInputConstit
def registerAsInputConstit(jetdef)
Definition: JetRecConfig.py:861
python.LLPToolsConfig.RecoverZeroPixelHitMuonsCfg
def RecoverZeroPixelHitMuonsCfg(flags)
Definition: LLPToolsConfig.py:382
python.LLPToolsConfig.JetLargeD0TrackParticleThinningCfg
def JetLargeD0TrackParticleThinningCfg(flags, name, **kwargs)
Definition: LLPToolsConfig.py:30
python.TrkVertexFitterUtilsConfig.AtlasFullLinearizedTrackFactoryCfg
def AtlasFullLinearizedTrackFactoryCfg(flags, name='AtlasFullLinearizedTrkFactory', **kwargs)
Definition: TrkVertexFitterUtilsConfig.py:20
InDetTrackSystematicsToolsConfig.TrackSystematicsAlgCfg
def TrackSystematicsAlgCfg(flags, name="InDetTrackSystematicsAlg", **kwargs)
Definition: InDetTrackSystematicsToolsConfig.py:112
python.JetRecConfig.JetRecCfg
def JetRecCfg(flags, jetdef, returnConfiguredDef=False)
Top level functions returning ComponentAccumulator out of JetDefinition.
Definition: JetRecConfig.py:36
python.MuonsCommonConfig.MuonsCommonCfg
def MuonsCommonCfg(flags, suff="")
Definition: MuonsCommonConfig.py:13
python.LLP1.LLP1KernelCfg
def LLP1KernelCfg(flags, name='LLP1Kernel', **kwargs)
Definition: LLP1.py:24
NewVrtSecInclusiveConfig.DVFinderToolCfg
def DVFinderToolCfg(flags, name="DVFinderTool", **myargs)
Definition: NewVrtSecInclusiveConfig.py:226
MuSAVtxFitterConfig
Definition: MuSAVtxFitterConfig.py:1
DerivationFrameworkCaloConfig.MaxCellDecoratorKernelCfg
def MaxCellDecoratorKernelCfg(flags, name="MaxCellDecoratorKernel", **kwargs)
Definition: DerivationFrameworkCaloConfig.py:92
python.DerivationFrameworkToolsConfig.GenericObjectThinningCfg
def GenericObjectThinningCfg(ConfigFlags, name, **kwargs)
Definition: DerivationFrameworkToolsConfig.py:20
python.InDetToolsConfig.JetTrackParticleThinningCfg
def JetTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:632
python.InDetToolsConfig.MuonTrackParticleThinningCfg
def MuonTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:600
python.InDetToolsConfig.TauTrackParticleThinningCfg
def TauTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:611
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.LLP1.LLP1Cfg
def LLP1Cfg(flags)
Definition: LLP1.py:843
IsoToolsConfig.CaloIsolationToolCfg
def CaloIsolationToolCfg(flags, **kwargs)
Definition: IsoToolsConfig.py:25
python.TrackIsolationDecoratorConfig.TrackIsolationToolCfg
def TrackIsolationToolCfg(ConfigFlags, name="TrackIsolationTool", **kwargs)
Definition: TrackIsolationDecoratorConfig.py:12
MuSAVtxFitterConfig.MuSAVtxJPsiValidationAlgCfg
def MuSAVtxJPsiValidationAlgCfg(flags, name="MuSAVtxJPsiValidationAlg", **kwargs)
Definition: MuSAVtxFitterConfig.py:50
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:465
python.InDetToolsConfig.InDetLRTMergeCfg
def InDetLRTMergeCfg(flags, name="InDetLRTMerge", **kwargs)
Definition: InDetToolsConfig.py:14
python.InDetToolsConfig.EgammaTrackParticleThinningCfg
def EgammaTrackParticleThinningCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:651
python.FlavorTaggingConfig.FlavorTaggingCfg
def FlavorTaggingCfg(cfgFlags, JetCollection, pv_col='PrimaryVertices', trackAugmenterPrefix=None, fast=False)
Definition: FlavorTaggingConfig.py:72
python.LLPToolsConfig.PhotonIsEMSelectorsCfg
def PhotonIsEMSelectorsCfg(flags)
Definition: LLPToolsConfig.py:207
IsolationSelectionConfig.IsoCloseByAlgsCfg
def IsoCloseByAlgsCfg(flags, suff="", isPhysLite=False, containerNames=["Muons", "Electrons", "Photons"], stream_name="", ttva_wp="Nonprompt_All_MaxWeight", useSelTools=False, isoDecSuffix="CloseByCorr", caloDecSuffix="", hasLRT=False)
Definition: IsolationSelectionConfig.py:146
python.TauCommonConfig.TauThinningCfg
def TauThinningCfg(flags, name, **kwargs)
Definition: TauCommonConfig.py:258
python.LLPToolsConfig.AugmentationToolLeadingJetsCfg
def AugmentationToolLeadingJetsCfg(flags)
Definition: LLPToolsConfig.py:48
python.PhysCommonConfig.PhysCommonAugmentationsCfg
def PhysCommonAugmentationsCfg(flags, **kwargs)
Definition: PhysCommonConfig.py:13
python.LLPToolsConfig.PixeldEdxTrackParticleThinningCfg
def PixeldEdxTrackParticleThinningCfg(flags, name, **kwargs)
Definition: LLPToolsConfig.py:83
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
python.InDetToolsConfig.IsolationTrackDecoratorCfg
def IsolationTrackDecoratorCfg(flags, name, **kwargs)
Definition: InDetToolsConfig.py:505
python.METCommonConfig.METLRTCfg
def METLRTCfg(ConfigFlags, jetType)
Definition: METCommonConfig.py:52
python.LLPToolsConfig.LLP1TriggerMatchingToolRun2Cfg
def LLP1TriggerMatchingToolRun2Cfg(flags, name, **kwargs)
Definition: LLPToolsConfig.py:145