20 """Configure the derivation framework driving algorithm (kernel) for LLP1"""
21 acc = ComponentAccumulator()
26 MergedElectronContainer =
"Electrons"
27 MergedGSFTrackCollection =
"GSFTrackParticles"
28 MergedMuonContainer =
"Muons"
29 MergedTrackCollection =
"InDetTrackParticles"
30 MergedTrackletCollection =
"InDetDisappearingTrackParticles"
32 if flags.Tracking.doLargeD0:
33 MergedTrackCollection =
"InDetWithLRTTrackParticles"
34 from DerivationFrameworkInDet.InDetToolsConfig
import InDetLRTMergeCfg
35 acc.merge(InDetLRTMergeCfg(flags))
37 MergedGSFTrackCollection =
"InDetWithLRTGSFTrackParticles"
38 acc.merge(InDetLRTMergeCfg(
39 flags, name=
"GSFTrackMergerAlg",
40 InputTrackParticleLocations = [
"GSFTrackParticles",
41 "LRTGSFTrackParticles"],
42 OutputTrackParticleLocation = MergedGSFTrackCollection,
43 OutputTrackParticleLocationCopy = MergedGSFTrackCollection))
45 if flags.Tracking.doTrackSegmentsDisappearing:
46 MergedTrackletCollection =
"InDetDisappearingWithLRTTrackParticles"
47 acc.merge(InDetLRTMergeCfg(
48 flags, name=
"InDetDisappearingLRTMerge",
49 InputTrackParticleLocations = [
"InDetDisappearingTrackParticles",
50 "InDetLargeD0TrackParticles"],
51 OutputTrackParticleLocation = MergedTrackletCollection))
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))
64 MergedElectronContainer =
"StdWithLRTElectrons"
65 from DerivationFrameworkLLP.LLPToolsConfig
import LRTElectronMergerAlg
66 acc.merge(LRTElectronMergerAlg(flags,
67 PromptElectronLocation =
"Electrons",
68 LRTElectronLocation =
"LRTElectrons",
69 OutputCollectionName = MergedElectronContainer,
71 CreateViewCollection =
True))
75 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig
import (
76 MaxCellDecoratorCfg, MaxCellDecoratorKernelCfg)
79 acc.merge(MaxCellDecoratorKernelCfg(flags))
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"),
89 acc.addPublicTool(LLP1LRTMaxCellDecoratorTool)
92 if flags.Tracking.doTrackSegmentsDisappearing:
93 from DerivationFrameworkLLP.LLPToolsConfig
import TrackParametersKVUCfg
94 LLP1TrackParametersKVUTool = acc.popToolsAndMerge(TrackParametersKVUCfg(
95 flags, name =
"LLP1TrackParametersKVU"))
96 acc.addPublicTool(LLP1TrackParametersKVUTool)
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_'
105 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig
import (
106 InDetTrackSelectionTool_Loose_Cfg)
107 TrackSelectionToolStd = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
108 name =
"TrackSelectionToolStd",
112 TrackSelectionToolPdEdx = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
113 name =
"TrackSelectionToolPdEdx",
118 TrackSelectionToolPdEdxTight = acc.popToolsAndMerge(InDetTrackSelectionTool_Loose_Cfg(flags,
119 name =
"TrackSelectionToolPdEdxTight",
124 from IsolationAlgs.IsoToolsConfig
import TrackIsolationToolCfg, CaloIsolationToolCfg
125 TrackIsoToolStd = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
126 name =
"TrackIsoToolStd",
127 TrackSelectionTool = TrackSelectionToolStd))
128 acc.addPublicTool(TrackIsoToolStd)
130 TrackIsoToolPdEdx = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
131 name =
"TrackIsoToolPdEdx",
132 TrackSelectionTool = TrackSelectionToolPdEdx))
133 acc.addPublicTool(TrackIsoToolPdEdx)
135 TrackIsoToolPdEdxTight = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
136 name =
"TrackIsoToolPdEdxTight",
137 TrackSelectionTool = TrackSelectionToolPdEdxTight))
138 acc.addPublicTool(TrackIsoToolPdEdxTight)
140 from CaloIdentifier
import SUBCALO
141 CaloIsoTool = acc.popToolsAndMerge(CaloIsolationToolCfg(flags,
142 name =
"CaloIsoTool",
143 EMCaloNums = [SUBCALO.LAREM],
144 HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
146 UseCaloExtensionCaching =
False,
147 saveOnlyRequestedCorrections =
True))
148 acc.addPublicTool(CaloIsoTool)
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)
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)
179 LLP1IsolationTrackDecoratorPdEdxTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
180 name =
"LLP1IsolationTrackDecoratorPdEdx",
181 TrackIsolationTool = TrackIsoToolPdEdx,
182 CaloIsolationTool = CaloIsoTool,
183 TargetContainer =
"InDetTrackParticles",
185 Prefix =
'TrkIsoPtPdEdx_',
186 isoSuffix = deco_ptcones_suffix))
187 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTool)
189 if flags.Tracking.doTrackSegmentsDisappearing:
190 LLP1IsolationTrackDecoratorPdEdxDTTool = acc.getPrimaryAndMerge(
191 IsolationTrackDecoratorCfg(
192 flags, name =
"LLP1IsolationTrackDecoratorPdEdxDT",
193 TrackIsolationTool = TrackIsoToolPdEdx,
194 CaloIsolationTool = CaloIsoTool,
195 TargetContainer =
"InDetDisappearingTrackParticles",
197 Prefix =
'TrkIsoPtPdEdx_',
198 isoSuffix = deco_ptcones_suffix))
199 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxDTTool)
201 LLP1IsolationTrackDecoratorPdEdxTightTool = acc.getPrimaryAndMerge(IsolationTrackDecoratorCfg(flags,
202 name =
"LLP1IsolationTrackDecoratorPdEdxTight",
203 TrackIsolationTool = TrackIsoToolPdEdxTight,
204 CaloIsolationTool = CaloIsoTool,
205 TargetContainer =
"InDetTrackParticles",
207 Prefix =
'TrkIsoPtTightPdEdx_',
208 isoSuffix = deco_ptcones_suffix))
209 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTightTool)
211 if flags.Tracking.doTrackSegmentsDisappearing:
212 LLP1IsolationTrackDecoratorPdEdxTightDTTool = acc.getPrimaryAndMerge(
213 IsolationTrackDecoratorCfg(
214 flags, name =
"LLP1IsolationTrackDecoratorPdEdxTightDT",
215 TrackIsolationTool = TrackIsoToolPdEdxTight,
216 CaloIsolationTool = CaloIsoTool,
217 TargetContainer =
"InDetDisappearingTrackParticles",
219 Prefix =
'TrkIsoPtTightPdEdx_',
220 isoSuffix = deco_ptcones_suffix))
221 acc.addPublicTool(LLP1IsolationTrackDecoratorPdEdxTightDTTool)
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)
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 ]
243 LLP1TauMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
245 name =
"LLP1TauMaxCellDecoratorTool",
246 SGKey_taus =
'TauJets',
247 SGKey_electrons =
'',
249 acc.addPublicTool(LLP1TauMaxCellDecoratorTool)
251 augmentationTools += [ LLP1TauMaxCellDecoratorTool ]
254 LLP1AntiKt4EMTopoJetMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
256 name =
"LLP1AntiKt4EMTopoJetMaxCellDecoratorTool",
257 SGKey_jets =
'AntiKt4EMTopoJets',
259 SGKey_electrons =
'',
261 acc.addPublicTool(LLP1AntiKt4EMTopoJetMaxCellDecoratorTool)
263 augmentationTools += [ LLP1AntiKt4EMTopoJetMaxCellDecoratorTool ]
266 LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool = acc.popToolsAndMerge(MaxCellDecoratorCfg(
268 name =
"LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool",
269 SGKey_jets =
'AntiKt4EMPFlowJets',
271 SGKey_electrons =
'',
273 acc.addPublicTool(LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool)
275 augmentationTools += [ LLP1AntiKt4EMPFlowJetMaxCellDecoratorTool ]
278 from JetRecConfig.JetRecConfig
import registerAsInputConstit, JetRecCfg
279 from JetRecConfig.StandardSmallRJets
import AntiKt4Truth, AntiKt4EMTopo
280 from JetRecConfig.JetDefinition
import JetDefinition
281 from JetRecConfig.StandardJetConstits
import stdConstitDic
as cst
283 registerAsInputConstit(AntiKt4EMTopo)
284 registerAsInputConstit(AntiKt4Truth)
285 cst.AntiKt4EMTopoJets.label =
"EMTopoRC"
286 cst.AntiKt4TruthJets.label =
"TruthRC"
288 AntiKt10RCEMTopo = JetDefinition(
"AntiKt",1.0,cst.AntiKt4EMTopoJets,
289 ghostdefs = [
"Track",
"TrackLRT",
"LCTopoOrigin"],
290 modifiers = (
"Sort",
"Filter:200000",),
291 standardRecoMode =
True,
295 AntiKt10RCTruth = JetDefinition(
"AntiKt",1.0,cst.AntiKt4TruthJets,
297 modifiers = (
"Sort",
"Filter:200000",),
298 standardRecoMode =
True,
302 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
303 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs[
'TriggerListsHelper']))
304 acc.merge(JetRecCfg(flags,AntiKt10RCEMTopo))
305 if flags.Input.isMC: acc.merge(JetRecCfg(flags,AntiKt10RCTruth))
307 if flags.Tracking.doLargeD0:
309 from DerivationFrameworkJetEtMiss.METCommonConfig
import METLRTCfg
310 acc.merge(METLRTCfg(flags,
"AntiKt4EMTopo"))
311 acc.merge(METLRTCfg(flags,
"AntiKt4EMPFlow"))
314 from DerivationFrameworkEGamma.EGammaLRTConfig
import EGammaLRTCfg
315 acc.merge(EGammaLRTCfg(flags))
317 from DerivationFrameworkLLP.LLPToolsConfig
import LRTElectronLHSelectorsCfg
318 acc.merge(LRTElectronLHSelectorsCfg(flags))
321 from DerivationFrameworkMuons.MuonsCommonConfig
import MuonsCommonCfg
322 acc.merge(MuonsCommonCfg(flags, suff=
"LRT"))
325 from DerivationFrameworkLLP.LLPToolsConfig
import PhotonIsEMSelectorsCfg
326 acc.merge(PhotonIsEMSelectorsCfg(flags))
329 from DerivationFrameworkLLP.LLPToolsConfig
import RecoverZeroPixelHitMuonsCfg
330 acc.merge(RecoverZeroPixelHitMuonsCfg(flags))
333 from BTagging.FlavorTaggingConfig
import FlavorTaggingCfg
334 acc.merge(FlavorTaggingCfg(flags,
'AntiKt4EMTopoJets'))
337 from VrtSecInclusive.VrtSecInclusiveConfig
import VrtSecInclusiveCfg
340 from MuSAVtxFitter.MuSAVtxFitterConfig
import MuSAVtxFitterConfig, MuSAVtxJPsiValidationAlgCfg, MuSAVtxFitterValidationConfig
342 acc.merge(VrtSecInclusiveCfg(flags,
343 name =
"VrtSecInclusive",
344 AugmentingVersionString =
"",
345 FillIntermediateVertices =
False,
346 TrackLocation = MergedTrackCollection))
347 LLP1VrtSecInclusiveSuffixes.append(
"")
350 shortLifetimeSuffix =
"_shortLifetime"
351 acc.merge(VrtSecInclusiveCfg(flags,
352 name =
"VrtSecInclusive_InDet"+shortLifetimeSuffix,
353 AugmentingVersionString = shortLifetimeSuffix,
354 FillIntermediateVertices =
False,
355 TrackLocation = MergedTrackCollection,
356 twoTrkVtxFormingD0Cut = 1.0))
357 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeSuffix)
360 shortLifetimeNod0Suffix =
"_shortLifetime_nod0"
361 acc.merge(VrtSecInclusiveCfg(flags,
362 name =
"VrtSecInclusive_InDet"+shortLifetimeNod0Suffix,
363 AugmentingVersionString = shortLifetimeNod0Suffix,
364 FillIntermediateVertices =
False,
365 TrackLocation = MergedTrackCollection,
366 twoTrkVtxFormingD0Cut = 0))
367 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeNod0Suffix)
370 if flags.Tracking.doTrackSegmentsDisappearing:
371 dissapearingSuffix =
"_disappearing"
372 acc.merge(VrtSecInclusiveCfg(
373 flags, name =
"VrtSecInclusive_"+dissapearingSuffix,
374 AugmentingVersionString = dissapearingSuffix,
375 FillIntermediateVertices =
False,
376 TrackLocation = MergedTrackletCollection,
377 doReassembleVertices =
True,
378 doMergeByShuffling =
False,
379 doMergeFinalVerticesDistance=
False,
380 doAssociateNonSelectedTracks=
False,
381 DoPVcompatibility =
True,
382 RemoveFake2TrkVrt =
False,
383 PassThroughTrackSelection =
True,
384 TruncateListOfWorkingVertices =
False,
385 twoTrkVtxFormingD0Cut = 0.0,
386 SelVrtChi2Cut = 1000000.0,
387 twoTrVrtMaxPerigeeDist = 50.0,
388 twoTrVrtMinRadius = 50.0,
389 doDisappearingTrackVertexing=
True))
390 LLP1VrtSecInclusiveSuffixes.append(dissapearingSuffix)
392 if flags.Input.isMC
and flags.Derivation.LLP.doTrackSystematics:
393 from InDetTrackSystematicsTools.InDetTrackSystematicsToolsConfig
import TrackSystematicsAlgCfg
394 TrackSystSuffix =
"_TRK_EFF_LARGED0_GLOBAL__1down"
395 acc.merge(TrackSystematicsAlgCfg(
397 name=f
"InDetTrackSystematicsAlg{TrackSystSuffix}",
398 InputTrackContainer = MergedTrackCollection,
399 OutputTrackContainer = f
"{MergedTrackCollection}{TrackSystSuffix}"))
400 acc.merge(VrtSecInclusiveCfg(flags,
401 name = f
"VrtSecInclusive{TrackSystSuffix}",
402 AugmentingVersionString = TrackSystSuffix,
403 FillIntermediateVertices =
False,
404 TrackLocation = f
"{MergedTrackCollection}{TrackSystSuffix}"))
405 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffix)
407 TrackSystSuffixShortLifetime =
"_TRK_EFF_LARGED0_GLOBAL__1down_shortLifetime"
408 acc.merge(TrackSystematicsAlgCfg(
410 name=f
"InDetTrackSystematicsAlg{TrackSystSuffixShortLifetime}",
411 InputTrackContainer = MergedTrackCollection,
412 OutputTrackContainer = f
"{MergedTrackCollection}{TrackSystSuffixShortLifetime}"))
413 acc.merge(VrtSecInclusiveCfg(flags,
414 name = f
"VrtSecInclusive{TrackSystSuffixShortLifetime}",
415 AugmentingVersionString = TrackSystSuffixShortLifetime,
416 FillIntermediateVertices =
False,
417 TrackLocation = f
"{MergedTrackCollection}{TrackSystSuffixShortLifetime}",
418 twoTrkVtxFormingD0Cut = 1.0))
419 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffixShortLifetime)
422 MergedMuonContainer_wZPH = (
423 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0
else "Muons_wZPH")
424 from DerivationFrameworkLLP.LLPToolsConfig
import ZeroPixelHitMuonMergerAlgCfg
425 acc.merge(ZeroPixelHitMuonMergerAlgCfg(flags,
426 InputMuonContainers = [MergedMuonContainer,
"ZeroPixelHitMuons"],
427 OutputMuonLocation = MergedMuonContainer_wZPH))
431 LeptonsSuffix =
"_Leptons"
432 acc.merge(VrtSecInclusiveCfg(flags,
433 name =
"VrtSecInclusive_InDet"+LeptonsSuffix,
434 AugmentingVersionString = LeptonsSuffix,
435 FillIntermediateVertices =
False,
436 TrackLocation = MergedTrackCollection,
437 twoTrkVtxFormingD0Cut = 1.0,
438 doSelectTracksFromMuons =
True,
439 doRemoveCaloTaggedMuons =
True,
440 doSelectTracksFromElectrons =
True,
441 MuonLocation = MergedMuonContainer,
442 ElectronLocation = MergedElectronContainer))
443 LLP1VrtSecInclusiveSuffixes.append(LeptonsSuffix)
446 LepTrackSuffix =
"_LepTrack"
447 acc.merge(VrtSecInclusiveCfg(flags,
448 name =
"VrtSecInclusive_InDet"+LepTrackSuffix,
449 AugmentingVersionString = LepTrackSuffix,
450 FillIntermediateVertices =
False,
451 TrackLocation = MergedTrackCollection,
452 MuonLocation = MergedMuonContainer,
453 ElectronLocation = MergedElectronContainer,
454 twoTrkVtxFormingD0Cut = 1.0,
455 doSelectIDAndGSFTracks =
True,
456 doRemoveCaloTaggedMuons =
True,
457 doRemoveNonLeptonVertices =
True,
458 doAssociateNonSelectedTracks=
False))
459 LLP1VrtSecInclusiveSuffixes.append(LepTrackSuffix)
462 BoostedMuonsSuffix =
"_BoostedMuons"
463 acc.merge(VrtSecInclusiveCfg(flags,
464 name =
"VrtSecInclusive_InDet"+BoostedMuonsSuffix,
465 AugmentingVersionString = BoostedMuonsSuffix,
466 FillIntermediateVertices =
False,
467 TrackLocation = MergedTrackCollection,
468 twoTrkVtxFormingD0Cut = 0.0,
469 doSelectTracksFromMuons =
True,
470 doRemoveCaloTaggedMuons =
True,
471 doSelectTracksFromElectrons =
False,
472 MuonLocation = MergedMuonContainer_wZPH,
473 do_PVvetoCut =
False,
474 DoTwoTrSoftBtag =
True,
475 TwoTrVrtMinDistFromPVCut = 0.5,
476 associatePtCut = 500.))
477 LLP1VrtSecInclusiveSuffixes.append(BoostedMuonsSuffix)
481 BoostedElectronsSuffix =
"_BoostedElectrons"
482 acc.merge(VrtSecInclusiveCfg(flags,
483 name =
"VrtSecInclusive_InDet"+BoostedElectronsSuffix,
484 AugmentingVersionString = BoostedElectronsSuffix,
485 FillIntermediateVertices =
False,
486 TrackLocation = MergedTrackCollection,
487 twoTrkVtxFormingD0Cut = 0.0,
488 doSelectTracksFromMuons =
False,
489 doSelectTracksFromElectrons =
True,
490 ElectronLocation = MergedElectronContainer,
491 do_PVvetoCut =
False,
492 DoTwoTrSoftBtag =
True,
493 TwoTrVrtMinDistFromPVCut = 0.5,
494 associatePtCut = 500.))
495 LLP1VrtSecInclusiveSuffixes.append(BoostedElectronsSuffix)
500 MuonContainerName=MergedMuonContainer))
502 if flags.Derivation.LLP.doMuSAValidation:
504 acc.merge(MuSAVtxJPsiValidationAlgCfg(flags,
505 MuonContainer=MergedMuonContainer,
506 JPsiMuonContainer=
"JPsiMuons"))
509 acc.merge(MuSAVtxFitterValidationConfig(flags,
510 name=
"MuSAVtxFitterValidationJPsi",
511 MuonContainerName=
"JPsiMuons"))
513 acc.merge(MuSAVtxFitterValidationConfig(flags,
514 MuonContainerName=MergedMuonContainer,
515 MuSAVtxContainerName=
"ValidationMuSAVertices",
516 MuSAExtrapolatedTracksName=
"ValidationMuSAExtrapolatedTrackParticles",
517 MSTPContainerName=
"MuonSpectrometerTrackParticles"))
521 from NewVrtSecInclusiveTool.NewVrtSecInclusiveAlgConfig
import NewVrtSecInclusiveAlgLLPCfg
522 from NewVrtSecInclusiveTool.NewVrtSecInclusiveConfig
import DVFinderToolCfg
523 IDAndGSFSuffix =
"_IDAndGSF_LepTrack"
525 NVSILepTrack_Tool = acc.popToolsAndMerge(DVFinderToolCfg(flags,FillHist=
False,AugmentingVersionString=IDAndGSFSuffix,MaxZVrt=1000.,AntiPileupSigRCut=2.))
526 acc.merge(NewVrtSecInclusiveAlgLLPCfg(flags,
527 algname =
"NVSI"+IDAndGSFSuffix,
528 AugmentingVersionString = IDAndGSFSuffix,
529 ElectronContainer = MergedElectronContainer,
530 MuonContainer = MergedMuonContainer,
531 TrackParticleContainer = MergedTrackCollection,
532 GSFTrackParticleContainer = MergedGSFTrackCollection,
533 BVertexContainerName =
"NewVrtSecInclusive_SecondaryVertices"+IDAndGSFSuffix,
536 RemoveNonLepVertices =
True,
537 BVertexTool = NVSILepTrack_Tool))
538 LLP1NewVSISuffixes.append(IDAndGSFSuffix)
541 jet_clean_prefix=
"DFCommonJets_"
542 jet_clean_container=
"AntiKt4EMTopoJets"
543 jet_clean_level=
"SuperLooseBadLLP"
544 from JetSelectorTools.JetSelectorToolsConfig
import EventCleaningToolCfg, JetCleaningToolCfg
545 LLP1JetCleanSuperLLPTool = acc.popToolsAndMerge(JetCleaningToolCfg(flags,
546 "LLP1JetCleanSuperLLP",
550 acc.addPublicTool(LLP1JetCleanSuperLLPTool)
552 LLP1EventCleanSuperLLPTool = acc.popToolsAndMerge(EventCleaningToolCfg(flags,
553 "LLP1EventCleanSuperLLP",
555 LLP1EventCleanSuperLLPTool.JetCleanPrefix = jet_clean_prefix
556 LLP1EventCleanSuperLLPTool.OrDecorator =
"passOR_EMTopo"
557 LLP1EventCleanSuperLLPTool.JetContainer = jet_clean_container
558 LLP1EventCleanSuperLLPTool.JetCleaningTool = LLP1JetCleanSuperLLPTool
559 acc.addPublicTool(LLP1EventCleanSuperLLPTool)
561 LLP1EventCleanAlg = CompFactory.EventCleaningTestAlg(
562 "LLP1JetCleanDecoratorSuperLLP",
563 EventCleaningTool = LLP1EventCleanSuperLLPTool,
564 JetCollectionName = jet_clean_container,
565 EventCleanPrefix = jet_clean_prefix,
566 CleaningLevel = jet_clean_level,
571 acc.addSequence(CompFactory.AthSequencer(
'EventCleanSeq', Sequential=
True))
572 acc.addEventAlgo(LLP1EventCleanAlg,
'EventCleanSeq')
576 from DerivationFrameworkLLP.LLPToolsConfig
import AugmentationToolLeadingJetsCfg
577 augmentationToolLeadingJets = acc.getPrimaryAndMerge(AugmentationToolLeadingJetsCfg(flags))
578 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, AugmentationTools = [augmentationToolLeadingJets]))
581 from DerivationFrameworkInDet.InDetToolsConfig
import TrackParticleThinningCfg, EgammaTrackParticleThinningCfg, MuonTrackParticleThinningCfg, TauTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
582 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import GenericObjectThinningCfg
583 from DerivationFrameworkTau.TauCommonConfig
import TauThinningCfg
586 LLP1TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
588 name =
"LLP1TrackParticleThinningTool",
589 StreamName = kwargs[
'StreamName'],
590 SelectionString =
"InDetTrackParticles.pt>10*GeV",
591 InDetTrackParticlesKey =
"InDetTrackParticles"))
594 if flags.Tracking.doLargeD0:
595 LLP1LRTGSFTrackParticleThinningTool = acc.getPrimaryAndMerge(
596 TrackParticleThinningCfg(
597 flags, name =
"LLP1LRTGSFTrackParticleThinningTool",
598 StreamName = kwargs[
'StreamName'],
599 SelectionString =
"LRTGSFTrackParticles.pt>0*GeV",
600 InDetTrackParticlesKey =
"LRTGSFTrackParticles"))
603 if flags.Tracking.doTrackSegmentsDisappearing:
604 LLP1DTTrackParticleThinningTool = acc.getPrimaryAndMerge(
605 TrackParticleThinningCfg(
606 flags, name =
"LLP1DTTrackParticleThinningTool",
607 StreamName = kwargs[
'StreamName'],
608 SelectionString =
"InDetDisappearingTrackParticles.pt>5*GeV",
609 InDetTrackParticlesKey =
"InDetDisappearingTrackParticles"))
612 LLP1ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
614 name =
"LLP1ElectronTPThinningTool",
615 StreamName = kwargs[
'StreamName'],
617 InDetTrackParticlesKey =
"InDetTrackParticles"))
620 if flags.Tracking.doLargeD0:
621 LLP1LRTElectronTPThinningTool = acc.getPrimaryAndMerge(
622 EgammaTrackParticleThinningCfg(
623 flags, name =
"LLP1LRTElectronTPThinningTool",
624 StreamName = kwargs[
'StreamName'],
625 SGKey =
"LRTElectrons",
626 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles",
627 GSFTrackParticlesKey =
"LRTGSFTrackParticles"))
630 LLP1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
632 name =
"LLP1MuonTPThinningTool",
633 StreamName = kwargs[
'StreamName'],
635 InDetTrackParticlesKey =
"InDetTrackParticles"))
638 if flags.Tracking.doLargeD0:
639 LLP1LRTMuonTPThinningTool = acc.getPrimaryAndMerge(
640 MuonTrackParticleThinningCfg(
641 flags, name =
"LLP1LRTMuonTPThinningTool",
642 StreamName = kwargs[
'StreamName'],
643 MuonKey =
"MuonsLRT",
644 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles"))
647 LLP1PhotonTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
649 name =
"LLP1PhotonTPThinningTool",
650 StreamName = kwargs[
'StreamName'],
652 InDetTrackParticlesKey =
"",
653 GSFConversionVerticesKey =
"GSFConversionVertices",
654 GSFTrackParticlesKey =
"GSFTrackParticles",
655 BestMatchOnly =
True,
656 BestVtxMatchOnly =
True))
659 tau_thinning_expression = f
"TauJets.pt >= {flags.Tau.MinPtDAOD}"
660 LLP1TauJetsThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
662 name =
"LLP1TauJetThinningTool",
663 StreamName = kwargs[
'StreamName'],
665 TauTracks =
"TauTracks",
666 TrackParticles =
"InDetTrackParticles",
667 TauNeutralPFOs =
"TauNeutralParticleFlowObjects",
668 TauSecondaryVertices =
"TauSecondaryVertices",
669 SelectionString = tau_thinning_expression))
672 LLP1TauTPThinningTool = acc.getPrimaryAndMerge(TauTrackParticleThinningCfg(
674 name =
"LLP1TauTPThinningTool",
675 StreamName = kwargs[
'StreamName'],
677 InDetTrackParticlesKey =
"InDetTrackParticles",
678 DoTauTracksThinning =
True,
679 TauTracksKey =
"TauTracks"))
681 tau_murm_thinning_expression = tau_thinning_expression.replace(
'TauJets',
'TauJets_MuonRM')
682 LLP1TauJetMuonRMParticleThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
684 name =
"LLP1TauJets_MuonRMThinningTool",
685 StreamName = kwargs[
'StreamName'],
686 Taus =
"TauJets_MuonRM",
687 TauTracks =
"TauTracks_MuonRM",
688 TrackParticles =
"InDetTrackParticles",
689 TauNeutralPFOs =
"TauNeutralParticleFlowObjects_MuonRM",
690 TauSecondaryVertices =
"TauSecondaryVertices_MuonRM",
691 SelectionString = tau_murm_thinning_expression))
694 LLP1DiTauTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
696 name =
"LLP1DiTauTPThinningTool",
697 StreamName = kwargs[
'StreamName'],
698 DiTauKey =
"DiTauJets",
699 InDetTrackParticlesKey =
"InDetTrackParticles"))
702 LLP1DiTauLowPtThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(
704 name =
"LLP1DiTauLowPtThinningTool",
705 StreamName = kwargs[
'StreamName'],
706 ContainerName =
"DiTauJetsLowPt",
707 SelectionString =
"DiTauJetsLowPt.nSubjets > 1"))
710 LLP1DiTauLowPtTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
712 name =
"LLP1DiTauLowPtTPThinningTool",
713 StreamName = kwargs[
'StreamName'],
714 DiTauKey =
"DiTauJetsLowPt",
715 InDetTrackParticlesKey =
"InDetTrackParticles",
716 SelectionString =
"DiTauJetsLowPt.nSubjets > 1"))
720 from DerivationFrameworkLLP.LLPToolsConfig
import VSITrackParticleThinningCfg
721 LLP1VSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
722 name =
"LLP1VSITPThinningTool",
723 StreamName = kwargs[
'StreamName'],
724 InDetTrackParticlesKey =
"InDetTrackParticles",
725 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
727 if flags.Tracking.doLargeD0:
728 LLP1LRTVSITPThinningTool = acc.getPrimaryAndMerge(
729 VSITrackParticleThinningCfg(
730 flags, name =
"LLP1LRTVSITPThinningTool",
731 StreamName = kwargs[
'StreamName'],
732 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles",
733 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
735 LLP1GSFVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
736 name =
"LLP1GSFVSITPThinningTool",
737 StreamName = kwargs[
'StreamName'],
738 InDetTrackParticlesKey =
"GSFTrackParticles",
739 AugVerStrings = [IDAndGSFSuffix]))
742 from DerivationFrameworkLLP.LLPToolsConfig
import JetTrackParticleThinningCfg, JetLargeD0TrackParticleThinningCfg
743 LLP1JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(flags,
744 name =
"LLP1JetTPThinningTool",
745 StreamName = kwargs[
'StreamName'],
746 JetKey =
"AntiKt4EMTopoJets",
747 SelectionString =
"(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
748 InDetTrackParticlesKey =
"InDetTrackParticles"))
750 LLP1FatJetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg( flags,
751 name =
"LLP1FatJetTPThinningTool",
752 StreamName = kwargs[
'StreamName'],
753 JetKey =
"AntiKt10EMTopoRCJets",
754 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
755 InDetTrackParticlesKey =
"InDetTrackParticles",
759 if flags.Tracking.doLargeD0:
760 LLP1LRTJetTPThinningTool = acc.getPrimaryAndMerge(
761 JetLargeD0TrackParticleThinningCfg(
762 flags, name =
"LLP1LRTJetTPThinningTool",
763 StreamName = kwargs[
'StreamName'],
764 JetKey =
"AntiKt4EMTopoJets",
765 SelectionString =
"(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
766 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles"))
768 LLP1LRTFatJetTPThinningTool = acc.getPrimaryAndMerge(
769 JetLargeD0TrackParticleThinningCfg(
770 flags, name =
"LLP1LRTFatJetTPThinningTool",
771 StreamName = kwargs[
'StreamName'],
772 JetKey =
"AntiKt10EMTopoRCJets",
773 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
774 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles"))
777 from DerivationFrameworkLLP.LLPToolsConfig
import PixeldEdxTrackParticleThinningCfg
778 LLP1PixeldEdxTrackParticleThinningTool = acc.getPrimaryAndMerge(PixeldEdxTrackParticleThinningCfg(
780 name =
"LLP1PixeldEdxTrackParticleThinningTool",
781 StreamName = kwargs[
'StreamName'],
782 InDetTrackParticlesKey =
"InDetTrackParticles"))
786 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig
import JetCaloClusterThinningCfg
788 LLP1CCThinningTool = acc.getPrimaryAndMerge(JetCaloClusterThinningCfg(
791 StreamName = kwargs[
'StreamName'],
792 SGKey =
"AntiKt4EMTopoJets",
793 TopoClCollectionSGKey =
"CaloCalTopoClusters",
794 AdditionalClustersKey = [
"EMOriginTopoClusters",
"LCOriginTopoClusters"]
799 thinningTools = [LLP1TrackParticleThinningTool,
800 LLP1ElectronTPThinningTool,
801 LLP1MuonTPThinningTool,
802 LLP1PhotonTPThinningTool,
803 LLP1TauJetsThinningTool,
804 LLP1TauTPThinningTool,
805 LLP1TauJetMuonRMParticleThinningTool,
806 LLP1DiTauTPThinningTool,
807 LLP1DiTauLowPtThinningTool,
808 LLP1DiTauLowPtTPThinningTool,
809 LLP1VSITPThinningTool,
810 LLP1GSFVSITPThinningTool,
811 LLP1JetTPThinningTool,
812 LLP1FatJetTPThinningTool,
813 LLP1PixeldEdxTrackParticleThinningTool,
816 if flags.Tracking.doLargeD0:
817 thinningTools += [ LLP1LRTJetTPThinningTool,
818 LLP1LRTFatJetTPThinningTool,
819 LLP1LRTGSFTrackParticleThinningTool,
820 LLP1LRTElectronTPThinningTool,
821 LLP1LRTMuonTPThinningTool,
822 LLP1LRTVSITPThinningTool ]
824 if flags.Tracking.doTrackSegmentsDisappearing:
825 thinningTools += [ LLP1DTTrackParticleThinningTool ]
831 from DerivationFrameworkLLP.LLPToolsConfig
import RCJetSubstructureAugCfg
832 LLP1RCJetSubstructureClustTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
833 name =
"LLP1RCJetSubstructureClustTrimAugTool",
834 StreamName = kwargs[
'StreamName'],
835 JetContainerKey =
"AntiKt10EMTopoRCJets",
836 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
837 GhostConstitNames = [
"GhostLCTopoOrigin"],
838 Suffix =
"clusterTrim",
839 Grooming =
"Trimming",
843 RCSubstructureClusterTrimAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureClusterTrimAug", AugmentationTools = [LLP1RCJetSubstructureClustTrimAugTool])
844 acc.addEventAlgo(RCSubstructureClusterTrimAug)
846 LLP1RCJetSubstructureClustSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
847 name =
"LLP1RCJetSubstructureClustSDAugTool",
848 StreamName = kwargs[
'StreamName'],
849 JetContainerKey =
"AntiKt10EMTopoRCJets",
850 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
851 GhostConstitNames = [
"GhostLCTopoOrigin"],
852 Suffix =
"clusterSoftDrop",
853 Grooming =
"SoftDrop",
857 RCSubstructureClusterSDAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureClusterSDAug", AugmentationTools = [LLP1RCJetSubstructureClustSDAugTool])
858 acc.addEventAlgo(RCSubstructureClusterSDAug)
861 ghostConstitNames = [
"GhostTrack"]
862 if flags.Tracking.doLargeD0:
863 ghostConstitNames += [
"GhostTrackLRT"]
865 from DerivationFrameworkLLP.LLPToolsConfig
import RCJetSubstructureAugCfg
866 LLP1RCJetSubstructureTrackTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
867 name =
"LLP1RCJetSubstructureTrackTrimAugTool",
868 StreamName = kwargs[
'StreamName'],
869 JetContainerKey =
"AntiKt10EMTopoRCJets",
870 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
871 GhostConstitNames = ghostConstitNames,
872 Suffix =
"trackTrim",
873 Grooming =
"Trimming",
877 RCSubstructureTrackTrimAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureTrackTrimAug", AugmentationTools = [LLP1RCJetSubstructureTrackTrimAugTool])
878 acc.addEventAlgo(RCSubstructureTrackTrimAug)
880 from DerivationFrameworkLLP.LLPToolsConfig
import RCJetSubstructureAugCfg
881 LLP1RCJetSubstructureTrackSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
882 name =
"LLP1RCJetSubstructureTrackSDAugTool",
883 StreamName = kwargs[
'StreamName'],
884 JetContainerKey =
"AntiKt10EMTopoRCJets",
885 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
886 GhostConstitNames = ghostConstitNames,
887 Suffix =
"trackSoftDrop",
888 Grooming =
"SoftDrop",
892 RCSubstructureTrackSDAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureTrackSDAug", AugmentationTools = [LLP1RCJetSubstructureTrackSDAugTool])
893 acc.addEventAlgo(RCSubstructureTrackSDAug)
900 if flags.Trigger.EDMVersion >= 0:
901 from DerivationFrameworkLLP.LLPToolsConfig
import LLP1TriggerSkimmingToolCfg
902 LLP1TriggerSkimmingTool = acc.getPrimaryAndMerge(LLP1TriggerSkimmingToolCfg(
903 flags, name =
"LLP1TriggerSkimmingTool",
904 TriggerListsHelper = kwargs[
'TriggerListsHelper']))
906 skimmingTools.append(LLP1TriggerSkimmingTool)
908 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
909 acc.addEventAlgo(DerivationKernel(name,
910 SkimmingTools = skimmingTools,
911 ThinningTools = thinningTools,
912 AugmentationTools = augmentationTools))
922 acc = ComponentAccumulator()
924 MergedElectronContainer = (
925 "StdWithLRTElectrons" if flags.Tracking.doLargeD0
else "Electrons")
926 MergedMuonContainer =
"StdWithLRTMuons" if flags.Tracking.doLargeD0
else "Muons"
927 MergedMuonContainer_wZPH = (
928 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0
else "Muons_wZPH")
934 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
935 LLP1TriggerListsHelper = TriggerListsHelper(flags)
938 acc.merge(
LLP1KernelCfg(flags, name=
"LLP1Kernel", StreamName =
'StreamDAOD_LLP1', TriggerListsHelper = LLP1TriggerListsHelper))
943 from IsolationSelection.IsolationSelectionConfig
import IsoCloseByAlgsCfg
950 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite =
False,
951 stream_name =
'StreamDAOD_LLP1'))
952 contNames = [ MergedMuonContainer, MergedElectronContainer,
"Photons" ]
953 acc.merge(IsoCloseByAlgsCfg(flags, suff =
"_LLP1_LRTMerged",
954 isPhysLite =
False, containerNames = contNames,
955 useSelTools =
True, stream_name =
'StreamDAOD_LLP1',
956 isoDecSuffix =
"CloseByCorr_LRT",
957 caloDecSuffix =
'_LRT',
958 hasLRT = flags.Tracking.doLargeD0))
959 contNames = [
"ZeroPixelHitMuons" ]
960 acc.merge(IsoCloseByAlgsCfg(flags, suff =
"_LLP1_ZeroPixelHitsMuons",
961 isPhysLite =
False, containerNames = contNames,
962 stream_name =
'StreamDAOD_LLP1',
963 isoDecSuffix =
"CloseByCorr_ZPH"))
965 if flags.Tracking.doLargeD0:
966 contNames = [
"LRTElectrons",
"MuonsLRT" ]
967 acc.merge(IsoCloseByAlgsCfg(flags, suff =
"_LLP1",
968 isPhysLite =
False, containerNames = contNames,
970 stream_name =
'StreamDAOD_LLP1', hasLRT =
True))
975 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
976 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
977 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
979 LLP1SlimmingHelper =
SlimmingHelper(
"LLP1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
981 LLP1SlimmingHelper.SmartCollections = [
"EventInfo",
986 "InDetTrackParticles",
988 "AntiKt4EMPFlowJets",
989 "MET_Baseline_AntiKt4EMTopo",
990 "MET_Baseline_AntiKt4EMPFlow",
995 "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets",
996 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"]
997 if flags.Tracking.doLargeD0:
998 LLP1SlimmingHelper.SmartCollections += [
"LRTElectrons",
"MuonsLRT",
999 "InDetLargeD0TrackParticles"]
1001 LLP1SlimmingHelper.AllVariables = [
"InDetDisappearingTrackParticles",
1002 "MSDisplacedVertex",
1003 "MuonSpectrometerTrackParticles",
1004 "UnAssocMuonSegments",
1007 "CombinedMuonTrackParticles",
1008 "ExtrapolatedMuonTrackParticles",
1009 "CombinedStauTrackParticles",
1010 "AntiKt4EMTopoJets",
1013 "ElectronCaloRings",
1017 "EMOriginTopoClusters",
1019 "METAssoc_AntiKt4EMTopo",
1020 "MET_Core_AntiKt4EMTopo",
1021 "METAssoc_AntiKt4EMPFlow",
1022 "MET_Core_AntiKt4EMPFlow",
1023 "InDetLowPtRoITrackParticles",
1026 "DisappearingPixelMSOSs",
1027 "LowPtRoIPixelMSOSs",
1030 "DisappearingSCT_MSOSs",
1031 "LowPtRoISCT_MSOSs",
1034 if flags.Tracking.doLargeD0:
1035 LLP1SlimmingHelper.AllVariables += [
"MuonSegments_LRT",
1036 "CombinedMuonsLRTTrackParticles",
1037 "ExtraPolatedMuonsLRTTrackParticles",
1038 "MSOnlyExtraPolatedMuonsLRTTrackParticles"]
1041 excludedVertexAuxData =
"-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
1043 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
1044 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
1045 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
1046 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
1047 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
1048 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
1049 StaticContent += [
"xAOD::JetContainer#AntiKt10EMTopoRCJets",
"xAOD::JetAuxContainer#AntiKt10EMTopoRCJetsAux.-PseudoJet"]
1051 for wp
in LLP1VrtSecInclusiveSuffixes:
1052 StaticContent += [
"xAOD::VertexContainer#VrtSecInclusive_SecondaryVertices" + wp]
1053 StaticContent += [
"xAOD::VertexAuxContainer#VrtSecInclusive_SecondaryVertices" + wp +
"Aux."]
1055 for wp
in LLP1NewVSISuffixes:
1056 StaticContent += [
"xAOD::VertexContainer#NewVrtSecInclusive_SecondaryVertices" + wp]
1057 StaticContent += [
"xAOD::VertexAuxContainer#NewVrtSecInclusive_SecondaryVertices" + wp +
"Aux." + excludedVertexAuxData]
1059 StaticContent += [
"xAOD::VertexContainer#MuSAVertices"]
1060 StaticContent += [
"xAOD::VertexAuxContainer#MuSAVerticesAux."]
1061 StaticContent += [
"xAOD::TrackParticleContainer#MuSAExtrapolatedTrackParticles"]
1062 StaticContent += [
"xAOD::TrackParticleAuxContainer#MuSAExtrapolatedTrackParticlesAux."]
1064 if flags.Derivation.LLP.doMuSAValidation:
1065 StaticContent += [
"xAOD::VertexContainer#JPsiMuSAVertices"]
1066 StaticContent += [
"xAOD::VertexAuxContainer#JPsiMuSAVerticesAux."]
1067 StaticContent += [
"xAOD::VertexContainer#JPsiVertices"]
1068 StaticContent += [
"xAOD::VertexAuxContainer#JPsiVerticesAux."]
1069 StaticContent += [
"xAOD::TrackParticleContainer#JPsiVerticesTracks"]
1070 StaticContent += [
"xAOD::TrackParticleAuxContainer#JPsiVerticesTracksAux."]
1071 StaticContent += [
"xAOD::TrackParticleContainer#JPsiMuSAExtrapolatedTrackParticles"]
1072 StaticContent += [
"xAOD::TrackParticleAuxContainer#JPsiMuSAExtrapolatedTrackParticlesAux."]
1073 StaticContent += [
"xAOD::VertexContainer#ValidationMuSAVertices"]
1074 StaticContent += [
"xAOD::VertexAuxContainer#ValidationMuSAVerticesAux."]
1075 StaticContent += [
"xAOD::TrackParticleContainer#ValidationMuSAExtrapolatedTrackParticles"]
1076 StaticContent += [
"xAOD::TrackParticleAuxContainer#ValidationMuSAExtrapolatedTrackParticlesAux."]
1078 LLP1SlimmingHelper.ExtraVariables += [
"AntiKt10TruthTrimmedPtFrac5SmallR20Jets.Tau1_wta.Tau2_wta.Tau3_wta.D2.GhostBHadronsFinalCount",
1079 "Electrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1080 "Photons.DFCommonPhotonsIsEMMedium.DFCommonPhotonsIsEMMediumIsEMValue.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1081 "Muons.meanDeltaADCCountsMDT",
1082 "egammaClusters.phi_sampl.eta0.phi0",
1083 "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.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
1084 "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",
1085 "TruthPrimaryVertices.t.x.y.z.sumPt2",
1086 "PrimaryVertices.t.x.y.z.sumPt2.covariance",
1087 "InDetTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1088 "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
1089 "InDetTrackParticles.numberOfIBLOverflowsdEdx.numberOfUsedHitsdEdx.pixeldEdx",
1090 "InDetTrackParticles.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfNextToInnermostPixelLayerHits.numberOfContribPixelLayers.numberOfGangedFlaggedFakes.numberOfPixelOutliers.numberOfPixelSplitHits.numberOfPixelSpoiltHits",
1091 "InDetTrackParticles.numberOfSCTOutliers.numberOfSCTSpoiltHits",
1092 "InDetTrackParticles.numberOfTRTHoles.numberOfTRTDeadStraws.numberOfTRTSharedHits.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdHitsTotal.numberOfTRTHighThresholdOutliers.TRTdEdx.TRTdEdxUsedHits.hitPattern",
1093 "InDetTrackParticles.truthMatchProbability.truthClassification.truthOrigin.truthType",
1094 "InDetTrackParticles.TrkIsoPtPdEdx_ptcone20.TrkIsoPtPdEdx_ptcone30.TrkIsoPtPdEdx_ptcone40.TrkIsoPtTightPdEdx_ptcone20.TrkIsoPtTightPdEdx_ptcone30.TrkIsoPtTightPdEdx_ptcone40",
1095 "InDetTrackParticles.LLP1_ptcone20.LLP1_ptcone30.LLP1_ptcone40.LLP1_ptvarcone20.LLP1_ptvarcone30.LLP1_ptvarcone40.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag",
1096 "InDetTrackParticles.LLP1_topoetcone20.LLP1_topoetcone30.LLP1_topoetcone40.LLP1_topoetcone20NonCoreCone.LLP1_topoetcone30NonCoreCone.LLP1_topoetcone40NonCoreCone",
1097 "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",
1098 "InDetTrackParticles.Reco_msosLink",
1100 "InDetLargeD0TrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1101 "GSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthClassification.truthOrigin.truthType",
1102 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1103 "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ",
1104 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1105 "EventInfo.DFCommonJets_eventClean_SuperLooseBadLLP.DFCommonJets_eventClean_SuperLooseBadLLP_EMTopo.DFCommonJets_eventClean_LooseBadLLP_EMTopo",
1106 "TauJets.dRmax.etOverPtLeadTrk.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
1107 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
1108 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
1109 if flags.Tracking.doLargeD0:
1110 LLP1SlimmingHelper.ExtraVariables += [
1111 "LRTElectrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1112 "LRTegammaClusters.phi_sampl.eta0.phi0",
1113 "LRTGSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthOrigin.truthType",
1114 "AntiKt4EMTopoJets.GhostTrackLRT.GhostTrackLRTCount",
1119 LLP1SlimmingHelper.ExtraVariables += [
"Muons.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1120 "Electrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1121 "Photons.topoetcone20_CloseByCorr_LRT.topoetcone40_CloseByCorr_LRT.ptcone20_CloseByCorr_LRT"]
1122 if flags.Tracking.doLargeD0:
1123 LLP1SlimmingHelper.ExtraVariables += [
1124 "MuonsLRT.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1125 "LRTElectrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT"]
1128 "is_selected",
"is_associated",
"is_svtrk_final",
"pt_wrtSV",
"eta_wrtSV",
1129 "phi_wrtSV",
"d0_wrtSV",
"z0_wrtSV",
"errP_wrtSV",
"errd0_wrtSV",
1130 "errz0_wrtSV",
"chi2_toSV"
1133 for suffix
in LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes:
1134 LLP1SlimmingHelper.ExtraVariables += [
"InDetTrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1135 LLP1SlimmingHelper.ExtraVariables += [
"GSFTrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1136 if flags.Tracking.doLargeD0:
1137 LLP1SlimmingHelper.ExtraVariables += [
"InDetLargeD0TrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1138 LLP1SlimmingHelper.ExtraVariables += [
"LRTGSFTrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1140 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')
1141 LLP1SlimmingHelper.AppendToDictionary[
"EMOriginTopoClusters"]=
'xAOD::CaloClusterContainer'
1142 LLP1SlimmingHelper.AppendToDictionary[
"EMOriginTopoClustersAux"]=
'xAOD::ShallowAuxContainer'
1143 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')
1147 if flags.Input.isMC:
1149 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import addTruth3ContentToSlimmerTool
1150 addTruth3ContentToSlimmerTool(LLP1SlimmingHelper)
1151 LLP1SlimmingHelper.AllVariables += [
'TruthHFWithDecayParticles',
'TruthHFWithDecayVertices',
'TruthCharm',
'TruthPileupParticles',
'InTimeAntiKt4TruthJets',
'OutOfTimeAntiKt4TruthJets',
'AntiKt4TruthJets']
1152 LLP1SlimmingHelper.ExtraVariables += [
"Electrons.TruthLink",
1154 "Photons.TruthLink"]
1155 if flags.Tracking.doLargeD0:
1156 LLP1SlimmingHelper.ExtraVariables += [
"LRTElectrons.TruthLink",
1157 "MuonsLRT.TruthLink"]
1159 if flags.Derivation.LLP.saveFullTruth:
1160 LLP1SlimmingHelper.ExtraVariables += [
'TruthParticles',
'TruthVertices']
1161 StaticContent += [
"xAOD::JetContainer#AntiKt10TruthRCJets",
"xAOD::JetAuxContainer#AntiKt10TruthRCJetsAux.-PseudoJet"]
1164 StaticContent += [
"xAOD::MuonContainer#ZeroPixelHitMuons",
"xAOD::MuonAuxContainer#ZeroPixelHitMuonsAux."]
1166 from DerivationFrameworkEGamma.PhotonsCPDetailedContent
import (
1167 PhotonsCPDetailedContent,
1169 LLP1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
1172 from DerivationFrameworkJetEtMiss.JetCommonConfig
import addOriginCorrectedClustersToSlimmingTool
1173 addOriginCorrectedClustersToSlimmingTool(LLP1SlimmingHelper,writeLC=
True,writeEM=
True)
1174 LLP1SlimmingHelper.StaticContent = StaticContent
1177 LLP1SlimmingHelper.IncludeTriggerNavigation =
False
1178 LLP1SlimmingHelper.IncludeJetTriggerContent =
False
1179 LLP1SlimmingHelper.IncludeMuonTriggerContent =
False
1180 LLP1SlimmingHelper.IncludeEGammaTriggerContent =
False
1181 LLP1SlimmingHelper.IncludeTauTriggerContent =
False
1182 LLP1SlimmingHelper.IncludeEtMissTriggerContent =
False
1183 LLP1SlimmingHelper.IncludeBJetTriggerContent =
False
1184 LLP1SlimmingHelper.IncludeBPhysTriggerContent =
False
1185 LLP1SlimmingHelper.IncludeMinBiasTriggerContent =
False
1189 if flags.Trigger.EDMVersion == 2:
1190 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import AddRun2TriggerMatchingToSlimmingHelper
1191 from DerivationFrameworkLLP.LLPToolsConfig
import LLP1TriggerMatchingToolRun2Cfg
1192 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1193 OutputContainerPrefix =
"TrigMatch_",
1194 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesTau)
1195 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1196 OutputContainerPrefix =
"TrigMatch_",
1197 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau)
1199 acc.merge(LLP1TriggerMatchingToolRun2Cfg(flags,
1200 name =
"LRTTriggerMatchingTool_LLP1",
1201 OutputContainerPrefix =
"LRTTrigMatch_LLP1_",
1202 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1203 InputElectrons=MergedElectronContainer,
1204 InputMuons=MergedMuonContainer_wZPH
1207 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1208 OutputContainerPrefix =
"LRTTrigMatch_LLP1_",
1209 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1210 InputElectrons=MergedElectronContainer,
1211 InputMuons=MergedMuonContainer_wZPH
1214 if flags.Trigger.EDMVersion == 3
or (flags.Trigger.EDMVersion == 2
and flags.Trigger.doEDMVersionConversion):
1215 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
1216 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(LLP1SlimmingHelper)
1219 LLP1ItemList = LLP1SlimmingHelper.GetItemList()
1220 acc.merge(OutputStreamCfg(flags,
"DAOD_LLP1", ItemList=LLP1ItemList, AcceptAlgs=[
"LLP1Kernel"]))
1221 acc.merge(SetupMetaDataForStreamCfg(flags,
"DAOD_LLP1", AcceptAlgs=[
"LLP1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))