ATLAS Offline Software
Functions
python.TruthDigitizationOutputConfig Namespace Reference

Functions

def TruthDigitizationOutputCfg (flags)
 

Detailed Description

Configure Truth output for digitization with ComponentAccumulator style

Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration

Function Documentation

◆ TruthDigitizationOutputCfg()

def python.TruthDigitizationOutputConfig.TruthDigitizationOutputCfg (   flags)
Return ComponentAccumulator with Truth output items

Definition at line 9 of file TruthDigitizationOutputConfig.py.

10  """Return ComponentAccumulator with Truth output items"""
11  prefix = ''
12  if flags.Common.ProductionStep == ProductionStep.PileUpPresampling:
13  prefix = flags.Overlay.BkgPrefix
14 
15  ItemList = [
16  f"McEventCollection#{prefix}TruthEvent",
17  f"TrackRecordCollection#{prefix}MuonEntryLayer",
18  ]
19  if not flags.Digitization.PileUp:
20  ItemList += [
21  f"TrackRecordCollection#{prefix}CaloEntryLayer",
22  f"TrackRecordCollection#{prefix}MuonExitLayer",
23  ]
24  # Extra TrackRecordCollections to copy for cosmics Digitization
25  if 'TrackRecordCollection#CosmicPerigee' in flags.Input.TypedCollections:
26  ItemList += ["TrackRecordCollection#CosmicPerigee"]
27  if 'TrackRecordCollection#CosmicRecord' in flags.Input.TypedCollections:
28  ItemList += ["TrackRecordCollection#CosmicRecord"]
29 
30  from RunDependentSimComps.PileUpUtils import pileupInputCollections
31  # Heavy Ion MC
32  if 'Hijing_event_params' in pileupInputCollections(flags.Digitization.PU.CavernInputCols):
33  ItemList += ['HijingEventParams#Hijing_event_params']
34 
35  dropped_jet_vars = ['constituentLinks',
36  'constituentWeights',
37  'ConeExclBHadronsFinal',
38  'ConeExclCHadronsFinal',
39  'ConeExclTausFinal',
40  'GhostPartons',
41  'GhostBHadronsFinal',
42  'GhostCHadronsFinal',
43  'GhostTausFinal']
44  jet_var_str = '.-'.join ([''] + dropped_jet_vars)
45 
46  dropped_jet_vars = ['constituentLinks',
47  'constituentWeights',
48  'ConeExclBHadronsFinal',
49  'ConeExclCHadronsFinal',
50  'ConeExclTausFinal',
51  'GhostPartons',
52  'GhostBHadronsFinal',
53  'GhostCHadronsFinal',
54  'GhostTausFinal']
55  jet_var_str = '.-'.join ([''] + dropped_jet_vars)
56 
57  puCollections = pileupInputCollections(flags.Digitization.PU.LowPtMinBiasInputCols)
58  if "AntiKt4TruthJets" in puCollections:
59  ItemList += [
60  f"xAOD::JetContainer#{prefix}InTimeAntiKt4TruthJets",
61  f"xAOD::AuxContainerBase!#{prefix}InTimeAntiKt4TruthJetsAux" + jet_var_str,
62  f"xAOD::JetContainer#{prefix}OutOfTimeAntiKt4TruthJets",
63  f"xAOD::AuxContainerBase!#{prefix}OutOfTimeAntiKt4TruthJetsAux" + jet_var_str,
64  ]
65  if "AntiKt6TruthJets" in puCollections:
66  ItemList += [
67  f"xAOD::JetContainer#{prefix}InTimeAntiKt6TruthJets",
68  f"xAOD::AuxContainerBase!#{prefix}InTimeAntiKt6TruthJetsAux" + jet_var_str,
69  f"xAOD::JetContainer#{prefix}OutOfTimeAntiKt6TruthJets",
70  f"xAOD::AuxContainerBase!#{prefix}OutOfTimeAntiKt6TruthJetsAux" + jet_var_str,
71  ]
72  if "TruthPileupParticles" in puCollections:
73  ItemList += [
74  f"xAOD::TruthParticleContainer#{prefix}TruthPileupParticles",
75  f"xAOD::TruthParticleAuxContainer#{prefix}TruthPileupParticlesAux.",
76  ]
77 
78  return OutputStreamCfg(flags, "RDO", ItemList)
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.TruthDigitizationOutputConfig.TruthDigitizationOutputCfg
def TruthDigitizationOutputCfg(flags)
Definition: TruthDigitizationOutputConfig.py:9
python.PileUpUtils.pileupInputCollections
def pileupInputCollections(inputFiles)
Definition: PileUpUtils.py:10