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 AntiKt4EMTopo
280 from JetRecConfig.JetDefinition
import JetDefinition
281 from JetRecConfig.StandardJetConstits
import stdConstitDic
as cst
283 registerAsInputConstit(AntiKt4EMTopo)
284 cst.AntiKt4EMTopoJets.label =
"EMTopoRC"
285 cst.AntiKt4TruthJets.label =
"TruthRC"
287 AntiKt10RCEMTopo = JetDefinition(
"AntiKt",1.0,cst.AntiKt4EMTopoJets,
288 ghostdefs = [
"Track",
"TrackLRT",
"LCTopoOrigin"],
289 modifiers = (
"Sort",
"Filter:200000",),
290 standardRecoMode =
True,
294 AntiKt10RCTruth = JetDefinition(
"AntiKt",1.0,cst.AntiKt4TruthJets,
296 modifiers = (
"Sort",
"Filter:200000",),
297 standardRecoMode =
True,
302 if flags.Tracking.doLargeD0:
303 from JetRecConfig.StandardSmallRJets
import AntiKt4LCTopo
304 acc.merge(JetRecCfg(flags, AntiKt4LCTopo))
307 from tauRec.TauConfig
import TauLRTReconstructionCfg
308 acc.merge(TauLRTReconstructionCfg(flags))
311 from DerivationFrameworkTau.TauCommonConfig
import AddTauIDDisplacedDecorationCfg
312 acc.merge(AddTauIDDisplacedDecorationCfg(flags))
314 from DerivationFrameworkPhys.PhysCommonConfig
import PhysCommonAugmentationsCfg
315 acc.merge(PhysCommonAugmentationsCfg(flags, TriggerListsHelper = kwargs[
'TriggerListsHelper']))
316 acc.merge(JetRecCfg(flags,AntiKt10RCEMTopo))
317 if flags.Input.isMC: acc.merge(JetRecCfg(flags,AntiKt10RCTruth))
319 if flags.Tracking.doLargeD0:
321 from DerivationFrameworkJetEtMiss.METCommonConfig
import METLRTCfg
322 acc.merge(METLRTCfg(flags,
"AntiKt4EMTopo"))
323 acc.merge(METLRTCfg(flags,
"AntiKt4EMPFlow"))
326 from DerivationFrameworkEGamma.EGammaLRTConfig
import EGammaLRTCfg
327 acc.merge(EGammaLRTCfg(flags))
329 from DerivationFrameworkLLP.LLPToolsConfig
import LRTElectronLHSelectorsCfg
330 acc.merge(LRTElectronLHSelectorsCfg(flags))
333 from DerivationFrameworkMuons.MuonsCommonConfig
import MuonsCommonCfg
334 acc.merge(MuonsCommonCfg(flags, suff=
"LRT"))
337 from DerivationFrameworkLLP.LLPToolsConfig
import PhotonIsEMSelectorsCfg
338 acc.merge(PhotonIsEMSelectorsCfg(flags))
341 from DerivationFrameworkLLP.LLPToolsConfig
import RecoverZeroPixelHitMuonsCfg
342 acc.merge(RecoverZeroPixelHitMuonsCfg(flags))
345 from BTagging.FlavorTaggingConfig
import FlavorTaggingCfg
346 acc.merge(FlavorTaggingCfg(flags,
'AntiKt4EMTopoJets'))
349 from VrtSecInclusive.VrtSecInclusiveConfig
import VrtSecInclusiveCfg
352 from MuSAVtxFitter.MuSAVtxFitterConfig
import MuSAVtxFitterConfig, MuSAVtxJPsiValidationAlgCfg, MuSAVtxFitterValidationConfig
354 acc.merge(VrtSecInclusiveCfg(flags,
355 name =
"VrtSecInclusive",
356 AugmentingVersionString =
"",
357 FillIntermediateVertices =
False,
358 TrackLocation = MergedTrackCollection))
359 LLP1VrtSecInclusiveSuffixes.append(
"")
362 shortLifetimeSuffix =
"_shortLifetime"
363 acc.merge(VrtSecInclusiveCfg(flags,
364 name =
"VrtSecInclusive_InDet"+shortLifetimeSuffix,
365 AugmentingVersionString = shortLifetimeSuffix,
366 FillIntermediateVertices =
False,
367 TrackLocation = MergedTrackCollection,
368 twoTrkVtxFormingD0Cut = 1.0))
369 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeSuffix)
372 shortLifetimeNod0Suffix =
"_shortLifetime_nod0"
373 acc.merge(VrtSecInclusiveCfg(flags,
374 name =
"VrtSecInclusive_InDet"+shortLifetimeNod0Suffix,
375 AugmentingVersionString = shortLifetimeNod0Suffix,
376 FillIntermediateVertices =
False,
377 TrackLocation = MergedTrackCollection,
378 twoTrkVtxFormingD0Cut = 0))
379 LLP1VrtSecInclusiveSuffixes.append(shortLifetimeNod0Suffix)
382 if flags.Tracking.doTrackSegmentsDisappearing:
383 dissapearingSuffix =
"_disappearing"
384 acc.merge(VrtSecInclusiveCfg(
385 flags, name =
"VrtSecInclusive_"+dissapearingSuffix,
386 AugmentingVersionString = dissapearingSuffix,
387 FillIntermediateVertices =
False,
388 TrackLocation = MergedTrackletCollection,
389 doReassembleVertices =
True,
390 doMergeByShuffling =
False,
391 doMergeFinalVerticesDistance=
False,
392 doAssociateNonSelectedTracks=
False,
393 DoPVcompatibility =
True,
394 RemoveFake2TrkVrt =
False,
395 PassThroughTrackSelection =
True,
396 TruncateListOfWorkingVertices =
False,
397 twoTrkVtxFormingD0Cut = 0.0,
398 SelVrtChi2Cut = 1000000.0,
399 twoTrVrtMaxPerigeeDist = 50.0,
400 twoTrVrtMinRadius = 50.0,
401 doDisappearingTrackVertexing=
True))
402 LLP1VrtSecInclusiveSuffixes.append(dissapearingSuffix)
404 if flags.Input.isMC
and flags.Derivation.LLP.doTrackSystematics:
405 from InDetTrackSystematicsTools.InDetTrackSystematicsToolsConfig
import TrackSystematicsAlgCfg
406 TrackSystSuffix =
"_TRK_EFF_LARGED0_GLOBAL__1down"
407 acc.merge(TrackSystematicsAlgCfg(
409 name=f
"InDetTrackSystematicsAlg{TrackSystSuffix}",
410 InputTrackContainer = MergedTrackCollection,
411 OutputTrackContainer = f
"{MergedTrackCollection}{TrackSystSuffix}"))
412 acc.merge(VrtSecInclusiveCfg(flags,
413 name = f
"VrtSecInclusive{TrackSystSuffix}",
414 AugmentingVersionString = TrackSystSuffix,
415 FillIntermediateVertices =
False,
416 TrackLocation = f
"{MergedTrackCollection}{TrackSystSuffix}"))
417 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffix)
419 TrackSystSuffixShortLifetime =
"_TRK_EFF_LARGED0_GLOBAL__1down_shortLifetime"
420 acc.merge(TrackSystematicsAlgCfg(
422 name=f
"InDetTrackSystematicsAlg{TrackSystSuffixShortLifetime}",
423 InputTrackContainer = MergedTrackCollection,
424 OutputTrackContainer = f
"{MergedTrackCollection}{TrackSystSuffixShortLifetime}"))
425 acc.merge(VrtSecInclusiveCfg(flags,
426 name = f
"VrtSecInclusive{TrackSystSuffixShortLifetime}",
427 AugmentingVersionString = TrackSystSuffixShortLifetime,
428 FillIntermediateVertices =
False,
429 TrackLocation = f
"{MergedTrackCollection}{TrackSystSuffixShortLifetime}",
430 twoTrkVtxFormingD0Cut = 1.0))
431 LLP1VrtSecInclusiveSuffixes.append(TrackSystSuffixShortLifetime)
434 MergedMuonContainer_wZPH = (
435 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0
else "Muons_wZPH")
436 from DerivationFrameworkLLP.LLPToolsConfig
import ZeroPixelHitMuonMergerAlgCfg
437 acc.merge(ZeroPixelHitMuonMergerAlgCfg(flags,
438 InputMuonContainers = [MergedMuonContainer,
"ZeroPixelHitMuons"],
439 OutputMuonLocation = MergedMuonContainer_wZPH))
443 LeptonsSuffix =
"_Leptons"
444 acc.merge(VrtSecInclusiveCfg(flags,
445 name =
"VrtSecInclusive_InDet"+LeptonsSuffix,
446 AugmentingVersionString = LeptonsSuffix,
447 FillIntermediateVertices =
False,
448 TrackLocation = MergedTrackCollection,
449 twoTrkVtxFormingD0Cut = 1.0,
450 doSelectTracksFromMuons =
True,
451 doRemoveCaloTaggedMuons =
True,
452 doSelectTracksFromElectrons =
True,
453 MuonLocation = MergedMuonContainer,
454 ElectronLocation = MergedElectronContainer))
455 LLP1VrtSecInclusiveSuffixes.append(LeptonsSuffix)
458 LepTrackSuffix =
"_LepTrack"
459 acc.merge(VrtSecInclusiveCfg(flags,
460 name =
"VrtSecInclusive_InDet"+LepTrackSuffix,
461 AugmentingVersionString = LepTrackSuffix,
462 FillIntermediateVertices =
False,
463 TrackLocation = MergedTrackCollection,
464 MuonLocation = MergedMuonContainer,
465 ElectronLocation = MergedElectronContainer,
466 twoTrkVtxFormingD0Cut = 1.0,
467 doSelectIDAndGSFTracks =
True,
468 doRemoveCaloTaggedMuons =
True,
469 doRemoveNonLeptonVertices =
True,
470 doAssociateNonSelectedTracks=
False))
471 LLP1VrtSecInclusiveSuffixes.append(LepTrackSuffix)
474 BoostedMuonsSuffix =
"_BoostedMuons"
475 acc.merge(VrtSecInclusiveCfg(flags,
476 name =
"VrtSecInclusive_InDet"+BoostedMuonsSuffix,
477 AugmentingVersionString = BoostedMuonsSuffix,
478 FillIntermediateVertices =
False,
479 TrackLocation = MergedTrackCollection,
480 twoTrkVtxFormingD0Cut = 0.0,
481 doSelectTracksFromMuons =
True,
482 doRemoveCaloTaggedMuons =
True,
483 doSelectTracksFromElectrons =
False,
484 MuonLocation = MergedMuonContainer_wZPH,
485 do_PVvetoCut =
False,
486 DoTwoTrSoftBtag =
True,
487 TwoTrVrtMinDistFromPVCut = 0.5,
488 associatePtCut = 500.))
489 LLP1VrtSecInclusiveSuffixes.append(BoostedMuonsSuffix)
493 BoostedElectronsSuffix =
"_BoostedElectrons"
494 acc.merge(VrtSecInclusiveCfg(flags,
495 name =
"VrtSecInclusive_InDet"+BoostedElectronsSuffix,
496 AugmentingVersionString = BoostedElectronsSuffix,
497 FillIntermediateVertices =
False,
498 TrackLocation = MergedTrackCollection,
499 twoTrkVtxFormingD0Cut = 0.0,
500 doSelectTracksFromMuons =
False,
501 doSelectTracksFromElectrons =
True,
502 ElectronLocation = MergedElectronContainer,
503 do_PVvetoCut =
False,
504 DoTwoTrSoftBtag =
True,
505 TwoTrVrtMinDistFromPVCut = 0.5,
506 associatePtCut = 500.))
507 LLP1VrtSecInclusiveSuffixes.append(BoostedElectronsSuffix)
512 MuonContainerName=MergedMuonContainer))
514 if flags.Derivation.LLP.doMuSAValidation:
516 acc.merge(MuSAVtxJPsiValidationAlgCfg(flags,
517 MuonContainer=MergedMuonContainer,
518 JPsiMuonContainer=
"JPsiMuons"))
521 acc.merge(MuSAVtxFitterValidationConfig(flags,
522 name=
"MuSAVtxFitterValidationJPsi",
523 MuonContainerName=
"JPsiMuons"))
525 acc.merge(MuSAVtxFitterValidationConfig(flags,
526 MuonContainerName=MergedMuonContainer,
527 MuSAVtxContainerName=
"ValidationMuSAVertices",
528 MuSAExtrapolatedTracksName=
"ValidationMuSAExtrapolatedTrackParticles",
529 MSTPContainerName=
"MuonSpectrometerTrackParticles"))
533 from NewVrtSecInclusiveTool.NewVrtSecInclusiveAlgConfig
import NewVrtSecInclusiveAlgLLPCfg
534 from NewVrtSecInclusiveTool.NewVrtSecInclusiveConfig
import DVFinderToolCfg
535 IDAndGSFSuffix =
"_IDAndGSF_LepTrack"
537 NVSILepTrack_Tool = acc.popToolsAndMerge(DVFinderToolCfg(flags,FillHist=
False,AugmentingVersionString=IDAndGSFSuffix,MaxZVrt=1000.,AntiPileupSigRCut=2.))
538 acc.merge(NewVrtSecInclusiveAlgLLPCfg(flags,
539 algname =
"NVSI"+IDAndGSFSuffix,
540 AugmentingVersionString = IDAndGSFSuffix,
541 ElectronContainer = MergedElectronContainer,
542 MuonContainer = MergedMuonContainer,
543 TrackParticleContainer = MergedTrackCollection,
544 GSFTrackParticleContainer = MergedGSFTrackCollection,
545 BVertexContainerName =
"NewVrtSecInclusive_SecondaryVertices"+IDAndGSFSuffix,
548 RemoveNonLepVertices =
True,
549 BVertexTool = NVSILepTrack_Tool))
550 LLP1NewVSISuffixes.append(IDAndGSFSuffix)
553 jet_clean_prefix=
"DFCommonJets_"
554 jet_clean_container=
"AntiKt4EMTopoJets"
555 jet_clean_level=
"SuperLooseBadLLP"
556 from JetSelectorTools.JetSelectorToolsConfig
import EventCleaningToolCfg, JetCleaningToolCfg
557 LLP1JetCleanSuperLLPTool = acc.popToolsAndMerge(JetCleaningToolCfg(flags,
558 "LLP1JetCleanSuperLLP",
562 acc.addPublicTool(LLP1JetCleanSuperLLPTool)
564 LLP1EventCleanSuperLLPTool = acc.popToolsAndMerge(EventCleaningToolCfg(flags,
565 "LLP1EventCleanSuperLLP",
567 LLP1EventCleanSuperLLPTool.JetCleanPrefix = jet_clean_prefix
568 LLP1EventCleanSuperLLPTool.OrDecorator =
"passOR_EMTopo"
569 LLP1EventCleanSuperLLPTool.JetContainer = jet_clean_container
570 LLP1EventCleanSuperLLPTool.JetCleaningTool = LLP1JetCleanSuperLLPTool
571 acc.addPublicTool(LLP1EventCleanSuperLLPTool)
573 LLP1EventCleanAlg = CompFactory.EventCleaningTestAlg(
574 "LLP1JetCleanDecoratorSuperLLP",
575 EventCleaningTool = LLP1EventCleanSuperLLPTool,
576 JetCollectionName = jet_clean_container,
577 EventCleanPrefix = jet_clean_prefix,
578 CleaningLevel = jet_clean_level,
581 acc.addEventAlgo(LLP1EventCleanAlg)
585 from DerivationFrameworkLLP.LLPToolsConfig
import AugmentationToolLeadingJetsCfg
586 augmentationToolLeadingJets = acc.getPrimaryAndMerge(AugmentationToolLeadingJetsCfg(flags))
587 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(name, AugmentationTools = [augmentationToolLeadingJets]))
590 from DerivationFrameworkInDet.InDetToolsConfig
import TrackParticleThinningCfg, EgammaTrackParticleThinningCfg, MuonTrackParticleThinningCfg, TauTrackParticleThinningCfg, DiTauTrackParticleThinningCfg
591 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import GenericObjectThinningCfg
592 from DerivationFrameworkTau.TauCommonConfig
import TauThinningCfg
595 LLP1TrackParticleThinningTool = acc.getPrimaryAndMerge(TrackParticleThinningCfg(
597 name =
"LLP1TrackParticleThinningTool",
598 StreamName = kwargs[
'StreamName'],
599 SelectionString =
"InDetTrackParticles.pt>10*GeV",
600 InDetTrackParticlesKey =
"InDetTrackParticles"))
603 if flags.Tracking.doLargeD0:
604 LLP1LRTGSFTrackParticleThinningTool = acc.getPrimaryAndMerge(
605 TrackParticleThinningCfg(
606 flags, name =
"LLP1LRTGSFTrackParticleThinningTool",
607 StreamName = kwargs[
'StreamName'],
608 SelectionString =
"LRTGSFTrackParticles.pt>0*GeV",
609 InDetTrackParticlesKey =
"LRTGSFTrackParticles"))
612 if flags.Tracking.doTrackSegmentsDisappearing:
613 LLP1DTTrackParticleThinningTool = acc.getPrimaryAndMerge(
614 TrackParticleThinningCfg(
615 flags, name =
"LLP1DTTrackParticleThinningTool",
616 StreamName = kwargs[
'StreamName'],
617 SelectionString =
"InDetDisappearingTrackParticles.pt>5*GeV",
618 InDetTrackParticlesKey =
"InDetDisappearingTrackParticles"))
621 LLP1ElectronTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
623 name =
"LLP1ElectronTPThinningTool",
624 StreamName = kwargs[
'StreamName'],
626 InDetTrackParticlesKey =
"InDetTrackParticles"))
629 if flags.Tracking.doLargeD0:
630 LLP1LRTElectronTPThinningTool = acc.getPrimaryAndMerge(
631 EgammaTrackParticleThinningCfg(
632 flags, name =
"LLP1LRTElectronTPThinningTool",
633 StreamName = kwargs[
'StreamName'],
634 SGKey =
"LRTElectrons",
635 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles",
636 GSFTrackParticlesKey =
"LRTGSFTrackParticles"))
639 LLP1MuonTPThinningTool = acc.getPrimaryAndMerge(MuonTrackParticleThinningCfg(
641 name =
"LLP1MuonTPThinningTool",
642 StreamName = kwargs[
'StreamName'],
644 InDetTrackParticlesKey =
"InDetTrackParticles"))
647 if flags.Tracking.doLargeD0:
648 LLP1LRTMuonTPThinningTool = acc.getPrimaryAndMerge(
649 MuonTrackParticleThinningCfg(
650 flags, name =
"LLP1LRTMuonTPThinningTool",
651 StreamName = kwargs[
'StreamName'],
652 MuonKey =
"MuonsLRT",
653 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles"))
656 LLP1PhotonTPThinningTool = acc.getPrimaryAndMerge(EgammaTrackParticleThinningCfg(
658 name =
"LLP1PhotonTPThinningTool",
659 StreamName = kwargs[
'StreamName'],
661 InDetTrackParticlesKey =
"",
662 GSFConversionVerticesKey =
"GSFConversionVertices",
663 GSFTrackParticlesKey =
"GSFTrackParticles",
664 BestMatchOnly =
True,
665 BestVtxMatchOnly =
True))
668 tau_thinning_expression = f
"TauJets.pt >= {flags.Tau.MinPtDAOD}"
669 LLP1TauJetsThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
671 name =
"LLP1TauJetThinningTool",
672 StreamName = kwargs[
'StreamName'],
674 TauTracks =
"TauTracks",
675 TrackParticles =
"InDetTrackParticles",
676 TauNeutralPFOs =
"TauNeutralParticleFlowObjects",
677 TauSecondaryVertices =
"TauSecondaryVertices",
678 SelectionString = tau_thinning_expression))
681 LLP1TauTPThinningTool = acc.getPrimaryAndMerge(TauTrackParticleThinningCfg(
683 name =
"LLP1TauTPThinningTool",
684 StreamName = kwargs[
'StreamName'],
686 InDetTrackParticlesKey =
"InDetTrackParticles",
687 DoTauTracksThinning =
True,
688 TauTracksKey =
"TauTracks"))
690 tau_murm_thinning_expression = tau_thinning_expression.replace(
'TauJets',
'TauJets_MuonRM')
691 LLP1TauJetMuonRMParticleThinningTool = acc.getPrimaryAndMerge(TauThinningCfg(
693 name =
"LLP1TauJets_MuonRMThinningTool",
694 StreamName = kwargs[
'StreamName'],
695 Taus =
"TauJets_MuonRM",
696 TauTracks =
"TauTracks_MuonRM",
697 TrackParticles =
"InDetTrackParticles",
698 TauNeutralPFOs =
"TauNeutralParticleFlowObjects_MuonRM",
699 TauSecondaryVertices =
"TauSecondaryVertices_MuonRM",
700 SelectionString = tau_murm_thinning_expression))
703 LLP1DiTauTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
705 name =
"LLP1DiTauTPThinningTool",
706 StreamName = kwargs[
'StreamName'],
707 DiTauKey =
"DiTauJets",
708 InDetTrackParticlesKey =
"InDetTrackParticles"))
711 LLP1DiTauLowPtThinningTool = acc.getPrimaryAndMerge(GenericObjectThinningCfg(
713 name =
"LLP1DiTauLowPtThinningTool",
714 StreamName = kwargs[
'StreamName'],
715 ContainerName =
"DiTauJetsLowPt",
716 SelectionString =
"DiTauJetsLowPt.nSubjets > 1"))
719 LLP1DiTauLowPtTPThinningTool = acc.getPrimaryAndMerge(DiTauTrackParticleThinningCfg(
721 name =
"LLP1DiTauLowPtTPThinningTool",
722 StreamName = kwargs[
'StreamName'],
723 DiTauKey =
"DiTauJetsLowPt",
724 InDetTrackParticlesKey =
"InDetTrackParticles",
725 SelectionString =
"DiTauJetsLowPt.nSubjets > 1"))
727 if flags.Tracking.doLargeD0:
728 from DerivationFrameworkLLP.LLPToolsConfig
import TauLRTThinningCfg
729 tau_lrt_thinning_expression = f
"TauJetsLRT.pt >= {flags.Tau.MinPtDAOD}"
730 LLP1TauJetsLRTThinningTool = acc.getPrimaryAndMerge(TauLRTThinningCfg(
732 name =
"LLP1TauJetLRTThinningTool",
733 StreamName = kwargs[
'StreamName'],
735 TauTracks =
"TauTracksLRT",
736 TrackParticles =
"InDetTrackParticles",
737 TrackLargeD0Particles=
"InDetLargeD0TrackParticles",
738 TauNeutralPFOs =
"TauNeutralParticleFlowObjectsLRT",
739 TauSecondaryVertices =
"TauSecondaryVerticesLRT",
740 SelectionString = tau_lrt_thinning_expression))
743 from DerivationFrameworkLLP.LLPToolsConfig
import VSITrackParticleThinningCfg
744 LLP1VSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
745 name =
"LLP1VSITPThinningTool",
746 StreamName = kwargs[
'StreamName'],
747 InDetTrackParticlesKey =
"InDetTrackParticles",
748 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
750 if flags.Tracking.doLargeD0:
751 LLP1LRTVSITPThinningTool = acc.getPrimaryAndMerge(
752 VSITrackParticleThinningCfg(
753 flags, name =
"LLP1LRTVSITPThinningTool",
754 StreamName = kwargs[
'StreamName'],
755 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles",
756 AugVerStrings = LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes))
758 LLP1GSFVSITPThinningTool = acc.getPrimaryAndMerge(VSITrackParticleThinningCfg(flags,
759 name =
"LLP1GSFVSITPThinningTool",
760 StreamName = kwargs[
'StreamName'],
761 InDetTrackParticlesKey =
"GSFTrackParticles",
762 AugVerStrings = [IDAndGSFSuffix]))
765 from DerivationFrameworkLLP.LLPToolsConfig
import JetTrackParticleThinningCfg, JetLargeD0TrackParticleThinningCfg
766 LLP1JetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg(flags,
767 name =
"LLP1JetTPThinningTool",
768 StreamName = kwargs[
'StreamName'],
769 JetKey =
"AntiKt4EMTopoJets",
770 SelectionString =
"(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
771 InDetTrackParticlesKey =
"InDetTrackParticles"))
773 LLP1FatJetTPThinningTool = acc.getPrimaryAndMerge(JetTrackParticleThinningCfg( flags,
774 name =
"LLP1FatJetTPThinningTool",
775 StreamName = kwargs[
'StreamName'],
776 JetKey =
"AntiKt10EMTopoRCJets",
777 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
778 InDetTrackParticlesKey =
"InDetTrackParticles",
782 if flags.Tracking.doLargeD0:
783 LLP1LRTJetTPThinningTool = acc.getPrimaryAndMerge(
784 JetLargeD0TrackParticleThinningCfg(
785 flags, name =
"LLP1LRTJetTPThinningTool",
786 StreamName = kwargs[
'StreamName'],
787 JetKey =
"AntiKt4EMTopoJets",
788 SelectionString =
"(AntiKt4EMTopoJets.pt > 20.*GeV) && (abs(AntiKt4EMTopoJets.eta) < 2.5)",
789 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles"))
791 LLP1LRTFatJetTPThinningTool = acc.getPrimaryAndMerge(
792 JetLargeD0TrackParticleThinningCfg(
793 flags, name =
"LLP1LRTFatJetTPThinningTool",
794 StreamName = kwargs[
'StreamName'],
795 JetKey =
"AntiKt10EMTopoRCJets",
796 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
797 InDetTrackParticlesKey =
"InDetLargeD0TrackParticles"))
800 from DerivationFrameworkLLP.LLPToolsConfig
import PixeldEdxTrackParticleThinningCfg
801 LLP1PixeldEdxTrackParticleThinningTool = acc.getPrimaryAndMerge(PixeldEdxTrackParticleThinningCfg(
803 name =
"LLP1PixeldEdxTrackParticleThinningTool",
804 StreamName = kwargs[
'StreamName'],
805 InDetTrackParticlesKey =
"InDetTrackParticles"))
809 from DerivationFrameworkCalo.DerivationFrameworkCaloConfig
import JetCaloClusterThinningCfg
811 LLP1CCThinningTool = acc.getPrimaryAndMerge(JetCaloClusterThinningCfg(
814 StreamName = kwargs[
'StreamName'],
815 SGKey =
"AntiKt4EMTopoJets",
816 TopoClCollectionSGKey =
"CaloCalTopoClusters",
817 AdditionalClustersKey = [
"EMOriginTopoClusters",
"LCOriginTopoClusters"]
822 thinningTools = [LLP1TrackParticleThinningTool,
823 LLP1ElectronTPThinningTool,
824 LLP1MuonTPThinningTool,
825 LLP1PhotonTPThinningTool,
826 LLP1TauJetsThinningTool,
827 LLP1TauTPThinningTool,
828 LLP1TauJetMuonRMParticleThinningTool,
829 LLP1DiTauTPThinningTool,
830 LLP1DiTauLowPtThinningTool,
831 LLP1DiTauLowPtTPThinningTool,
832 LLP1VSITPThinningTool,
833 LLP1GSFVSITPThinningTool,
834 LLP1JetTPThinningTool,
835 LLP1FatJetTPThinningTool,
836 LLP1PixeldEdxTrackParticleThinningTool,
839 if flags.Tracking.doLargeD0:
840 thinningTools += [ LLP1LRTJetTPThinningTool,
841 LLP1LRTFatJetTPThinningTool,
842 LLP1LRTGSFTrackParticleThinningTool,
843 LLP1LRTElectronTPThinningTool,
844 LLP1LRTMuonTPThinningTool,
845 LLP1TauJetsLRTThinningTool,
846 LLP1LRTVSITPThinningTool ]
848 if flags.Tracking.doTrackSegmentsDisappearing:
849 thinningTools += [ LLP1DTTrackParticleThinningTool ]
855 from DerivationFrameworkLLP.LLPToolsConfig
import RCJetSubstructureAugCfg
856 LLP1RCJetSubstructureClustTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
857 name =
"LLP1RCJetSubstructureClustTrimAugTool",
858 StreamName = kwargs[
'StreamName'],
859 JetContainerKey =
"AntiKt10EMTopoRCJets",
860 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
861 GhostConstitNames = [
"GhostLCTopoOrigin"],
862 Suffix =
"clusterTrim",
863 Grooming =
"Trimming",
867 RCSubstructureClusterTrimAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureClusterTrimAug", AugmentationTools = [LLP1RCJetSubstructureClustTrimAugTool])
868 acc.addEventAlgo(RCSubstructureClusterTrimAug)
870 LLP1RCJetSubstructureClustSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg(flags,
871 name =
"LLP1RCJetSubstructureClustSDAugTool",
872 StreamName = kwargs[
'StreamName'],
873 JetContainerKey =
"AntiKt10EMTopoRCJets",
874 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
875 GhostConstitNames = [
"GhostLCTopoOrigin"],
876 Suffix =
"clusterSoftDrop",
877 Grooming =
"SoftDrop",
881 RCSubstructureClusterSDAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureClusterSDAug", AugmentationTools = [LLP1RCJetSubstructureClustSDAugTool])
882 acc.addEventAlgo(RCSubstructureClusterSDAug)
885 ghostConstitNames = [
"GhostTrack"]
886 if flags.Tracking.doLargeD0:
887 ghostConstitNames += [
"GhostTrackLRT"]
889 from DerivationFrameworkLLP.LLPToolsConfig
import RCJetSubstructureAugCfg
890 LLP1RCJetSubstructureTrackTrimAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
891 name =
"LLP1RCJetSubstructureTrackTrimAugTool",
892 StreamName = kwargs[
'StreamName'],
893 JetContainerKey =
"AntiKt10EMTopoRCJets",
894 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
895 GhostConstitNames = ghostConstitNames,
896 Suffix =
"trackTrim",
897 Grooming =
"Trimming",
901 RCSubstructureTrackTrimAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureTrackTrimAug", AugmentationTools = [LLP1RCJetSubstructureTrackTrimAugTool])
902 acc.addEventAlgo(RCSubstructureTrackTrimAug)
904 from DerivationFrameworkLLP.LLPToolsConfig
import RCJetSubstructureAugCfg
905 LLP1RCJetSubstructureTrackSDAugTool = acc.getPrimaryAndMerge(RCJetSubstructureAugCfg( flags,
906 name =
"LLP1RCJetSubstructureTrackSDAugTool",
907 StreamName = kwargs[
'StreamName'],
908 JetContainerKey =
"AntiKt10EMTopoRCJets",
909 SelectionString =
"(AntiKt10EMTopoRCJets.pt > 200.*GeV) && (abs(AntiKt10EMTopoRCJets.eta) < 2.5)",
910 GhostConstitNames = ghostConstitNames,
911 Suffix =
"trackSoftDrop",
912 Grooming =
"SoftDrop",
916 RCSubstructureTrackSDAug = CompFactory.DerivationFramework.CommonAugmentation(
"RCSubstructureTrackSDAug", AugmentationTools = [LLP1RCJetSubstructureTrackSDAugTool])
917 acc.addEventAlgo(RCSubstructureTrackSDAug)
924 if flags.Trigger.EDMVersion >= 0:
925 from DerivationFrameworkLLP.LLPToolsConfig
import LLP1TriggerSkimmingToolCfg
926 LLP1TriggerSkimmingTool = acc.getPrimaryAndMerge(LLP1TriggerSkimmingToolCfg(
927 flags, name =
"LLP1TriggerSkimmingTool",
928 TriggerListsHelper = kwargs[
'TriggerListsHelper']))
930 skimmingTools.append(LLP1TriggerSkimmingTool)
932 DerivationKernel = CompFactory.DerivationFramework.DerivationKernel
933 acc.addEventAlgo(DerivationKernel(name,
934 SkimmingTools = skimmingTools,
935 ThinningTools = thinningTools,
936 AugmentationTools = augmentationTools))
946 acc = ComponentAccumulator()
948 MergedElectronContainer = (
949 "StdWithLRTElectrons" if flags.Tracking.doLargeD0
else "Electrons")
950 MergedMuonContainer =
"StdWithLRTMuons" if flags.Tracking.doLargeD0
else "Muons"
951 MergedMuonContainer_wZPH = (
952 "StdWithLRTMuons_wZPH" if flags.Tracking.doLargeD0
else "Muons_wZPH")
958 from DerivationFrameworkPhys.TriggerListsHelper
import TriggerListsHelper
959 LLP1TriggerListsHelper = TriggerListsHelper(flags)
962 acc.merge(
LLP1KernelCfg(flags, name=
"LLP1Kernel", StreamName =
'StreamDAOD_LLP1', TriggerListsHelper = LLP1TriggerListsHelper))
967 from IsolationSelection.IsolationSelectionConfig
import IsoCloseByAlgsCfg
974 acc.merge(IsoCloseByAlgsCfg(flags, isPhysLite =
False,
975 stream_name =
'StreamDAOD_LLP1'))
976 contNames = [ MergedMuonContainer, MergedElectronContainer,
"Photons" ]
977 acc.merge(IsoCloseByAlgsCfg(flags, suff =
"_LLP1_LRTMerged",
978 isPhysLite =
False, containerNames = contNames,
979 useSelTools =
True, stream_name =
'StreamDAOD_LLP1',
980 isoDecSuffix =
"CloseByCorr_LRT",
981 caloDecSuffix =
'_LRT',
982 hasLRT = flags.Tracking.doLargeD0))
983 contNames = [
"ZeroPixelHitMuons" ]
984 acc.merge(IsoCloseByAlgsCfg(flags, suff =
"_LLP1_ZeroPixelHitsMuons",
985 isPhysLite =
False, containerNames = contNames,
986 stream_name =
'StreamDAOD_LLP1',
987 isoDecSuffix =
"CloseByCorr_ZPH"))
989 if flags.Tracking.doLargeD0:
990 contNames = [
"LRTElectrons",
"MuonsLRT" ]
991 acc.merge(IsoCloseByAlgsCfg(flags, suff =
"_LLP1",
992 isPhysLite =
False, containerNames = contNames,
994 stream_name =
'StreamDAOD_LLP1', hasLRT =
True))
999 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
1000 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
1001 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
1003 LLP1SlimmingHelper =
SlimmingHelper(
"LLP1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
1005 LLP1SlimmingHelper.SmartCollections = [
"EventInfo",
1010 "InDetTrackParticles",
1011 "AntiKt4EMTopoJets",
1012 "AntiKt4EMPFlowJets",
1013 "MET_Baseline_AntiKt4EMTopo",
1014 "MET_Baseline_AntiKt4EMPFlow",
1019 "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"]
1020 if flags.Tracking.doLargeD0:
1021 LLP1SlimmingHelper.SmartCollections += [
"LRTElectrons",
"MuonsLRT",
"TauJetsLRT",
1022 "InDetLargeD0TrackParticles"]
1024 LLP1SlimmingHelper.AllVariables = [
"InDetDisappearingTrackParticles",
1025 "MSDisplacedVertex",
1026 "MuonSpectrometerTrackParticles",
1027 "UnAssocMuonSegments",
1030 "CombinedMuonTrackParticles",
1031 "ExtrapolatedMuonTrackParticles",
1032 "CombinedStauTrackParticles",
1033 "AntiKt4EMTopoJets",
1036 "ElectronCaloRings",
1040 "EMOriginTopoClusters",
1042 "METAssoc_AntiKt4EMTopo",
1043 "MET_Core_AntiKt4EMTopo",
1044 "METAssoc_AntiKt4EMPFlow",
1045 "MET_Core_AntiKt4EMPFlow",
1046 "InDetLowPtRoITrackParticles",
1049 "DisappearingPixelMSOSs",
1050 "LowPtRoIPixelMSOSs",
1053 "DisappearingSCT_MSOSs",
1054 "LowPtRoISCT_MSOSs",
1057 "HLT_MuRoICluster_Composites"]
1058 if flags.Tracking.doLargeD0:
1059 LLP1SlimmingHelper.AllVariables += [
"MuonSegments_LRT",
1060 "CombinedMuonsLRTTrackParticles",
1061 "ExtraPolatedMuonsLRTTrackParticles",
1062 "MSOnlyExtraPolatedMuonsLRTTrackParticles"]
1065 excludedVertexAuxData =
"-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"
1067 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Tight_Vertices"]
1068 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Tight_VerticesAux." + excludedVertexAuxData]
1069 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Medium_Vertices"]
1070 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Medium_VerticesAux." + excludedVertexAuxData]
1071 StaticContent += [
"xAOD::VertexContainer#SoftBVrtClusterTool_Loose_Vertices"]
1072 StaticContent += [
"xAOD::VertexAuxContainer#SoftBVrtClusterTool_Loose_VerticesAux." + excludedVertexAuxData]
1073 StaticContent += [
"xAOD::JetContainer#AntiKt10EMTopoRCJets",
"xAOD::JetAuxContainer#AntiKt10EMTopoRCJetsAux.-PseudoJet"]
1075 for wp
in LLP1VrtSecInclusiveSuffixes:
1076 StaticContent += [
"xAOD::VertexContainer#VrtSecInclusive_SecondaryVertices" + wp]
1077 StaticContent += [
"xAOD::VertexAuxContainer#VrtSecInclusive_SecondaryVertices" + wp +
"Aux."]
1079 for wp
in LLP1NewVSISuffixes:
1080 StaticContent += [
"xAOD::VertexContainer#NewVrtSecInclusive_SecondaryVertices" + wp]
1081 StaticContent += [
"xAOD::VertexAuxContainer#NewVrtSecInclusive_SecondaryVertices" + wp +
"Aux." + excludedVertexAuxData]
1083 StaticContent += [
"xAOD::VertexContainer#MuSAVertices"]
1084 StaticContent += [
"xAOD::VertexAuxContainer#MuSAVerticesAux."]
1085 StaticContent += [
"xAOD::TrackParticleContainer#MuSAExtrapolatedTrackParticles"]
1086 StaticContent += [
"xAOD::TrackParticleAuxContainer#MuSAExtrapolatedTrackParticlesAux."]
1088 if flags.Derivation.LLP.doMuSAValidation:
1089 StaticContent += [
"xAOD::VertexContainer#JPsiMuSAVertices"]
1090 StaticContent += [
"xAOD::VertexAuxContainer#JPsiMuSAVerticesAux."]
1091 StaticContent += [
"xAOD::VertexContainer#JPsiVertices"]
1092 StaticContent += [
"xAOD::VertexAuxContainer#JPsiVerticesAux."]
1093 StaticContent += [
"xAOD::TrackParticleContainer#JPsiVerticesTracks"]
1094 StaticContent += [
"xAOD::TrackParticleAuxContainer#JPsiVerticesTracksAux."]
1095 StaticContent += [
"xAOD::TrackParticleContainer#JPsiMuSAExtrapolatedTrackParticles"]
1096 StaticContent += [
"xAOD::TrackParticleAuxContainer#JPsiMuSAExtrapolatedTrackParticlesAux."]
1097 StaticContent += [
"xAOD::VertexContainer#ValidationMuSAVertices"]
1098 StaticContent += [
"xAOD::VertexAuxContainer#ValidationMuSAVerticesAux."]
1099 StaticContent += [
"xAOD::TrackParticleContainer#ValidationMuSAExtrapolatedTrackParticles"]
1100 StaticContent += [
"xAOD::TrackParticleAuxContainer#ValidationMuSAExtrapolatedTrackParticlesAux."]
1102 LLP1SlimmingHelper.ExtraVariables += [
"Electrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1103 "Photons.DFCommonPhotonsIsEMMedium.DFCommonPhotonsIsEMMediumIsEMValue.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1104 "Muons.meanDeltaADCCountsMDT",
1105 "egammaClusters.phi_sampl.eta0.phi0",
1106 "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",
1107 "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",
1108 "TruthPrimaryVertices.t.x.y.z.sumPt2",
1109 "PrimaryVertices.t.x.y.z.sumPt2.covariance",
1110 "InDetTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1111 "InDetTrackParticles.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.numberOfTRTHits.numberOfTRTOutliers",
1112 "InDetTrackParticles.numberOfIBLOverflowsdEdx.numberOfUsedHitsdEdx.pixeldEdx",
1113 "InDetTrackParticles.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit.numberOfNextToInnermostPixelLayerHits.numberOfContribPixelLayers.numberOfGangedFlaggedFakes.numberOfPixelOutliers.numberOfPixelSplitHits.numberOfPixelSpoiltHits",
1114 "InDetTrackParticles.numberOfSCTOutliers.numberOfSCTSpoiltHits",
1115 "InDetTrackParticles.numberOfTRTHoles.numberOfTRTDeadStraws.numberOfTRTSharedHits.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdHitsTotal.numberOfTRTHighThresholdOutliers.TRTdEdx.TRTdEdxUsedHits.hitPattern",
1116 "InDetTrackParticles.truthMatchProbability.truthClassification.truthOrigin.truthType",
1117 "InDetTrackParticles.TrkIsoPtPdEdx_ptcone20.TrkIsoPtPdEdx_ptcone30.TrkIsoPtPdEdx_ptcone40.TrkIsoPtTightPdEdx_ptcone20.TrkIsoPtTightPdEdx_ptcone30.TrkIsoPtTightPdEdx_ptcone40",
1118 "InDetTrackParticles.LLP1_ptcone20.LLP1_ptcone30.LLP1_ptcone40.LLP1_ptvarcone20.LLP1_ptvarcone30.LLP1_ptvarcone40.definingParametersCovMatrixDiag.definingParametersCovMatrixOffDiag",
1119 "InDetTrackParticles.LLP1_topoetcone20.LLP1_topoetcone30.LLP1_topoetcone40.LLP1_topoetcone20NonCoreCone.LLP1_topoetcone30NonCoreCone.LLP1_topoetcone40NonCoreCone",
1120 "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",
1121 "InDetTrackParticles.Reco_msosLink",
1123 "InDetLargeD0TrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.hitPattern.patternRecoInfo",
1124 "GSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthClassification.truthOrigin.truthType",
1125 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1126 "EventInfo.GenFiltHT.GenFiltMET.GenFiltHTinclNu.GenFiltPTZ.GenFiltFatJ",
1127 "EventInfo.hardScatterVertexLink.timeStampNSOffset",
1128 "EventInfo.DFCommonJets_eventClean_SuperLooseBadLLP.DFCommonJets_eventClean_SuperLooseBadLLP_EMTopo.DFCommonJets_eventClean_LooseBadLLP_EMTopo",
1129 "TauJets.dRmax.etOverPtLeadTrk.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z",
1130 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET.ex.ey",
1131 "HLT_xAOD__TrigMissingETContainer_TrigEFMissingET_mht.ex.ey"]
1132 if flags.Tracking.doLargeD0:
1133 LLP1SlimmingHelper.ExtraVariables += [
1134 "LRTElectrons.LHValue.DFCommonElectronsLHVeryLooseNoPixResult.maxEcell_time.maxEcell_energy.maxEcell_gain.maxEcell_onlId.maxEcell_x.maxEcell_y.maxEcell_z.f3",
1135 "LRTegammaClusters.phi_sampl.eta0.phi0",
1136 "LRTGSFTrackParticles.d0.z0.vz.TTVA_AMVFVertices.TTVA_AMVFWeights.eProbabilityHT.truthParticleLink.truthMatchProbability.radiusOfFirstHit.numberOfPixelHoles.numberOfSCTHoles.numberDoF.chiSquared.hitPattern.truthOrigin.truthType",
1137 "AntiKt4EMTopoJets.GhostTrackLRT.GhostTrackLRTCount",
1142 LLP1SlimmingHelper.ExtraVariables += [
"Muons.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1143 "Electrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1144 "Photons.topoetcone20_CloseByCorr_LRT.topoetcone40_CloseByCorr_LRT.ptcone20_CloseByCorr_LRT"]
1145 if flags.Tracking.doLargeD0:
1146 LLP1SlimmingHelper.ExtraVariables += [
1147 "MuonsLRT.topoetcone20_CloseByCorr_LRT.neflowisol20_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt500_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVA_pt1000_CloseByCorr_LRT",
1148 "LRTElectrons.topoetcone20_CloseByCorr_LRT.ptcone20_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT.ptvarcone30_Nonprompt_All_MaxWeightTTVALooseCone_pt1000_CloseByCorr_LRT",
1149 "TauJetsLRT.GNdTauScore.GNdTauProbTau.GNdTauProbJet"]
1152 "is_selected",
"is_associated",
"is_svtrk_final",
"pt_wrtSV",
"eta_wrtSV",
1153 "phi_wrtSV",
"d0_wrtSV",
"z0_wrtSV",
"errP_wrtSV",
"errd0_wrtSV",
1154 "errz0_wrtSV",
"chi2_toSV"
1157 for suffix
in LLP1VrtSecInclusiveSuffixes + LLP1NewVSISuffixes:
1158 LLP1SlimmingHelper.ExtraVariables += [
"InDetTrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1159 LLP1SlimmingHelper.ExtraVariables += [
"GSFTrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1160 if flags.Tracking.doLargeD0:
1161 LLP1SlimmingHelper.ExtraVariables += [
"InDetLargeD0TrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1162 LLP1SlimmingHelper.ExtraVariables += [
"LRTGSFTrackParticles." +
'.'.join( [ var + suffix
for var
in VSITrackAuxVars] ) ]
1164 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')
1165 LLP1SlimmingHelper.AppendToDictionary[
"EMOriginTopoClusters"]=
'xAOD::CaloClusterContainer'
1166 LLP1SlimmingHelper.AppendToDictionary[
"EMOriginTopoClustersAux"]=
'xAOD::ShallowAuxContainer'
1167 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')
1171 if flags.Input.isMC:
1173 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import addTruth3ContentToSlimmerTool
1174 addTruth3ContentToSlimmerTool(LLP1SlimmingHelper)
1175 LLP1SlimmingHelper.AllVariables += [
'TruthHFWithDecayParticles',
'TruthHFWithDecayVertices',
'TruthCharm',
'TruthPileupParticles',
'InTimeAntiKt4TruthJets',
'OutOfTimeAntiKt4TruthJets',
'AntiKt4TruthJets']
1176 LLP1SlimmingHelper.ExtraVariables += [
"Electrons.TruthLink",
1178 "Photons.TruthLink"]
1179 if flags.Tracking.doLargeD0:
1180 LLP1SlimmingHelper.ExtraVariables += [
"LRTElectrons.TruthLink",
1181 "MuonsLRT.TruthLink"]
1183 if flags.Derivation.LLP.saveFullTruth:
1184 LLP1SlimmingHelper.ExtraVariables += [
'TruthParticles',
'TruthVertices',
1185 'AntiKt10TruthSoftDropBeta100Zcut10Jets.constituentLinks',
1186 'AntiKt4TruthDressedWZJets.constituentLinks']
1187 StaticContent += [
"xAOD::JetContainer#AntiKt10TruthRCJets",
"xAOD::JetAuxContainer#AntiKt10TruthRCJetsAux.-PseudoJet"]
1190 StaticContent += [
"xAOD::MuonContainer#ZeroPixelHitMuons",
"xAOD::MuonAuxContainer#ZeroPixelHitMuonsAux."]
1192 from DerivationFrameworkEGamma.PhotonsCPDetailedContent
import (
1193 PhotonsCPDetailedContent,
1195 LLP1SlimmingHelper.ExtraVariables += PhotonsCPDetailedContent
1198 from DerivationFrameworkJetEtMiss.JetCommonConfig
import addOriginCorrectedClustersToSlimmingTool
1199 addOriginCorrectedClustersToSlimmingTool(LLP1SlimmingHelper,writeLC=
True,writeEM=
True)
1200 LLP1SlimmingHelper.StaticContent = StaticContent
1203 LLP1SlimmingHelper.IncludeTriggerNavigation =
False
1204 LLP1SlimmingHelper.IncludeJetTriggerContent =
False
1205 LLP1SlimmingHelper.IncludeMuonTriggerContent =
False
1206 LLP1SlimmingHelper.IncludeEGammaTriggerContent =
False
1207 LLP1SlimmingHelper.IncludeTauTriggerContent =
False
1208 LLP1SlimmingHelper.IncludeEtMissTriggerContent =
False
1209 LLP1SlimmingHelper.IncludeBJetTriggerContent =
False
1210 LLP1SlimmingHelper.IncludeBPhysTriggerContent =
False
1211 LLP1SlimmingHelper.IncludeMinBiasTriggerContent =
False
1215 if flags.Trigger.EDMVersion == 2:
1216 from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import AddRun2TriggerMatchingToSlimmingHelper
1217 from DerivationFrameworkLLP.LLPToolsConfig
import LLP1TriggerMatchingToolRun2Cfg
1218 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1219 OutputContainerPrefix =
"TrigMatch_",
1220 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesTau)
1221 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1222 OutputContainerPrefix =
"TrigMatch_",
1223 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau)
1225 acc.merge(LLP1TriggerMatchingToolRun2Cfg(flags,
1226 name =
"LRTTriggerMatchingTool_LLP1",
1227 OutputContainerPrefix =
"LRTTrigMatch_LLP1_",
1228 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1229 InputElectrons=MergedElectronContainer,
1230 InputMuons=MergedMuonContainer_wZPH
1233 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = LLP1SlimmingHelper,
1234 OutputContainerPrefix =
"LRTTrigMatch_LLP1_",
1235 TriggerList = LLP1TriggerListsHelper.Run2TriggerNamesNoTau,
1236 InputElectrons=MergedElectronContainer,
1237 InputMuons=MergedMuonContainer_wZPH
1240 if flags.Trigger.EDMVersion == 3
or (flags.Trigger.EDMVersion == 2
and flags.Trigger.doEDMVersionConversion):
1241 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import AddRun3TrigNavSlimmingCollectionsToSlimmingHelper
1242 AddRun3TrigNavSlimmingCollectionsToSlimmingHelper(LLP1SlimmingHelper)
1245 LLP1ItemList = LLP1SlimmingHelper.GetItemList()
1246 acc.merge(OutputStreamCfg(flags,
"DAOD_LLP1", ItemList=LLP1ItemList, AcceptAlgs=[
"LLP1Kernel"]))
1247 acc.merge(SetupMetaDataForStreamCfg(flags,
"DAOD_LLP1", AcceptAlgs=[
"LLP1Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))