ATLAS Offline Software
Functions
python.TRUTH1 Namespace Reference

Functions

def TRUTH1Cfg (flags)
 

Function Documentation

◆ TRUTH1Cfg()

def python.TRUTH1.TRUTH1Cfg (   flags)
Main config for TRUTH1

Definition at line 7 of file TRUTH1.py.

7 def TRUTH1Cfg(flags):
8  """Main config for TRUTH1"""
10 
11  # Add translator from EVGEN input to xAOD-like truth
12  # Add all the particle derivation tools
13  # This sets up its own common kernel and adds the common tools to it
14  from DerivationFrameworkMCTruth.MCTruthCommonConfig import AddStandardTruthContentsCfg
15  acc.merge(AddStandardTruthContentsCfg(flags))
16 
17  #==============================================================================
18  # HEAVY FLAVOR DECORATIONS (ttbar)
19  #==============================================================================
20  from DerivationFrameworkMCTruth.HFHadronsCommonConfig import HFHadronsCommonCfg
21  acc.merge(HFHadronsCommonCfg(flags))
22 
23  #==============================================================================
24  # Set up slimming content list
25  #==============================================================================
26  from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
27  TRUTH1SlimmingHelper = SlimmingHelper("TRUTH1SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
28  TRUTH1SlimmingHelper.AppendToDictionary = {'EventInfo':'xAOD::EventInfo','EventInfoAux':'xAOD::EventAuxInfo',
29  'TruthEvents':'xAOD::TruthEventContainer','TruthEventsAux':'xAOD::TruthEventAuxContainer',
30  'TruthVertices':'xAOD::TruthVertexContainer','TruthVerticesAux':'xAOD::TruthVertexAuxContainer',
31  'TruthParticles':'xAOD::TruthParticleContainer','TruthParticlesAux':'xAOD::TruthParticleAuxContainer',
32  'TruthLHEParticles':'xAOD::TruthParticleContainer', 'TruthLHEParticlesAux':'xAOD::TruthParticleAuxContainer',
33  'MET_Truth':'xAOD::MissingETContainer','MET_TruthAux':'xAOD::MissingETAuxContainer',
34  'TruthElectrons':'xAOD::TruthParticleContainer','TruthElectronsAux':'xAOD::TruthParticleAuxContainer',
35  'TruthMuons':'xAOD::TruthParticleContainer','TruthMuonsAux':'xAOD::TruthParticleAuxContainer',
36  'TruthPhotons':'xAOD::TruthParticleContainer','TruthPhotonsAux':'xAOD::TruthParticleAuxContainer',
37  'TruthTaus':'xAOD::TruthParticleContainer','TruthTausAux':'xAOD::TruthParticleAuxContainer',
38  'TruthNeutrinos':'xAOD::TruthParticleContainer','TruthNeutrinosAux':'xAOD::TruthParticleAuxContainer',
39  'TruthBSM':'xAOD::TruthParticleContainer','TruthBSMAux':'xAOD::TruthParticleAuxContainer',
40  'TruthBoson':'xAOD::TruthParticleContainer','TruthBosonAux':'xAOD::TruthParticleAuxContainer',
41  'TruthBottom':'xAOD::TruthParticleContainer','TruthBottomAux':'xAOD::TruthParticleAuxContainer',
42  'TruthTop':'xAOD::TruthParticleContainer','TruthTopAux':'xAOD::TruthParticleAuxContainer',
43  'TruthForwardProtons':'xAOD::TruthParticleContainer','TruthForwardProtonsAux':'xAOD::TruthParticleAuxContainer',
44  'BornLeptons':'xAOD::TruthParticleContainer','BornLeptonsAux':'xAOD::TruthParticleAuxContainer',
45  'TruthBosonsWithDecayParticles':'xAOD::TruthParticleContainer','TruthBosonsWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
46  'TruthBosonsWithDecayVertices':'xAOD::TruthVertexContainer','TruthBosonsWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
47  'TruthBSMWithDecayParticles':'xAOD::TruthParticleContainer','TruthBSMWithDecayParticlesAux':'xAOD::TruthParticleAuxContainer',
48  'TruthBSMWithDecayVertices':'xAOD::TruthVertexContainer','TruthBSMWithDecayVerticesAux':'xAOD::TruthVertexAuxContainer',
49  'AntiKtVR30Rmax4Rmin02TruthChargedJets':'xAOD::JetContainer','AntiKtVR30Rmax4Rmin02TruthChargedJetsAux':'xAOD::JetAuxContainer',
50  'AntiKt4TruthDressedWZJets':'xAOD::JetContainer','AntiKt4TruthDressedWZJetsAux':'xAOD::JetAuxContainer',
51  'AntiKt10TruthJets':'xAOD::JetContainer','AntiKt10TruthJetsAux':'xAOD::JetAuxContainer',
52  'AntiKt10TruthTrimmedPtFrac5SmallR20Jets':'xAOD::JetContainer','AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux':'xAOD::JetAuxContainer',
53  'TruthLabelBHadronsFinal':'xAOD::TruthParticleContainer', 'TruthLabelBHadronsInitial':'xAOD::TruthParticleContainer',
54  'TruthLabelTQuarksFinal':'xAOD::TruthParticleContainer', 'TruthLabelBQuarksFinal':'xAOD::TruthParticleContainer', 'TruthLabelCQuarksFinal':'xAOD::TruthParticleContainer',
55  'TruthLabelCHadronsFinal':'xAOD::TruthParticleContainer', 'TruthLabelCHadronsInitial':'xAOD::TruthParticleContainer',
56  'TruthLabelHBosons':'xAOD::TruthParticleContainer', 'TruthLabelWBosons':'xAOD::TruthParticleContainer', 'TruthLabelZBosons':'xAOD::TruthParticleContainer',
57  'TruthLabelPartons':'xAOD::TruthParticleContainer', 'TruthLabelTausFinal':'xAOD::TruthParticleContainer'
58  }
59  # Custom all variables -- won't be overridden by the call below, just added to. Full lists for completeness.
60  TRUTH1SlimmingHelper.AllVariables = [ 'EventInfo',
61  'TruthEvents',
62  'TruthVertices',
63  'TruthParticles',
64  'TruthLHEParticles',
65  'TruthLabelBHadronsFinal',
66  'TruthLabelBHadronsInitial',
67  'TruthLabelBQuarksFinal',
68  'TruthLabelCHadronsFinal',
69  'TruthLabelCHadronsInitial',
70  'TruthLabelCQuarksFinal',
71  'TruthLabelHBosons',
72  'TruthLabelPartons',
73  'TruthLabelTQuarksFinal',
74  'TruthLabelTausFinal',
75  'TruthLabelWBosons',
76  'TruthLabelZBosons']
77  # Custom extra variables -- won't be overridden by the call below, just added to. Full lists for completeness.
78  TRUTH1SlimmingHelper.ExtraVariables = ["AntiKtVR30Rmax4Rmin02TruthChargedJets.GhostHBosonsCount.GhostHBosonsPt.GhostBHadronsFinalCount.GhostBHadronsFinalPt.GhostCHadronsFinalCount.HadronConeExclTruthLabelID.PartonTruthLabelID.ConeExclBHadronsFinal.ConeExclCHadronsFinal.ConeExclTausFinal.constituentLinks",
79  "AntiKt4TruthDressedWZJets.GhostCHadronsFinalCount.GhostBHadronsFinalCount.pt.HadronConeExclTruthLabelID.PartonTruthLabelID.ConeExclBHadronsFinal.ConeExclCHadronsFinal.ConeExclTausFinal.constituentLinks",
80  "AntiKt10TruthTrimmedPtFrac5SmallR20Jets.pt.Tau1_wta.Tau2_wta.Tau3_wta.constituentLinks.D2"]
81 
82  # Add standard content
83  from DerivationFrameworkMCTruth.MCTruthCommonConfig import addTruth3ContentToSlimmerTool
84  addTruth3ContentToSlimmerTool(TRUTH1SlimmingHelper)
85 
86  # Generate item list and create stream
87  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
88  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
89  TRUTH1ItemList = TRUTH1SlimmingHelper.GetItemList()
90  acc.merge(OutputStreamCfg(flags, "DAOD_TRUTH1", ItemList=TRUTH1ItemList))
91  acc.merge(SetupMetaDataForStreamCfg(flags, "DAOD_TRUTH1", createMetadata=[MetadataCategory.CutFlowMetaData, MetadataCategory.TruthMetaData]))
92 
93  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.TRUTH1.TRUTH1Cfg
def TRUTH1Cfg(flags)
Definition: TRUTH1.py:7
python.MCTruthCommonConfig.addTruth3ContentToSlimmerTool
def addTruth3ContentToSlimmerTool(slimmer)
Definition: MCTruthCommonConfig.py:462
python.HFHadronsCommonConfig.HFHadronsCommonCfg
def HFHadronsCommonCfg(flags)
Definition: HFHadronsCommonConfig.py:12
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
SlimmingHelper
Definition: SlimmingHelper.py:1