ATLAS Offline Software
Loading...
Searching...
No Matches
InDetOutputConfig.py
Go to the documentation of this file.
2# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3#
4
5'''@file InDetOutputConfig.py
6@author M. Aparo
7@date 13-03-20234
8@brief CA-based python configurations to add the output stream of the AOD_IDTPM file
9'''
10
11from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12
13
14def InDetOutputCfg( flags, **kwargs ):
15 '''
16 Write output file in AOD_IDTPM format, on top of the
17 histogram output file, for reprocessing
18 '''
19 acc = ComponentAccumulator()
20
21
25
26
35
36
37 itemsToRecord = set()
38
39 for trkAnaName in flags.PhysVal.IDTPM.trkAnaNames:
40
41 offTracks = getattr( flags.PhysVal.IDTPM, trkAnaName+'.OfflineTrkKey' )
42 trigTracks = getattr( flags.PhysVal.IDTPM, trkAnaName+'.TrigTrkKey' )
43 itemsToRecord.update({
44 'xAOD::TrackParticleContainer#'+offTracks,
45 'xAOD::TrackParticleAuxContainer#'+offTracks+'Aux.',#+truthVars+'.'+objVars,
46 'xAOD::TrackParticleContainer#'+trigTracks,
47 'xAOD::TrackParticleAuxContainer#'+trigTracks+'Aux.',#+truthVars,
48 })
49
50
51 truthParticles = getattr( flags.PhysVal.IDTPM, trkAnaName+'.TruthPartKey' )
52 itemsToRecord.update({
53 'xAOD::TruthParticleContainer#'+truthParticles,
54 'xAOD::TruthParticleAuxContainer#'+truthParticles+'Aux.',
55 })
56
57
58 objStr = getattr( flags.PhysVal.IDTPM, trkAnaName+".SelectOfflineObject" )
59
60
61 if objStr == 'Electron':
62 itemsToRecord.update({
63 'xAOD::ElectronContainer#Electrons',
64 # TODO - uncomment to store xAOD::Electron decorations
65 #'xAOD::ElectronAuxContainer#ElectronsAux.',
66 })
67
68
69 if objStr == 'Muon':
70 itemsToRecord.update({
71 'xAOD::MuonContainer#Muons',
72 # TODO - uncomment to store xAOD::Muon decorations
73 #'xAOD::MuonAuxContainer#MuonsAux.',
74 })
75
76
77 if objStr == 'Tau':
78 itemsToRecord.update({
79 'xAOD::TauJetContainer#TauJets',
80 # TODO - uncomment to store xAOD::TauJets decorations
81 #'xAOD::TauJetAuxContainer#TauJetsAux.',
82 })
83
84
85 trkAnaInfo = "TrkAnaInfo"+getattr( flags.PhysVal.IDTPM, trkAnaName+'.anaTag' )
86 itemsToRecord.update({
87 'xAOD::BaseContainer#'+trkAnaInfo,
88 'xAOD::AuxContainerBase#'+trkAnaInfo+'Aux.',
89 })
90
91
92 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
93 acc.merge( OutputStreamCfg( flags, 'AOD_IDTPM',
94 ItemList = list( itemsToRecord ),
95 disableEventTag = True ) )
96
97 return acc
STL class.
InDetOutputCfg(flags, **kwargs)