ATLAS Offline Software
Loading...
Searching...
No Matches
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
10from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
11from AthenaConfiguration.ComponentFactory import CompFactory
12from AthenaConfiguration.Enums import LHCPeriod, MetadataCategory
13
14MergedElectronContainer = "StdWithLRTElectrons"
15MergedMuonContainer = "StdWithLRTMuons"
16MergedMuonContainer_wZPH = "StdWithLRTMuons_wZPH"
17MergedTrackCollection = "InDetWithLRTTrackParticles"
18MergedTrackletCollection = "InDetDisappearingWithLRTTrackParticles"
19MergedGSFTrackCollection = "InDetWithLRTGSFTrackParticles"
20LLP1VrtSecInclusiveSuffixes = []
21LLP1NewVSISuffixes = []
22
23# Main algorithm config
24def 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 # short-lifetime VSI, nod0 for LRSM dHNL analysis
343 shortLifetimeNod0Suffix = "_shortLifetime_nod0"
344 acc.merge(VrtSecInclusiveCfg(flags,
345 name = "VrtSecInclusive_InDet"+shortLifetimeNod0Suffix,
346 AugmentingVersionString = shortLifetimeNod0Suffix,
347 FillIntermediateVertices = False,
348 TrackLocation = MergedTrackCollection,
349 twoTrkVtxFormingD0Cut = 0))
350 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeNod0Suffix)
351
352 # disappearing track + LRT VSI
353 dissapearingSuffix = "_disappearing"
354 acc.merge(VrtSecInclusiveCfg(flags,
355 name = "VrtSecInclusive_"+dissapearingSuffix,
356 AugmentingVersionString = dissapearingSuffix,
357 FillIntermediateVertices = False,
358 TrackLocation = MergedTrackletCollection,
359 doReassembleVertices = True,
360 doMergeByShuffling = False,
361 doMergeFinalVerticesDistance= False,
362 doAssociateNonSelectedTracks= False,
363 DoPVcompatibility = True,
364 RemoveFake2TrkVrt = False,
365 PassThroughTrackSelection = True,
366 TruncateListOfWorkingVertices = False,
367 twoTrkVtxFormingD0Cut = 0.0,
368 SelVrtChi2Cut = 1000000.0,
369 twoTrVrtMaxPerigeeDist = 50.0,
370 twoTrVrtMinRadius = 50.0,
371 doDisappearingTrackVertexing= True
372 ))
373 LLP1VrtSecInclusiveSuffixes.append(dissapearingSuffix)
374
375
376
377 if flags.Input.isMC and flags.Derivation.LLP.doTrackSystematics:
378 from InDetTrackSystematicsTools.InDetTrackSystematicsToolsConfig import TrackSystematicsAlgCfg
379 TrackSystSuffix = "_TRK_EFF_LARGED0_GLOBAL__1down"
380 acc.merge(TrackSystematicsAlgCfg(
381 flags,
382 name=f"InDetTrackSystematicsAlg{TrackSystSuffix}",
383 InputTrackContainer = MergedTrackCollection,
384 OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffix}"))
385 acc.merge(VrtSecInclusiveCfg(flags,
386 name = f"VrtSecInclusive{TrackSystSuffix}",
387 AugmentingVersionString = TrackSystSuffix,
388 FillIntermediateVertices = False,
389 TrackLocation = f"{MergedTrackCollection}{TrackSystSuffix}"))
390 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffix)
391
392 TrackSystSuffixShortLifetime = "_TRK_EFF_LARGED0_GLOBAL__1down_shortLifetime"
393 acc.merge(TrackSystematicsAlgCfg(
394 flags,
395 name=f"InDetTrackSystematicsAlg{TrackSystSuffixShortLifetime}",
396 InputTrackContainer = MergedTrackCollection,
397 OutputTrackContainer = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}"))
398 acc.merge(VrtSecInclusiveCfg(flags,
399 name = f"VrtSecInclusive{TrackSystSuffixShortLifetime}",
400 AugmentingVersionString = TrackSystSuffixShortLifetime,
401 FillIntermediateVertices = False,
402 TrackLocation = f"{MergedTrackCollection}{TrackSystSuffixShortLifetime}",
403 twoTrkVtxFormingD0Cut = 1.0))
404 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffixShortLifetime)
405
406 # LRT muons merge
407 from DerivationFrameworkLLP.LLPToolsConfig import ZeroPixelHitMuonMergerAlgCfg
408 acc.merge(ZeroPixelHitMuonMergerAlgCfg(flags,
409 InputMuonContainers = [MergedMuonContainer, "ZeroPixelHitMuons"],
410 OutputMuonLocation = MergedMuonContainer_wZPH))
411
412
413 # leptons-only VSI
414 LeptonsSuffix = "_Leptons"
415 acc.merge(VrtSecInclusiveCfg(flags,
416 name = "VrtSecInclusive_InDet"+LeptonsSuffix,
417 AugmentingVersionString = LeptonsSuffix,
418 FillIntermediateVertices = False,
419 TrackLocation = MergedTrackCollection,
420 twoTrkVtxFormingD0Cut = 1.0,
421 doSelectTracksFromMuons = True,
422 doRemoveCaloTaggedMuons = True,
423 doSelectTracksFromElectrons = True,
424 MuonLocation = MergedMuonContainer,
425 ElectronLocation = MergedElectronContainer))
426 LLP1VrtSecInclusiveSuffixes.append(LeptonsSuffix)
427
428 # track VSI
429 LepTrackSuffix = "_LepTrack"
430 acc.merge(VrtSecInclusiveCfg(flags,
431 name = "VrtSecInclusive_InDet"+LepTrackSuffix,
432 AugmentingVersionString = LepTrackSuffix,
433 FillIntermediateVertices = False,
434 TrackLocation = MergedTrackCollection,
435 MuonLocation = MergedMuonContainer,
436 ElectronLocation = MergedElectronContainer,
437 twoTrkVtxFormingD0Cut = 1.0,
438 doSelectIDAndGSFTracks = True,
439 doRemoveCaloTaggedMuons = True,
440 doRemoveNonLeptonVertices = True,
441 doAssociateNonSelectedTracks= False))
442 LLP1VrtSecInclusiveSuffixes.append(LepTrackSuffix)
443
444 # Small-d0 Muons VSI
445 BoostedMuonsSuffix = "_BoostedMuons"
446 acc.merge(VrtSecInclusiveCfg(flags,
447 name = "VrtSecInclusive_InDet"+BoostedMuonsSuffix,
448 AugmentingVersionString = BoostedMuonsSuffix,
449 FillIntermediateVertices = False,
450 TrackLocation = MergedTrackCollection,
451 twoTrkVtxFormingD0Cut = 0.0,
452 doSelectTracksFromMuons = True,
453 doRemoveCaloTaggedMuons = True,
454 doSelectTracksFromElectrons = False,
455 MuonLocation = MergedMuonContainer_wZPH,
456 do_PVvetoCut = False,
457 DoTwoTrSoftBtag = True,
458 TwoTrVrtMinDistFromPVCut = 0.5,
459 associatePtCut = 500.))
460 LLP1VrtSecInclusiveSuffixes.append(BoostedMuonsSuffix)
461
462
463 # Small-d0 Electrons VSI
464 BoostedElectronsSuffix = "_BoostedElectrons"
465 acc.merge(VrtSecInclusiveCfg(flags,
466 name = "VrtSecInclusive_InDet"+BoostedElectronsSuffix,
467 AugmentingVersionString = BoostedElectronsSuffix,
468 FillIntermediateVertices = False,
469 TrackLocation = MergedTrackCollection,
470 twoTrkVtxFormingD0Cut = 0.0,
471 doSelectTracksFromMuons = False,
472 doSelectTracksFromElectrons = True,
473 ElectronLocation = MergedElectronContainer,
474 do_PVvetoCut = False,
475 DoTwoTrSoftBtag = True,
476 TwoTrVrtMinDistFromPVCut = 0.5,
477 associatePtCut = 500.))
478 LLP1VrtSecInclusiveSuffixes.append(BoostedElectronsSuffix)
479
480
481 # MuSA Vertices
482 acc.merge(MuSAVtxFitterConfig(flags,
483 MuonContainerName=MergedMuonContainer))
484
485 if flags.Derivation.LLP.doMuSAValidation:
486 #Create JPsi tagged muon container
487 acc.merge(MuSAVtxJPsiValidationAlgCfg(flags,
488 MuonContainer=MergedMuonContainer,
489 JPsiMuonContainer="JPsiMuons"))
490
491 # JPsi validation MuSA Vertices
492 acc.merge(MuSAVtxFitterValidationConfig(flags,
493 name="MuSAVtxFitterValidationJPsi",
494 MuonContainerName="JPsiMuons"))
495 # all MSTPs validation MuSA Vertices
496 acc.merge(MuSAVtxFitterValidationConfig(flags,
497 MuonContainerName=MergedMuonContainer,
498 MuSAVtxContainerName="ValidationMuSAVertices",
499 MuSAExtrapolatedTracksName="ValidationMuSAExtrapolatedTrackParticles",
500 MSTPContainerName="MuonSpectrometerTrackParticles"))
501
502
503 # NewVSI: LepTrack variation
504 from NewVrtSecInclusiveTool.NewVrtSecInclusiveAlgConfig import NewVrtSecInclusiveAlgLLPCfg
505 from NewVrtSecInclusiveTool.NewVrtSecInclusiveConfig import DVFinderToolCfg
506 IDAndGSFSuffix = "_IDAndGSF_LepTrack"
507
508 NVSILepTrack_Tool = acc.popToolsAndMerge(DVFinderToolCfg(flags,FillHist=False,AugmentingVersionString=IDAndGSFSuffix,MaxZVrt=1000.,AntiPileupSigRCut=2.))
509 acc.merge(NewVrtSecInclusiveAlgLLPCfg(flags,
510 algname = "NVSI"+IDAndGSFSuffix,
511 AugmentingVersionString = IDAndGSFSuffix,
512 ElectronContainer = MergedElectronContainer,
513 MuonContainer = MergedMuonContainer,
514 TrackParticleContainer = MergedTrackCollection,
515 GSFTrackParticleContainer = MergedGSFTrackCollection,
516 BVertexContainerName = "NewVrtSecInclusive_SecondaryVertices"+IDAndGSFSuffix,
517 AddIDTracks = True,
518 AddGSFTracks = True,
519 RemoveNonLepVertices = True,
520 BVertexTool = NVSILepTrack_Tool))
521 LLP1NewVSISuffixes.append(IDAndGSFSuffix)
522
523 # bad jet cleaning
524 jet_clean_prefix="DFCommonJets_"
525 jet_clean_container="AntiKt4EMTopoJets"
526 jet_clean_level="SuperLooseBadLLP"
527 from JetSelectorTools.JetSelectorToolsConfig import EventCleaningToolCfg, JetCleaningToolCfg
528 LLP1JetCleanSuperLLPTool = acc.popToolsAndMerge(JetCleaningToolCfg(flags,
529 "LLP1JetCleanSuperLLP",
530 jet_clean_container,
531 jet_clean_level,
532 False))
533 acc.addPublicTool(LLP1JetCleanSuperLLPTool)
534
535 LLP1EventCleanSuperLLPTool = acc.popToolsAndMerge(EventCleaningToolCfg(flags,
536 "LLP1EventCleanSuperLLP",
537 jet_clean_level))
538 LLP1EventCleanSuperLLPTool.JetCleanPrefix = jet_clean_prefix
539 LLP1EventCleanSuperLLPTool.OrDecorator = "passOR_EMTopo"
540 LLP1EventCleanSuperLLPTool.JetContainer = jet_clean_container
541 LLP1EventCleanSuperLLPTool.JetCleaningTool = LLP1JetCleanSuperLLPTool
542 acc.addPublicTool(LLP1EventCleanSuperLLPTool)
543
544 LLP1EventCleanAlg = CompFactory.EventCleaningTestAlg(
545 "LLP1JetCleanDecoratorSuperLLP",
546 EventCleaningTool = LLP1EventCleanSuperLLPTool,
547 JetCollectionName = jet_clean_container,
548 EventCleanPrefix = jet_clean_prefix,
549 CleaningLevel = jet_clean_level,
550 doEvent = True)
551
552 # Sequence for decorator locking.
553 # See comments in JetCommonConfig.AddEventCleanFlagsCfg.
554 acc.addSequence(CompFactory.AthSequencer('EventCleanSeq', Sequential=True))
555 acc.addEventAlgo(LLP1EventCleanAlg, 'EventCleanSeq')
556
557
558
559 from DerivationFrameworkLLP.LLPToolsConfig import AugmentationToolLeadingJetsCfg
560 augmentationToolLeadingJets = acc.getPrimaryAndMerge(AugmentationToolLeadingJetsCfg(flags))
561 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, AugmentationTools = [augmentationToolLeadingJets]))
562
563 # Thinning tools...
564 from DerivationFrameworkInDet.InDetToolsConfig import TrackParticleThinningCfg, EgammaTrackParticleThinningCfg, MuonTrackParticleThinningCfg, TauTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
565 from DerivationFrameworkTools.DerivationFrameworkToolsConfig import GenericObjectThinningCfg
566 from DerivationFrameworkTau.TauCommonConfig import TauThinningCfg
567
568 # Inner detector tracks need to have greater than 10 GeV of pT
569 LLP1TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
570 flags,
571 name = "LLP1TrackParticleThinningTool",
572 StreamName = kwargs['StreamName'],
573 SelectionString = "InDetTrackParticles.pt>10*GeV",
574 InDetTrackParticlesKey = "InDetTrackParticles"))
575 # Keep all GSF LRT Tracks
576 LLP1LRTGSFTrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
577 flags,
578 name = "LLP1LRTGSFTrackParticleThinningTool",
579 StreamName = kwargs['StreamName'],
580 SelectionString = "LRTGSFTrackParticles.pt>0*GeV",
581 InDetTrackParticlesKey = "LRTGSFTrackParticles"))
582 # Pixel tracklets need to have greater than 5 GeV of pT
583 LLP1DTTrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
584 flags,
585 name = "LLP1DTTrackParticleThinningTool",
586 StreamName = kwargs['StreamName'],
587 SelectionString = "InDetDisappearingTrackParticles.pt>5*GeV",
588 InDetTrackParticlesKey = "InDetDisappearingTrackParticles"))
589
590 # Include inner detector tracks associated with electrons
591 LLP1ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
592 flags,
593 name = "LLP1ElectronTPThinningTool",
594 StreamName = kwargs['StreamName'],
595 SGKey = "Electrons",
596 InDetTrackParticlesKey = "InDetTrackParticles"))
597 # Include inner detector tracks associated with LRT electrons
598 LLP1LRTElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
599 flags,
600 name = "LLP1LRTElectronTPThinningTool",
601 StreamName = kwargs['StreamName'],
602 SGKey = "LRTElectrons",
603 InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
604 GSFTrackParticlesKey = "LRTGSFTrackParticles"))
605 # Include inner detector tracks associated with muons
606 LLP1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
607 flags,
608 name = "LLP1MuonTPThinningTool",
609 StreamName = kwargs['StreamName'],
610 MuonKey = "Muons",
611 InDetTrackParticlesKey = "InDetTrackParticles"))
612 # Include LRT inner detector tracks associated with LRT muons
613 LLP1LRTMuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
614 flags,
615 name = "LLP1LRTMuonTPThinningTool",
616 StreamName = kwargs['StreamName'],
617 MuonKey = "MuonsLRT",
618 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
619 # GSF tracks associated to photons
620 LLP1PhotonTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
621 flags,
622 name = "LLP1PhotonTPThinningTool",
623 StreamName = kwargs['StreamName'],
624 SGKey = "Photons",
625 InDetTrackParticlesKey = "",
626 GSFConversionVerticesKey = "GSFConversionVertices",
627 GSFTrackParticlesKey = "GSFTrackParticles",
628 BestMatchOnly = True,
629 BestVtxMatchOnly = True))
630 # Tau-related containers: taus, tau tracks and associated ID tracks, neutral PFOs, secondary vertices
631 tau_thinning_expression = f"TauJets.pt >= {flags.Tau.MinPtDAOD}"
632 LLP1TauJetsThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
633 flags,
634 name = "LLP1TauJetThinningTool",
635 StreamName = kwargs['StreamName'],
636 Taus = "TauJets",
637 TauTracks = "TauTracks",
638 TrackParticles = "InDetTrackParticles",
639 TauNeutralPFOs = "TauNeutralParticleFlowObjects",
640 TauSecondaryVertices = "TauSecondaryVertices",
641 SelectionString = tau_thinning_expression))
642
643 # Only keep tau tracks (and associated ID tracks) classified as charged tracks
644 LLP1TauTPThinningTool = acc.getPrimaryAndMerge(TauTrackParticleThinningCfg(
645 flags,
646 name = "LLP1TauTPThinningTool",
647 StreamName = kwargs['StreamName'],
648 TauKey = "TauJets",
649 InDetTrackParticlesKey = "InDetTrackParticles",
650 DoTauTracksThinning = True,
651 TauTracksKey = "TauTracks"))
652
653 tau_murm_thinning_expression = tau_thinning_expression.replace('TauJets', 'TauJets_MuonRM')
654 LLP1TauJetMuonRMParticleThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
655 flags,
656 name = "LLP1TauJets_MuonRMThinningTool",
657 StreamName = kwargs['StreamName'],
658 Taus = "TauJets_MuonRM",
659 TauTracks = "TauTracks_MuonRM",
660 TrackParticles = "InDetTrackParticles",
661 TauNeutralPFOs = "TauNeutralParticleFlowObjects_MuonRM",
662 TauSecondaryVertices = "TauSecondaryVertices_MuonRM",
663 SelectionString = tau_murm_thinning_expression))
664
665 # ID tracks associated with high-pt di-tau
666 LLP1DiTauTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
667 flags,
668 name = "LLP1DiTauTPThinningTool",
669 StreamName = kwargs['StreamName'],
670 DiTauKey = "DiTauJets",
671 InDetTrackParticlesKey = "InDetTrackParticles"))
672
673
674 LLP1DiTauLowPtThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(
675 flags,
676 name = "LLP1DiTauLowPtThinningTool",
677 StreamName = kwargs['StreamName'],
678 ContainerName = "DiTauJetsLowPt",
679 SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
680
681 # ID tracks associated with low-pt ditau
682 LLP1DiTauLowPtTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
683 flags,
684 name = "LLP1DiTauLowPtTPThinningTool",
685 StreamName = kwargs['StreamName'],
686 DiTauKey = "DiTauJetsLowPt",
687 InDetTrackParticlesKey = "InDetTrackParticles",
688 SelectionString = "DiTauJetsLowPt.nSubjets > 1"))
689
690
691 # ID Tracks associated with secondary vertices
692 from DerivationFrameworkLLP.LLPToolsConfig import VSITrackParticleThinningCfg
693 LLP1VSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
694 name = "LLP1VSITPThinningTool",
695 StreamName = kwargs['StreamName'],
696 InDetTrackParticlesKey = "InDetTrackParticles",
697 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
698 LLP1LRTVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
699 name = "LLP1LRTVSITPThinningTool",
700 StreamName = kwargs['StreamName'],
701 InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
702 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
703 LLP1GSFVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
704 name = "LLP1GSFVSITPThinningTool",
705 StreamName = kwargs['StreamName'],
706 InDetTrackParticlesKey = "GSFTrackParticles",
707 AugVerStrings = [IDAndGSFSuffix]))
708
709 # ID Tracks associated with jets
710 from DerivationFrameworkLLP.LLPToolsConfig import JetTrackParticleThinningCfg, JetLargeD0TrackParticleThinningCfg
711 LLP1JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(flags,
712 name = "LLP1JetTPThinningTool",
713 StreamName = kwargs['StreamName'],
714 JetKey = "AntiKt4EMTopoJets",
715 SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
716 InDetTrackParticlesKey = "InDetTrackParticles"))
717
718 LLP1FatJetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg( flags,
719 name = "LLP1FatJetTPThinningTool",
720 StreamName = kwargs['StreamName'],
721 JetKey = "AntiKt10EMTopoRCJets",
722 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
723 InDetTrackParticlesKey = "InDetTrackParticles",
724 ))
725
726 # LRT Tracks associated with jets
727 if flags.Tracking.doLargeD0:
728 LLP1LRTJetTPThinningTool = acc.getPrimaryAndMerge(JetLargeD0TrackParticleThinningCfg(flags,
729 name = "LLP1LRTJetTPThinningTool",
730 StreamName = kwargs['StreamName'],
731 JetKey = "AntiKt4EMTopoJets",
732 SelectionString = "(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
733 InDetTrackParticlesKey = "InDetLargeD0TrackParticles"))
734
735 LLP1LRTFatJetTPThinningTool = acc.getPrimaryAndMerge(JetLargeD0TrackParticleThinningCfg(flags,
736 name = "LLP1LRTFatJetTPThinningTool",
737 StreamName = kwargs['StreamName'],
738 JetKey = "AntiKt10EMTopoRCJets",
739 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
740 InDetTrackParticlesKey = "InDetLargeD0TrackParticles",
741 ))
742
743 # high dE/dx and low pT tracks
744 from DerivationFrameworkLLP.LLPToolsConfig import PixeldEdxTrackParticleThinningCfg
745 LLP1PixeldEdxTrackParticleThinningTool = acc.getPrimaryAndMerge(PixeldEdxTrackParticleThinningCfg(
746 flags,
747 name = "LLP1PixeldEdxTrackParticleThinningTool",
748 StreamName = kwargs['StreamName'],
749 InDetTrackParticlesKey = "InDetTrackParticles"))
750
751
752 #Thinning CaloCalTopoClusters associated to AntiKt4EMTopoJets
753 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig import JetCaloClusterThinningCfg
754
755 LLP1CCThinningTool = acc.getPrimaryAndMerge(JetCaloClusterThinningCfg(
756 flags,
757 name = "LLP1CCTool",
758 StreamName = kwargs['StreamName'],
759 SGKey = "AntiKt4EMTopoJets",
760 TopoClCollectionSGKey = "CaloCalTopoClusters",
761 AdditionalClustersKey = ["EMOriginTopoClusters","LCOriginTopoClusters"]
762 ))
763
764
765
766
767
768 # Finally the kernel itself
769 thinningTools = [LLP1TrackParticleThinningTool,
770 LLP1DTTrackParticleThinningTool,
771 LLP1ElectronTPThinningTool,
772 LLP1LRTElectronTPThinningTool,
773 LLP1MuonTPThinningTool,
774 LLP1PhotonTPThinningTool,
775 LLP1LRTMuonTPThinningTool,
776 LLP1TauJetsThinningTool,
777 LLP1TauTPThinningTool,
778 LLP1TauJetMuonRMParticleThinningTool,
779 LLP1DiTauTPThinningTool,
780 LLP1DiTauLowPtThinningTool,
781 LLP1DiTauLowPtTPThinningTool,
782 LLP1VSITPThinningTool,
783 LLP1LRTVSITPThinningTool,
784 LLP1GSFVSITPThinningTool,
785 LLP1JetTPThinningTool,
786 LLP1FatJetTPThinningTool,
787 LLP1PixeldEdxTrackParticleThinningTool,
788 LLP1CCThinningTool,
789 LLP1LRTGSFTrackParticleThinningTool
790 ]
791
792 if flags.Tracking.doLargeD0:
793 thinningTools.append(LLP1LRTJetTPThinningTool)
794 thinningTools.append(LLP1LRTFatJetTPThinningTool)
795
796 # Additionnal augmentations
797
798 # Compute RC substructure variables from energy clusters
799 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
800 LLP1RCJetSubstructureClustTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
801 name = "LLP1RCJetSubstructureClustTrimAugTool",
802 StreamName = kwargs['StreamName'],
803 JetContainerKey = "AntiKt10EMTopoRCJets",
804 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
805 GhostConstitNames = ["GhostLCTopoOrigin"],
806 Suffix = "clusterTrim",
807 Grooming = "Trimming",
808 RClusTrim = 0.2,
809 PtFracTrim = 0.05
810 ))
811 RCSubstructureClusterTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterTrimAug", AugmentationTools = [LLP1RCJetSubstructureClustTrimAugTool])
812 acc.addEventAlgo(RCSubstructureClusterTrimAug)
813
814 LLP1RCJetSubstructureClustSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
815 name = "LLP1RCJetSubstructureClustSDAugTool",
816 StreamName = kwargs['StreamName'],
817 JetContainerKey = "AntiKt10EMTopoRCJets",
818 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
819 GhostConstitNames = ["GhostLCTopoOrigin"],
820 Suffix = "clusterSoftDrop",
821 Grooming = "SoftDrop",
822 BetaSoft = 1.0,
823 ZcutSoft = 0.1
824 ))
825 RCSubstructureClusterSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureClusterSDAug", AugmentationTools = [LLP1RCJetSubstructureClustSDAugTool])
826 acc.addEventAlgo(RCSubstructureClusterSDAug)
827
828 # Compute RC substructure variables from tracks
829 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
830 LLP1RCJetSubstructureTrackTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
831 name = "LLP1RCJetSubstructureTrackTrimAugTool",
832 StreamName = kwargs['StreamName'],
833 JetContainerKey = "AntiKt10EMTopoRCJets",
834 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
835 GhostConstitNames = ["GhostTrack", "GhostTrackLRT"],
836 Suffix = "trackTrim",
837 Grooming = "Trimming",
838 RClusTrim = 0.2,
839 PtFracTrim = 0.05
840 ))
841 RCSubstructureTrackTrimAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackTrimAug", AugmentationTools = [LLP1RCJetSubstructureTrackTrimAugTool])
842 acc.addEventAlgo(RCSubstructureTrackTrimAug)
843
844 from DerivationFrameworkLLP.LLPToolsConfig import RCJetSubstructureAugCfg
845 LLP1RCJetSubstructureTrackSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
846 name = "LLP1RCJetSubstructureTrackSDAugTool",
847 StreamName = kwargs['StreamName'],
848 JetContainerKey = "AntiKt10EMTopoRCJets",
849 SelectionString = "(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
850 GhostConstitNames = ["GhostTrack", "GhostTrackLRT"],
851 Suffix = "trackSoftDrop",
852 Grooming = "SoftDrop",
853 BetaSoft = 1.0,
854 ZcutSoft = 0.1
855 ))
856 RCSubstructureTrackSDAug = CompFactory.DerivationFramework.CommonAugmentation("RCSubstructureTrackSDAug", AugmentationTools = [LLP1RCJetSubstructureTrackSDAugTool])
857 acc.addEventAlgo(RCSubstructureTrackSDAug)
858
859
860
861 # Skimming
862 skimmingTools = []
863
864 from DerivationFrameworkLLP.LLPToolsConfig import LLP1TriggerSkimmingToolCfg
865 LLP1TriggerSkimmingTool = acc.getPrimaryAndMerge(LLP1TriggerSkimmingToolCfg(flags,
866 name = "LLP1TriggerSkimmingTool",
867 TriggerListsHelper = kwargs['TriggerListsHelper']))
868
869 skimmingTools.append(LLP1TriggerSkimmingTool)
870
871 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
872 acc.addEventAlgo(DerivationKernel(name,
873 SkimmingTools = skimmingTools,
874 ThinningTools = thinningTools,
875 AugmentationTools = augmentationTools))
876
877 return acc
878
879
880
881
882
883
884def LLP1Cfg(flags):
885 acc = ComponentAccumulator()
886 # Get the lists of triggers needed for trigger matching.
887 # This is needed at this scope (for the slimming) and further down in the config chain
888 # for actually configuring the matching, so we create it here and pass it down
889 # TODO: this should ideally be called higher up to avoid it being run multiple times in a train
890 from DerivationFrameworkPhys.TriggerListsHelper import TriggerListsHelper
891 LLP1TriggerListsHelper = TriggerListsHelper(flags)
892
893 # Common augmentations
894 acc.merge(LLP1KernelCfg(flags, name="LLP1Kernel", StreamName = 'StreamDAOD_LLP1', TriggerListsHelper = LLP1TriggerListsHelper))
895
896
899 from IsolationSelection.IsolationSelectionConfig import IsoCloseByAlgsCfg
900 # We can't pass non-LRT containers to the LLP algorithm.
901 # Otherwise, if this is run in conjunction with PHYS, the decorations
902 # produced by the PHYS algorithm will be overwritten. To get those
903 # decorations produced when LLP1 is run alone, we schedule a separate
904 # algorithm for those but make it the same as the one in PHYS so that
905 # they'll be merged when both formats are used together.
906 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite = False, stream_name = 'StreamDAOD_LLP1'))
907 contNames = [ "LRTElectrons", "MuonsLRT" ]
908 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1", isPhysLite = False, containerNames = contNames, useSelTools = True, stream_name = 'StreamDAOD_LLP1', hasLRT = True))
909 contNames = [ MergedMuonContainer, MergedElectronContainer, "Photons" ]
910 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_LRTMerged", isPhysLite = False, containerNames = contNames, useSelTools = True, stream_name = 'StreamDAOD_LLP1', isoDecSuffix = "CloseByCorr_LRT", caloDecSuffix = '_LRT', hasLRT = True))
911 contNames = [ "ZeroPixelHitMuons" ]
912 acc.merge(IsoCloseByAlgsCfg(flags, suff = "_LLP1_ZeroPixelHitsMuons", isPhysLite = False, containerNames = contNames, stream_name = 'StreamDAOD_LLP1', isoDecSuffix = "CloseByCorr_ZPH"))
913
914 # ============================
915 # Define contents of the format
916 # =============================
917 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
918 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
919 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
920
921 LLP1SlimmingHelper = SlimmingHelper("LLP1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
922
923 LLP1SlimmingHelper.SmartCollections = ["EventInfo",
924 "Electrons",
925 "LRTElectrons",
926 "Photons",
927 "Muons",
928 "MuonsLRT",
929 "PrimaryVertices",
930 "InDetTrackParticles",
931 "InDetLargeD0TrackParticles",
932 "AntiKt4EMTopoJets",
933 "AntiKt4EMPFlowJets",
934
935 "MET_Baseline_AntiKt4EMTopo",
936 "MET_Baseline_AntiKt4EMPFlow",
937 "TauJets",
938 "TauJets_MuonRM",
939 "DiTauJets",
940 "DiTauJetsLowPt",
941 "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
942 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets",
943 ]
944
945 LLP1SlimmingHelper.AllVariables = ["InDetDisappearingTrackParticles",
946 "MSDisplacedVertex",
947 "MuonSpectrometerTrackParticles",
948 "UnAssocMuonSegments",
949 "MuonSegments",
950 "MuonSegments_LRT",
951 "MSonlyTracklets",
952 "CombinedMuonTrackParticles",
953 "ExtrapolatedMuonTrackParticles",
954 "CombinedMuonsLRTTrackParticles",
955 "ExtraPolatedMuonsLRTTrackParticles",
956 "MSOnlyExtraPolatedMuonsLRTTrackParticles",
957 "CombinedStauTrackParticles",
958 "AntiKt4EMTopoJets",
959 "egammaClusters",
960 "ElectronRingSets",
961 "ElectronCaloRings",
962 "JetRingSets",
963 "JetCaloRings",
964 "SlowMuons",
965 #"LCOriginTopoClusters",
966 "EMOriginTopoClusters",
967 "Staus",
968 "METAssoc_AntiKt4EMTopo",
969 "MET_Core_AntiKt4EMTopo",
970 "METAssoc_AntiKt4EMPFlow",
971 "MET_Core_AntiKt4EMPFlow",
972 "InDetLowPtRoITrackParticles",
973 "PixelClusters",
974 "PixelMSOSs",
975 "DisappearingPixelMSOSs",
976 "LowPtRoIPixelMSOSs",
977 "SCT_Clusters",
978 "SCT_MSOSs",
979 "DisappearingSCT_MSOSs",
980 "LowPtRoISCT_MSOSs",
981 "LVL1MuonRoIs",
982 "NCB_MuonSegments"
983 ]
984
985
986 excludedVertexAuxData = "-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
987 StaticContent = []
988 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
989 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
990 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
991 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
992 StaticContent += ["xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
993 StaticContent += ["xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
994 StaticContent += ["xAOD::JetContainer#AntiKt10EMTopoRCJets","xAOD::JetAuxContainer#AntiKt10EMTopoRCJetsAux.-PseudoJet"]
995
996 for wp in LLP1VrtSecInclusiveSuffixes:
997 StaticContent += ["xAOD::VertexContainer#VrtSecInclusive_SecondaryVertices" + wp]
998 StaticContent += ["xAOD::VertexAuxContainer#VrtSecInclusive_SecondaryVertices" + wp + "Aux."]
999
1000 for wp in LLP1NewVSISuffixes:
1001 StaticContent += ["xAOD::VertexContainer#NewVrtSecInclusive_SecondaryVertices" + wp]
1002 StaticContent += ["xAOD::VertexAuxContainer#NewVrtSecInclusive_SecondaryVertices" + wp + "Aux." + excludedVertexAuxData]
1003
1004 StaticContent += ["xAOD::VertexContainer#MuSAVertices"]
1005 StaticContent += ["xAOD::VertexAuxContainer#MuSAVerticesAux."]
1006 StaticContent += ["xAOD::TrackParticleContainer#MuSAExtrapolatedTrackParticles"]
1007 StaticContent += ["xAOD::TrackParticleAuxContainer#MuSAExtrapolatedTrackParticlesAux."]
1008
1009 if flags.Derivation.LLP.doMuSAValidation:
1010 StaticContent += ["xAOD::VertexContainer#JPsiMuSAVertices"]
1011 StaticContent += ["xAOD::VertexAuxContainer#JPsiMuSAVerticesAux."]
1012 StaticContent += ["xAOD::VertexContainer#JPsiVertices"]
1013 StaticContent += ["xAOD::VertexAuxContainer#JPsiVerticesAux."]
1014 StaticContent += ["xAOD::TrackParticleContainer#JPsiVerticesTracks"]
1015 StaticContent += ["xAOD::TrackParticleAuxContainer#JPsiVerticesTracksAux."]
1016 StaticContent += ["xAOD::TrackParticleContainer#JPsiMuSAExtrapolatedTrackParticles"]
1017 StaticContent += ["xAOD::TrackParticleAuxContainer#JPsiMuSAExtrapolatedTrackParticlesAux."]
1018 StaticContent += ["xAOD::VertexContainer#ValidationMuSAVertices"]
1019 StaticContent += ["xAOD::VertexAuxContainer#ValidationMuSAVerticesAux."]
1020 StaticContent += ["xAOD::TrackParticleContainer#ValidationMuSAExtrapolatedTrackParticles"]
1021 StaticContent += ["xAOD::TrackParticleAuxContainer#ValidationMuSAExtrapolatedTrackParticlesAux."]
1022
1023 LLP1SlimmingHelper.ExtraVariables += ["AntiKt10TruthTrimmedPtFrac5SmallR20Jets.Tau1_wta.Tau2_wta.Tau3_wta.D2.GhostBHadronsFinalCount",
1024 "Electrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1025 "LRTElectrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1026 "Photons.DFCommonPhotonsIsEMMedium.DFCommonPhotonsIsEMMediumIsEMValue.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1027 "Muons.meanDeltaADCCountsMDT",
1028 "egammaClusters.phi_sampl.eta0.phi0",
1029 "LRTegammaClusters.phi_sampl.eta0.phi0",
1030 "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",
1031 "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",
1032 "TruthPrimaryVertices.t.x.y.z.sumPt2",
1033 "PrimaryVertices.t.x.y.z.sumPt2.covariance",
1034 "InDetTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1035 "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
1036 "InDetTrackParticles.numberOfIBLOverflowsdEdx.numberOfUsedHitsdEdx.pixeldEdx",
1037 "InDetTrackParticles.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfNextToInnermostPixelLayerHits.numberOfContribPixelLayers.numberOfGangedFlaggedFakes.numberOfPixelOutliers.numberOfPixelSplitHits.numberOfPixelSpoiltHits",
1038 "InDetTrackParticles.numberOfSCTOutliers.numberOfSCTSpoiltHits",
1039 "InDetTrackParticles.numberOfTRTHoles.numberOfTRTDeadStraws.numberOfTRTSharedHits.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdHitsTotal.numberOfTRTHighThresholdOutliers.TRTdEdx.TRTdEdxUsedHits.hitPattern",
1040 "InDetTrackParticles.truthMatchProbability.truthOrigin.truthType",
1041 "InDetTrackParticles.TrkIsoPtPdEdx_ptcone20.TrkIsoPtPdEdx_ptcone30.TrkIsoPtPdEdx_ptcone40.TrkIsoPtTightPdEdx_ptcone20.TrkIsoPtTightPdEdx_ptcone30.TrkIsoPtTightPdEdx_ptcone40",
1042 "InDetTrackParticles.LLP1_ptcone20.LLP1_ptcone30.LLP1_ptcone40.LLP1_ptvarcone20.LLP1_ptvarcone30.LLP1_ptvarcone40.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag",
1043 "InDetTrackParticles.LLP1_topoetcone20.LLP1_topoetcone30.LLP1_topoetcone40.LLP1_topoetcone20NonCoreCone.LLP1_topoetcone30NonCoreCone.LLP1_topoetcone40NonCoreCone",
1044 "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",
1045 "InDetTrackParticles.Reco_msosLink",
1046
1047 "InDetLargeD0TrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1048 "GSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthOrigin.truthType",
1049 "LRTGSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthOrigin.truthType",
1050 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1051 "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ",
1052 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1053 "EventInfo.DFCommonJets_eventClean_SuperLooseBadLLP.DFCommonJets_eventClean_SuperLooseBadLLP_EMTopo.DFCommonJets_eventClean_LooseBadLLP_EMTopo",
1054 "TauJets.dRmax.etOverPtLeadTrk.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
1055 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
1056 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
1057
1058 # Isolation close by correction content for the LRT included corrections
1059 LLP1SlimmingHelper.ExtraVariables += ["Muons.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1060 "MuonsLRT.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1061 "Electrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1062 "LRTElectrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1063 "Photons.topoetcone20_CloseByCorr_LRT.topoetcone40_CloseByCorr_LRT.ptcone20_CloseByCorr_LRT"
1064 ]
1065
1066 VSITrackAuxVars = [
1067 "is_selected", "is_associated", "is_svtrk_final", "pt_wrtSV", "eta_wrtSV",
1068 "phi_wrtSV", "d0_wrtSV", "z0_wrtSV", "errP_wrtSV", "errd0_wrtSV",
1069 "errz0_wrtSV", "chi2_toSV"
1070 ]
1071
1072 for suffix in LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes:
1073 LLP1SlimmingHelper.ExtraVariables += [ "InDetTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1074 LLP1SlimmingHelper.ExtraVariables += [ "InDetLargeD0TrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1075 LLP1SlimmingHelper.ExtraVariables += [ "GSFTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1076 LLP1SlimmingHelper.ExtraVariables += [ "LRTGSFTrackParticles." + '.'.join( [ var + suffix for var in VSITrackAuxVars] ) ]
1077
1078 LLP1SlimmingHelper.ExtraVariables.append('CaloCalTopoClusters.e_samplCaloCalTopoClusters.e_sampl.calM.calE.calEta.calPhi.CENTER_MAG.SECOND_TIME.time.CENTER_LAMBDA.rawE.rawM.rawPhi.rawEta.clusterSize.eta0.phi0.altE.altEta.altPhi.altM.AVG_LAR_Q.AVG_TILE_Q.BADLARQ_FRAC.EM_PROBABILITY.ENG_BAD_CELLS.ENG_POS.ISOLATION.N_BAD_CELLS.SECOND_LAMBDA.SECOND_R')
1079 LLP1SlimmingHelper.AppendToDictionary["EMOriginTopoClusters"]='xAOD::CaloClusterContainer'
1080 LLP1SlimmingHelper.AppendToDictionary["EMOriginTopoClustersAux"]='xAOD::ShallowAuxContainer'
1081 LLP1SlimmingHelper.ExtraVariables.append('EMOriginTopoClusters.e_sampl.calM.calE.calEta.calPhi.CENTER_MAG.SECOND_TIME.time.CENTER_LAMBDA.rawE.rawM.rawPhi.rawEta.clusterSize.eta0.phi0.altE.altEta.altPhi.altM.AVG_LAR_Q.AVG_TILE_Q.BADLARQ_FRAC.EM_PROBABILITY.ENG_BAD_CELLS.ENG_POS.ISOLATION.N_BAD_CELLS.SECOND_LAMBDA.SECOND_R')
1082
1083
1084 # Truth containers
1085 if flags.Input.isMC:
1086
1087 from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
1088 addTruth3ContentToSlimmerTool(LLP1SlimmingHelper)
1089 LLP1SlimmingHelper.AllVariables += ['TruthHFWithDecayParticles','TruthHFWithDecayVertices','TruthCharm','TruthPileupParticles','InTimeAntiKt4TruthJets','OutOfTimeAntiKt4TruthJets', 'AntiKt4TruthJets']
1090 LLP1SlimmingHelper.ExtraVariables += ["Electrons.TruthLink",
1091 "LRTElectrons.TruthLink",
1092 "Muons.TruthLink",
1093 "MuonsLRT.TruthLink",
1094 "Photons.TruthLink"]
1095
1096 if flags.Derivation.LLP.saveFullTruth:
1097 LLP1SlimmingHelper.ExtraVariables += ['TruthParticles', 'TruthVertices']
1098 StaticContent += ["xAOD::JetContainer#AntiKt10TruthRCJets","xAOD::JetAuxContainer#AntiKt10TruthRCJetsAux.-PseudoJet"]
1099
1100 # ZeroPixelHitMuons container
1101 StaticContent += ["xAOD::MuonContainer#ZeroPixelHitMuons", "xAOD::MuonAuxContainer#ZeroPixelHitMuonsAux."]
1102
1103 from DerivationFrameworkEGamma.PhotonsCPDetailedContent import (
1104 PhotonsCPDetailedContent,
1105 )
1106 LLP1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
1107
1108
1109 from DerivationFrameworkJetEtMiss.JetCommonConfig import addOriginCorrectedClustersToSlimmingTool
1110 addOriginCorrectedClustersToSlimmingTool(LLP1SlimmingHelper,writeLC=True,writeEM=True)
1111 LLP1SlimmingHelper.StaticContent = StaticContent
1112
1113 # Trigger content
1114 LLP1SlimmingHelper.IncludeTriggerNavigation = False
1115 LLP1SlimmingHelper.IncludeJetTriggerContent = False
1116 LLP1SlimmingHelper.IncludeMuonTriggerContent = False
1117 LLP1SlimmingHelper.IncludeEGammaTriggerContent = False
1118 LLP1SlimmingHelper.IncludeTauTriggerContent = False
1119 LLP1SlimmingHelper.IncludeEtMissTriggerContent = False
1120 LLP1SlimmingHelper.IncludeBJetTriggerContent = False
1121 LLP1SlimmingHelper.IncludeBPhysTriggerContent = False
1122 LLP1SlimmingHelper.IncludeMinBiasTriggerContent = False
1123
1124 # Trigger matching
1125 # Run 2
1126 if flags.Trigger.EDMVersion == 2:
1127 from DerivationFrameworkPhys.TriggerMatchingCommonConfig import AddRun2TriggerMatchingToSlimmingHelper
1128 from DerivationFrameworkLLP.LLPToolsConfig import LLP1TriggerMatchingToolRun2Cfg
1129 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1130 OutputContainerPrefix = "TrigMatch_",
1131 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesTau)
1132 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1133 OutputContainerPrefix = "TrigMatch_",
1134 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau)
1135 # Schedule additional pre-matching against LLP offline muons and electrons
1136 acc.merge(LLP1TriggerMatchingToolRun2Cfg(flags,
1137 name = "LRTTriggerMatchingTool_LLP1",
1138 OutputContainerPrefix = "LRTTrigMatch_LLP1_",
1139 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1140 InputElectrons=MergedElectronContainer,
1141 InputMuons=MergedMuonContainer_wZPH
1142 ))
1143 # And add the additional LLP trigger matching branches to the slimming helper
1144 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1145 OutputContainerPrefix = "LRTTrigMatch_LLP1_",
1146 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1147 InputElectrons=MergedElectronContainer,
1148 InputMuons=MergedMuonContainer_wZPH
1149 )
1150 # Run 3, or Run 2 with navigation conversion
1151 if flags.Trigger.EDMVersion == 3 or (flags.Trigger.EDMVersion == 2 and flags.Trigger.doEDMVersionConversion):
1152 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
1153 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(LLP1SlimmingHelper)
1154
1155 # Output stream
1156 LLP1ItemList = LLP1SlimmingHelper.GetItemList()
1157 acc.merge(OutputStreamCfg(flags, "DAOD_LLP1", ItemList=LLP1ItemList, AcceptAlgs=["LLP1Kernel"]))
1158 acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_LLP1", AcceptAlgs=["LLP1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
1159
1160 return acc
LLP1Cfg(flags)
Definition LLP1.py:884
LLP1KernelCfg(flags, name='LLP1Kernel', **kwargs)
Definition LLP1.py:24