12 acc = ComponentAccumulator()
13 acc.flagPerfmonDomain(
'Truth')
14 theTruthMetaDataWriter = CompFactory.DerivationFramework.TruthMetaDataWriter(name)
15 acc.addPublicTool(theTruthMetaDataWriter)
16 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
17 acc.addEventAlgo(CommonAugmentation(f
"{name}Kernel", AugmentationTools = [theTruthMetaDataWriter]))
21 """Conversion of HepMC to xAOD truth"""
22 acc = ComponentAccumulator()
23 acc.flagPerfmonDomain(
'Truth')
25 if flags.Input.isMC
is False and flags.Overlay.DataOverlay
is False:
26 raise RuntimeError(
"Common MC truth building requested for non-MC input")
33 if "EventInfo#McEventInfo" in flags.Input.TypedCollections
and "xAOD::EventInfo#EventInfo" not in flags.Input.TypedCollections:
34 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
35 acc.merge(EventInfoCnvAlgCfg(flags, inputKey=
"McEventInfo", outputKey=
"Input_EventInfo", disableBeamSpot=
True))
37 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoUpdateFromContextAlgCfg
38 acc.merge(EventInfoUpdateFromContextAlgCfg(flags, disableBeamSpot=
True))
42 from xAODTruthCnv.xAODTruthCnvConfig
import GEN_EVNT2xAODCfg
43 if "McEventCollection#GEN_EVENT" in flags.Input.TypedCollections:
44 acc.merge(GEN_EVNT2xAODCfg(flags,name=
"GEN_EVNT2xAOD",AODContainerName=
"GEN_EVENT"))
47 elif "McEventCollection#TruthEvent" in flags.Input.TypedCollections:
48 acc.merge(GEN_EVNT2xAODCfg(flags,name=
"GEN_EVNT2xAOD",AODContainerName=
"TruthEvent"))
52 elif "xAOD::TruthEventContainer#TruthEvents" in flags.Input.TypedCollections:
55 raise RuntimeError(
"No recognised HepMC truth information found in the input")
58 if "TruthMetaDataContainer#TruthMetaData" not in flags.Input.TypedCollections
and not isEVNT:
68 acc = ComponentAccumulator()
69 acc.flagPerfmonDomain(
'Truth')
70 from JetRecConfig.StandardSmallRJets
import AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ,AntiKtVRTruthCharged
71 from JetRecConfig.StandardLargeRJets
import AntiKt10TruthSoftDrop
72 from JetRecConfig.JetRecConfig
import JetRecCfg
74 inputCollections =
set(flags.Input.Collections)
75 jetList = [AntiKt4Truth,AntiKt4TruthWZ,AntiKt4TruthDressedWZ,AntiKtVRTruthCharged,
76 AntiKt10TruthSoftDrop]
80 expectedName = jd.fullname().encode(
"utf-8")
81 if expectedName
in inputCollections:
83 acc.merge(JetRecCfg(flags, jd))
114 acc.flagPerfmonDomain(
'Truth')
115 augmentationToolsList = []
120 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import ( DFCommonTruthElectronDressingToolCfg,
121 DFCommonTruthMuonDressingToolCfg, DFCommonTruthMuonToolCfg, DFCommonTruthElectronToolCfg,
122 DFCommonTruthPhotonToolSimCfg, DFCommonTruthNeutrinoToolCfg, DFCommonTruthBottomToolCfg, DFCommonTruthTopToolCfg,
123 DFCommonTruthBosonToolCfg, DFCommonTruthBSMToolCfg, DFCommonTruthForwardProtonToolCfg, DFCommonTruthElectronIsolationTool1Cfg,
124 DFCommonTruthElectronIsolationTool2Cfg, DFCommonTruthMuonIsolationTool1Cfg, DFCommonTruthMuonIsolationTool2Cfg,
125 DFCommonTruthPhotonIsolationTool1Cfg, DFCommonTruthPhotonIsolationTool2Cfg, DFCommonTruthPhotonIsolationTool3Cfg )
128 for item
in [ DFCommonTruthMuonToolCfg, DFCommonTruthElectronToolCfg,
129 DFCommonTruthPhotonToolSimCfg, DFCommonTruthNeutrinoToolCfg, DFCommonTruthBottomToolCfg, DFCommonTruthTopToolCfg,
130 DFCommonTruthBosonToolCfg, DFCommonTruthBSMToolCfg, DFCommonTruthElectronIsolationTool1Cfg,
131 DFCommonTruthElectronIsolationTool2Cfg, DFCommonTruthMuonIsolationTool1Cfg, DFCommonTruthMuonIsolationTool2Cfg,
132 DFCommonTruthPhotonIsolationTool1Cfg, DFCommonTruthPhotonIsolationTool2Cfg, DFCommonTruthPhotonIsolationTool3Cfg]:
133 augmentationToolsList.append(acc.getPrimaryAndMerge(item(flags)))
134 augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthForwardProtonToolCfg(flags)))
136 if 'decorationDressing' in kwargs:
137 augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthElectronDressingToolCfg(flags, decorationName = kwargs[
'decorationDressing'])))
138 augmentationToolsList.append(acc.getPrimaryAndMerge(DFCommonTruthMuonDressingToolCfg(flags, decorationName = kwargs[
'decorationDressing'])))
140 for i, tool
in enumerate(augmentationToolsList):
141 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(name =
"MCTruthCommonPreJetKernelNo{num}".format(num = i+1), AugmentationTools = [tool]))
148 acc = ComponentAccumulator()
149 acc.flagPerfmonDomain(
'Truth')
152 from DerivationFrameworkTau.TauTruthCommonConfig
import TauTruthToolsCfg
153 acc.merge(TauTruthToolsCfg(flags))
154 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import DFCommonTruthTauDressingToolCfg
155 augmentationToolsList = [ acc.getPrimaryAndMerge(DFCommonTruthTauDressingToolCfg(flags)) ]
158 from DerivationFrameworkMCTruth.GenFilterToolConfig
import GenFilterToolCfg
160 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import DFCommonTruthDressedWZQGLabelToolCfg
161 augmentationToolsList += [ acc.addPublicTool(acc.popToolsAndMerge(GenFilterToolCfg(flags))),
162 acc.getPrimaryAndMerge(DFCommonTruthDressedWZQGLabelToolCfg(flags))]
165 from DerivationFrameworkSUSY.DecorateSUSYProcessConfig
import IsSUSYSignalRun3
166 if IsSUSYSignalRun3(flags):
167 from DerivationFrameworkSUSY.DecorateSUSYProcessConfig
import SUSYSignalTaggerCfg
168 augmentationToolsList += [ acc.getPrimaryAndMerge(SUSYSignalTaggerCfg(flags,
'MCTruthCommon')) ]
170 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
171 for i, tool
in enumerate(augmentationToolsList):
172 acc.addEventAlgo(CommonAugmentation(name =
"MCTruthCommonPostJetKernelNo{num}".format(num = i+1),
173 AugmentationTools = [tool]))
176 if IsSUSYSignalRun3(flags):
177 from DerivationFrameworkSUSY.SUSYWeightMetadataConfig
import AddSUSYWeightsCfg
178 acc.merge(AddSUSYWeightsCfg(flags))
184 decorationDressing='dressedPhoton',
185 includeTausInDressingPhotonRemoval=False,
186 navInputCollections = ["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos", "TruthBSM", "TruthBottom", "TruthTop", "TruthBoson"],
189 acc = ComponentAccumulator()
190 acc.flagPerfmonDomain(
'Truth')
196 if "McEventCollection#GEN_EVENT" in flags.Input.TypedCollections: isEVNT =
True
205 if includeTausInDressingPhotonRemoval:
206 acc.getPublicTool(
"DFCommonTruthTauDressingTool").decorationName=decorationDressing+
"_tau"
226 collection_prefix=None,
227 rejectHadronChildren=False):
228 """Configure tools for adding immediate parents and descendants"""
229 acc = ComponentAccumulator()
230 acc.flagPerfmonDomain(
'Truth')
231 collection_name=collection_prefix+
'WithDecay' if collection_prefix
is not None else 'Truth'+prefix+
'WithDecay'
233 collection_maker = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(flags,
234 name =
'DFCommon'+prefix+
'AndDecaysTool',
235 NewParticleKey = collection_name+
'Particles',
236 NewVertexKey = collection_name+
'Vertices',
237 PDGIDsToKeep = parents,
238 Generations = generations,
239 RejectHadronChildren = rejectHadronChildren))
240 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
241 kernel_name =
'MCTruthCommon'+prefix+
'AndDecaysKernel'
242 acc.addEventAlgo(CommonAugmentation(kernel_name, AugmentationTools = [collection_maker] ))
314 """Add b/c-hadrons and their downstream particles"""
315 kwargs.setdefault(
"addB",
True)
316 kwargs.setdefault(
"addC",
True)
317 kwargs.setdefault(
"generations",-1)
318 kwargs.setdefault(
"prefix",
'')
321 collection_name = kwargs[
'prefix']+
"TruthHFWithDecay"
322 DFCommonHFAndDecaysTool = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(
324 name=kwargs[
'prefix']+
"DFCommonHFAndDecaysTool",
325 NewParticleKey = collection_name+
'Particles',
326 NewVertexKey = collection_name+
'Vertices',
327 KeepBHadrons=kwargs[
'addB'],
328 KeepCHadrons=kwargs[
'addC'],
329 Generations=kwargs[
'generations']))
330 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
331 kwargs[
'prefix']+
"MCTruthCommonHFAndDecaysKernel",
332 AugmentationTools = [DFCommonHFAndDecaysTool] ))
351 """Truth augmentations of DAOD_PHYS that need only the truth record"""
352 acc = ComponentAccumulator()
353 acc.flagPerfmonDomain(
'Truth')
355 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import DFCommonTruthCharmToolCfg
356 PhysCommonTruthCharmTool = acc.getPrimaryAndMerge(DFCommonTruthCharmToolCfg(
358 name =
"PhysCommonTruthCharmTool"))
359 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
360 acc.addEventAlgo(CommonAugmentation(
"PhysCommonTruthCharmKernel",AugmentationTools=[PhysCommonTruthCharmTool]))
367 """Truth content that DAOD_PHYS adds to AddPhysTruthContentsCfg: HF classification,
368 Higgs truth categories, tau decay collections"""
369 acc = ComponentAccumulator()
370 acc.flagPerfmonDomain(
'Truth')
371 from DerivationFrameworkMCTruth.HFClassificationCommonConfig
import HFClassificationCommonCfg
372 acc.merge(HFClassificationCommonCfg(flags))
373 from DerivationFrameworkHiggs.TruthCategoriesConfig
import TruthCategoriesDecoratorCfg
374 acc.merge(TruthCategoriesDecoratorCfg(flags))
407def AddTruthCollectionNavigationDecorationsCfg(flags, TruthCollections=[], prefix=''):
408 """Tool to add navigation decorations on the truth collections"""
409 acc = ComponentAccumulator()
410 acc.flagPerfmonDomain('Truth')
411 if len(TruthCollections) > 0:
412 # Set up a tool to add the navigation decorations
413 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthNavigationDecoratorCfg
414 DFCommonTruthNavigationDecorator = acc.getPrimaryAndMerge(TruthNavigationDecoratorCfg(flags,
415 name = prefix+'DFCommonTruthNavigationDecorator',
416 InputCollections = TruthCollections))
417 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
418 acc.addEventAlgo(CommonAugmentation(prefix+"MCTruthNavigationDecoratorKernel",
419 AugmentationTools = [DFCommonTruthNavigationDecorator] ))
422# Add BSM particles and their downstream particles (immediate and further decay products) in a special collection
423def AddBSMAndDownstreamParticlesCfg(flags, generations=-1):
424 """Add BSM particles and their downstream particles in a special collection"""
425 acc = ComponentAccumulator()
426 acc.flagPerfmonDomain('Truth')
427 # Set up a tool to keep the taus and all downstream particles
428 collection_name = "TruthBSMWithDecay"
429 DFCommonBSMAndDecaysTool = acc.getPrimaryAndMerge(TruthDecayCollectionMakerCfg(flags,
430 name = "DFCommonBSMAndDecaysTool",
431 NewParticleKey = collection_name+'Particles',
432 NewVertexKey = collection_name+'Vertices',
434 Generations = generations))
435 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
436 acc.addEventAlgo(CommonAugmentation(name = "MCTruthCommonBSMAndDecaysKernel",
437 AugmentationTools = [DFCommonBSMAndDecaysTool] ))
440# Add a mini-collection for the born leptons
441def AddBornLeptonCollectionCfg(flags):
442 """Add born leptons as a mini collection"""
443 acc = ComponentAccumulator()
444 acc.flagPerfmonDomain('Truth')
445 # Set up a tool to keep the taus and all downstream particles
446 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthBornLeptonCollectionMakerCfg
447 DFCommonBornLeptonCollTool = acc.getPrimaryAndMerge(TruthBornLeptonCollectionMakerCfg(flags,
448 name = "DFCommonBornLeptonCollTool",
449 NewCollectionName ="BornLeptons"))
450 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
451 acc.addEventAlgo(CommonAugmentation("MCTruthCommonBornLeptonsKernel", AugmentationTools = [DFCommonBornLeptonCollTool] ))
454def AddLargeRJetD2Cfg(flags):
455 """Add large-R jet D2 variable"""
456 #Extra classifier for D2 variable
457 acc = ComponentAccumulator()
458 acc.flagPerfmonDomain('Truth')
459 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthD2DecoratorCfg
460 theTruthD2Decorator = acc.getPrimaryAndMerge(TruthD2DecoratorCfg(flags,
461 name = "TruthD2Decorator",
462 JetContainerKey = "AntiKt10TruthSoftDropBeta100Zcut10Jets",
463 DecorationName = "D2"))
464 TruthD2DecoratorKernel = CompFactory.DerivationFramework.CommonAugmentation
465 acc.addEventAlgo(TruthD2DecoratorKernel("TRUTHD2Kernel", AugmentationTools = [theTruthD2Decorator] ))
482def DFCommonTruthCentralEDAlgCfg(flags):
484 acc = ComponentAccumulator()
485 acc.flagPerfmonDomain('Truth')
486 from EventShapeTools.EventDensityConfig import configEventDensityTool
487 from JetRecConfig.StandardJetConstits import stdConstitDic as cst
488 DFCommonTruthCentralEDTool = configEventDensityTool("DFCommonTruthCentralEDTool",
491 AbsRapidityMax = 1.5,
492 OutputContainer = "TruthIsoCentralEventShape",
494 acc.addEventAlgo(CompFactory.EventDensityAthAlg("DFCommonTruthCentralEDAlg",
495 EventDensityTool = DFCommonTruthCentralEDTool ))
499def DFCommonTruthForwardEDAlgCfg(flags):
501 acc = ComponentAccumulator()
502 acc.flagPerfmonDomain('Truth')
503 from EventShapeTools.EventDensityConfig import configEventDensityTool
504 from JetRecConfig.StandardJetConstits import stdConstitDic as cst
505 DFCommonTruthForwardEDTool = configEventDensityTool("DFCommonTruthForwardEDTool",
508 AbsRapidityMin = 1.5,
509 AbsRapidityMax = 3.0,
510 OutputContainer = "TruthIsoForwardEventShape",
512 acc.addEventAlgo(CompFactory.EventDensityAthAlg("DFCommonTruthForwardEDAlg",
513 EventDensityTool = DFCommonTruthForwardEDTool ))
517def AddTruthEnergyDensityCfg(flags):
518 """Truth energy density tools"""
519 acc = ComponentAccumulator()
520 acc.flagPerfmonDomain('Truth')
521 # Algorithms for the energy density - needed only if e/gamma hasn't set things up already
522 acc.merge(DFCommonTruthCentralEDAlgCfg(flags))
523 acc.merge(DFCommonTruthForwardEDAlgCfg(flags))
525 DFCommonTruthEDKernel = CompFactory.DerivationFramework.CommonAugmentation("DFCommonTruthEDKernel",
527 [acc.addPublicTool(acc.popToolsAndMerge(DFCommonTruthEDDecoratorCfg(flags)))] )
528 acc.addEventAlgo(DFCommonTruthEDKernel)
532# Sets up modifiers to move pointers to old truth collections to new mini truth collections
533def AddMiniTruthCollectionLinksCfg(flags, **kwargs):
534 """Tool to move pointers to new mini truth collections"""
535 acc = ComponentAccumulator()
536 acc.flagPerfmonDomain('Truth')
537 kwargs.setdefault("doElectrons",True)
538 kwargs.setdefault("doPhotons",True)
539 kwargs.setdefault("doMuons",True)
541 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig import TruthLinkRepointToolCfg
542 if kwargs['doElectrons']:
543 electron_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
545 name="ElMiniCollectionTruthLinkTool",
546 RecoCollection="Electrons",
547 TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
548 aug_tools += [ electron_relink ]
549 if kwargs['doPhotons']:
550 photon_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
552 name="PhMiniCollectionTruthLinkTool",
553 RecoCollection="Photons",
554 TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
555 aug_tools += [ photon_relink ]
556 if kwargs['doMuons']:
557 muon_relink = acc.getPrimaryAndMerge(TruthLinkRepointToolCfg(
559 name="MuMiniCollectionTruthLinkTool",
560 RecoCollection="Muons",
561 TargetCollections=["TruthMuons","TruthPhotons","TruthElectrons"]))
562 aug_tools += [ muon_relink ]
563 for i, tool in enumerate(aug_tools):
564 acc.addEventAlgo(CompFactory.DerivationFramework.CommonAugmentation(
565 "MiniCollectionTruthLinkKernelNo{num}".format(num=i+1),
566 AugmentationTools = [tool] ))
570def addTruth3ContentToSlimmerTool(slimmer, reduced=False):
571 slimmer.ExtraVariables += [
572 f"AntiKt4TruthDressedWZJets.GhostCHadronsFinalCount.GhostBHadronsFinalCount.pt.eta.phi.m.numConstit.HadronConeExclTruthLabelID.HadronConeExclExtendedTruthLabelID.{'HadronConeExclTruthLabelPdgId.HadronGhostTruthLabelID.HadronGhostExtendedTruthLabelID.' if not reduced else ''}PartonTruthLabelID.TrueFlavor",
573 "AntiKt10TruthSoftDropBeta100Zcut10Jets.pt.eta.phi.m.Tau1_wta.Tau2_wta.Tau3_wta.D2.numConstit",
574 "TruthEvents.Q.XF1.XF2.PDGID1.PDGID2.PDFID1.PDFID2.X1.X2.crossSection",
575 "MET_Truth.mpx.mpy.sumet.name.source",
576 "TruthElectrons.prodVtxLink.decayVtxLink.parentLinks.childLinks.m.px.py.pz.e.pdgId.ptcone30.etcone20.classifierParticleOrigin.Classification.status.classifierParticleType.classifierParticleOutCome.polarizationPhi.polarizationTheta.e_dressed.pt_dressed.eta_dressed.phi_dressed.nPhotons_dressed.uid",
577 "TruthMuons.m.px.py.pz.e.pdgId.status.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.e_dressed.pt_dressed.eta_dressed.phi_dressed.nPhotons_dressed.ptcone30.etcone20.decayVtxLink.prodVtxLink.parentLinks.childLinks.polarizationPhi.polarizationTheta.uid",
578 "TruthPhotons.m.px.py.pz.e.pdgId.status.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.ptcone20.etcone20.etcone40.prodVtxLink.decayVtxLink.parentLinks.childLinks.polarizationPhi.polarizationTheta.uid",
579 "TruthTaus.prodVtxLink.decayVtxLink.parentLinks.childLinks.m.px.py.pz.e.pdgId.classifierParticleOrigin.Classification.pt_vis.eta_vis.phi_vis.m_vis.status.classifierParticleType.classifierParticleOutCome.originalTruthParticle.polarizationPhi.polarizationTheta.pt_vis_dressed.eta_vis_dressed.phi_vis_dressed.m_vis_dressed.nPhotons_dressed.numCharged.numChargedPion.numNeutral.numNeutralPion.IsHadronicTau.pt_invis.eta_invis.phi_invis.m_invis.pt_vis_neutral.eta_vis_neutral.phi_vis_neutral.m_vis_neutral.DecayModeVector.decay_vertex_x.decay_vertex_y.decay_vertex_z.prod_vertex_x.prod_vertex_y.prod_vertex_z.uid",
580 "TruthNeutrinos.m.px.py.pz.e.pdgId.status.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.prodVtxLink.decayVtxLink.parentLinks.childLinks.polarizationPhi.polarizationTheta.uid",
581 "TruthBSM.childLinks.Classification.classifierParticleOrigin.classifierParticleOutCome.classifierParticleType.decayVtxLink.e.m.parentLinks.pdgId.polarizationPhi.polarizationTheta.prodVtxLink.px.py.pz.status.uid",
582 "TruthBottom.m.px.py.pz.e.pdgId.status.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.prodVtxLink.decayVtxLink.parentLinks.childLinks.polarizationPhi.polarizationTheta.uid",
583 "TruthTop.m.px.py.pz.e.pdgId.status.prodVtxLink.decayVtxLink.parentLinks.childLinks.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.polarizationPhi.polarizationTheta.uid",
584 "TruthBoson.m.px.py.pz.e.pdgId.status.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.prodVtxLink.decayVtxLink.parentLinks.childLinks.polarizationPhi.polarizationTheta.uid",
585 "TruthForwardProtons.m.px.py.pz.e.pdgId.status.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.prodVtxLink.decayVtxLink.polarizationPhi.polarizationTheta.uid",
586 "BornLeptons.prodVtxLink.decayVtxLink.m.px.py.pz.e.pdgId.classifierParticleOrigin.Classification.status.classifierParticleType.classifierParticleOutCome.polarizationPhi.polarizationTheta.uid",
587 "TruthBosonsWithDecayParticles.m.px.py.pz.e.pdgId.status.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.Classification.id.x.y.z.t.prodVtxLink.decayVtxLink.incomingParticleLinks.outgoingParticleLinks.uid",
588 "TruthBosonsWithDecayVertices.id.x.y.z.t.prodVtxLink.decayVtxLink.incomingParticleLinks.outgoingParticleLinks.uid.status",
589 "TruthBSMWithDecayParticles.Classification.classifierParticleOrigin.classifierParticleOutCome.classifierParticleType.decayVtxLink.e.m.pdgId.prodVtxLink.px.py.pz.status.uid",
590 "TruthBSMWithDecayVertices.id.incomingParticleLinks.outgoingParticleLinks.t.x.y.z.uid"
594# Truth slimming of DAOD_PHYS that needs only the truth record
595def addPhysTruthContentToSlimmerTool(slimmer):
596 addTruth3ContentToSlimmerTool(slimmer)
597 slimmer.AllVariables += ['TruthLHEParticles']
598 slimmer.ExtraVariables += [
599 "AntiKt4TruthDressedWZJets.IsoFixedCone5Pt.HFHadronOriginID",
600 # Truth large-R jets: PHYS gets these from the smart slimming of the reco UFO large-R jets
601 # (AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent.py), which TRUTH3 does not have
602 "AntiKt10TruthSoftDropBeta100Zcut10Jets.pt.eta.phi.m.Parent.numConstit.D2.Tau1_wta.Tau2_wta.Tau3_wta.Qw.GhostCHadronsFinalCount.GhostBHadronsFinalCount",
603 "AntiKt10TruthJets.pt.eta.phi.m.numConstit.Split12.Split23.GhostCHadronsFinalCount.GhostBHadronsFinalCount",
604 "TruthPrimaryVertices.t.x.y.z",
605 "TruthHFWithDecayParticles.prodVtxLink.prodVtxLink.prodVtxLink.decayVtxLink.decayVtxLink.decayVtxLink.parentLinks.childLinks.m.px.py.pz.e.pdgId.Classification.uid.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.status",
606 "TruthHFWithDecayVertices.incomingParticleLinks.outgoingParticleLinks.uid.status.x.y.z.t",
607 "TruthCharm.prodVtxLink.prodVtxLink.prodVtxLink.decayVtxLink.decayVtxLink.decayVtxLink.parentLinks.childLinks.m.px.py.pz.e.pdgId.Classification.uid.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.status.polarizationPhi.polarizationTheta",
608 "TruthTausWithDecayParticles.prodVtxLink.prodVtxLink.prodVtxLink.decayVtxLink.decayVtxLink.decayVtxLink.m.px.py.pz.e.pdgId.Classification.uid.classifierParticleOrigin.classifierParticleType.classifierParticleOutCome.status",
609 "TruthTausWithDecayVertices.incomingParticleLinks.outgoingParticleLinks.uid.status.x.y.z.t"
AddStandardTruthContentsCfg(flags, decorationDressing='dressedPhoton', includeTausInDressingPhotonRemoval=False, navInputCollections=["TruthElectrons", "TruthMuons", "TruthPhotons", "TruthTaus", "TruthNeutrinos", "TruthBSM", "TruthBottom", "TruthTop", "TruthBoson"], prefix='')