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