ATLAS Offline Software
Functions
python.TRUTH3 Namespace Reference

Functions

def TRUTH3Cfg (flags)
 

Function Documentation

◆ TRUTH3Cfg()

def python.TRUTH3.TRUTH3Cfg (   flags)
Main config for TRUTH3

Definition at line 8 of file TRUTH3.py.

8 def TRUTH3Cfg(flags):
9  """Main config for TRUTH3"""
10  acc = ComponentAccumulator()
11 
12  # Add translator from EVGEN input to xAOD-like truth
13  # Add all the particle derivation tools
14  # This sets up its own common kernel and adds the common tools to it
15  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddStandardTruthContentsCfg
16  acc.merge(AddStandardTruthContentsCfg(flags))
17 
18  #==============================================================================
19  # Set up slimming content list
20  #==============================================================================
21  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
22  TRUTH3SlimmingHelper = SlimmingHelper("TRUTH3SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
23 
24  TRUTH3SlimmingHelper.AppendToDictionary = {'EventInfo':'xAOD::EventInfo','EventInfoAux':'xAOD::EventAuxInfo',
25  'TruthEvents':'xAOD::TruthEventContainer','TruthEventsAux':'xAOD::TruthEventAuxContainer',
26  'MET_Truth':'xAOD::MissingETContainer','MET_TruthAux':'xAOD::MissingETAuxContainer',
27  'TruthLHEParticles':'xAOD::TruthParticleContainer', 'TruthLHEParticlesAux':'xAOD::TruthParticleAuxContainer',
28  'TruthElectrons':'xAOD::TruthParticleContainer','TruthElectronsAux':'xAOD::TruthParticleAuxContainer',
29  'TruthMuons':'xAOD::TruthParticleContainer','TruthMuonsAux':'xAOD::TruthParticleAuxContainer',
30  'TruthPhotons':'xAOD::TruthParticleContainer','TruthPhotonsAux':'xAOD::TruthParticleAuxContainer',
31  'TruthTaus':'xAOD::TruthParticleContainer','TruthTausAux':'xAOD::TruthParticleAuxContainer',
32  'TruthNeutrinos':'xAOD::TruthParticleContainer','TruthNeutrinosAux':'xAOD::TruthParticleAuxContainer',
33  'TruthBSM':'xAOD::TruthParticleContainer','TruthBSMAux':'xAOD::TruthParticleAuxContainer',
34  'TruthBoson':'xAOD::TruthParticleContainer','TruthBosonAux':'xAOD::TruthParticleAuxContainer',
35  'TruthBottom':'xAOD::TruthParticleContainer','TruthBottomAux':'xAOD::TruthParticleAuxContainer',
36  'TruthTop':'xAOD::TruthParticleContainer','TruthTopAux':'xAOD::TruthParticleAuxContainer',
37  'TruthForwardProtons':'xAOD::TruthParticleContainer','TruthForwardProtonsAux':'xAOD::TruthParticleAuxContainer',
38  'BornLeptons':'xAOD::TruthParticleContainer','BornLeptonsAux':'xAOD::TruthParticleAuxContainer',
39  'TruthBosonsWithDecayParticles':'xAOD::TruthParticleContainer','TruthBosonsWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
40  'TruthBosonsWithDecayVertices':'xAOD::TruthVertexContainer','TruthBosonsWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
41  'TruthBSMWithDecayParticles':'xAOD::TruthParticleContainer','TruthBSMWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
42  'TruthBSMWithDecayVertices':'xAOD::TruthVertexContainer','TruthBSMWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
43  'AntiKt4TruthDressedWZJets':'xAOD::JetContainer','AntiKt4TruthDressedWZJetsAux':'xAOD::JetAuxContainer',
44  'AntiKt10TruthSoftDropBeta100Zcut10Jets':'xAOD::JetContainer','AntiKt10TruthSoftDropBeta100Zcut10JetsAux':'xAOD::JetAuxContainer'
45  }
46 
47  # Add EventInfo
48  TRUTH3SlimmingHelper.AllVariables = [ 'EventInfo',
49  'TruthLHEParticles']
50 
51  # Add TruthTau collections
52  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddTauAndDownstreamParticlesCfg
53  acc.merge(AddTauAndDownstreamParticlesCfg(flags))
54  TRUTH3SlimmingHelper.AllVariables += ['TruthTausWithDecayParticles','TruthTausWithDecayVertices']
55 
56  # Add standard content
57  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
58  addTruth3ContentToSlimmerTool(TRUTH3SlimmingHelper)
59 
60  # Generate item list and create stream
61  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
62  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
63  TRUTH3ItemList = TRUTH3SlimmingHelper.GetItemList()
64  acc.merge(OutputStreamCfg(flags, "DAOD_TRUTH3", ItemList=TRUTH3ItemList))
65  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_TRUTH3", createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
66 
67  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.MCTruthCommonConfig.AddStandardTruthContentsCfg
def AddStandardTruthContentsCfg(flags, decorationDressing='dressedPhoton', includeTausInDressingPhotonRemoval=False, prefix='')
Definition: MCTruthCommonConfig.py:164
python.TRUTH3.TRUTH3Cfg
def TRUTH3Cfg(flags)
Definition: TRUTH3.py:8
python.MCTruthCommonConfig.AddTauAndDownstreamParticlesCfg
def AddTauAndDownstreamParticlesCfg(flags, generations=-1, rejectHadronChildren=False)
Definition: MCTruthCommonConfig.py:263
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:219
SlimmingHelper
Definition: SlimmingHelper.py:1