9 from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
10 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
14 import AthenaPython.PyAthena
as PyAthena
15 from AthenaPython.PyAthena
import StatusCode
17 def __init__ (self, name = 'MergeElectrons', **kw):
18 super (MergeElectrons, self).__init__ (name = name, **kw)
22 sg=PyAthena.py_svc(
'StoreGateSvc')
24 e2 = sg[
'ForwardElectrons']
25 enew = ROOT.DataVector(ROOT.xAOD.Electron_v1) (1)
26 for e
in e1: enew.push_back(e)
27 for e
in e2: enew.push_back(e)
28 ROOT.SetOwnership (enew,
False)
29 sg.record (enew,
'AllElectrons')
32 ROOT.xAOD.ElectronAuxContainer()
33 ROOT.xAOD.CaloClusterAuxContainer()
35 return StatusCode.Success
39 def _args (level, name, kwin, **kw):
42 for (k, v)
in kwin.items():
43 if k.startswith (name +
'_'):
44 kw[k[len(name)+1:]] = v
57 from D3PDMakerCoreComps.MakerAlgConfig
import MakerAlgConfig
58 alg = MakerAlgConfig (flags, acc, stream, file,
60 autoflush = autoflush)
62 from EventCommonD3PDMaker.EventInfoD3PDObject
import EventInfoD3PDObject
63 alg += EventInfoD3PDObject (**_args (level,
'EventInfo', kw))
65 from CaloD3PDMaker.LArCollisionTimeD3PDObject
import LArCollisionTimeD3PDObject
66 alg += LArCollisionTimeD3PDObject (**_args (level,
'LArCollisionTime', kw))
68 from egammaD3PDMaker.ElectronD3PDObject
import ElectronD3PDObject
69 alg += ElectronD3PDObject (**_args (level,
'Electron', kw,
70 EgammaJetSignedIPAndPTRel_target=
'jet_'
73 from egammaD3PDMaker.PhotonD3PDObject
import PhotonD3PDObject
74 alg += PhotonD3PDObject (**_args (level,
'Photon', kw))
76 from MuonD3PDMaker.MuonD3PDObject
import MuonD3PDObject
77 alg += MuonD3PDObject (**_args (10,
'Muons', kw,
78 sgkey=
'StacoMuonCollection,Muons', prefix=
'mu_',
79 include = [
"EFCBInfoIndex",
"EFMGInfoIndex",
81 "L2CBInfoIndex",
"L1InfoIndex",
82 "MuonScatteringAngleSignificance"],
83 exclude = [
"EFCBInfo",
"EFMGInfo",
"EFMEInfo",
84 "L2CBInfo",
"L1Info"],
85 allowMissing =
True ))
87 from JetD3PDMaker.JetD3PDObject
import JetD3PDObject
88 alg += JetD3PDObject (**_args (0,
'Jet', kw,
92 from CaloD3PDMaker.MBTSD3PDObject
import MBTSD3PDObject
93 alg += MBTSD3PDObject (**_args (level,
'MBTS', kw))
95 from CaloD3PDMaker.MBTSTimeD3PDObject
import MBTSTimeD3PDObject
96 alg += MBTSTimeD3PDObject (**_args (level,
'MBTSTime', kw))
99 from TrackD3PDMaker.xAODVertexD3PDObject
import PrimaryxAODVertexD3PDObject
100 alg += PrimaryxAODVertexD3PDObject (**_args (
101 1,
'PrimaryVertex', kw,
103 sgkey = D3PDMakerFlags.VertexSGKey,
105 storeVertexTrackIndexAssociation =
False,
106 storeVertexTrackAssociation =
True,
107 storeDiagonalCovarianceAsErrors =
True))
109 from TrackD3PDMaker.xAODTrackD3PDObject
import xAODTrackParticleD3PDObject
110 alg += xAODTrackParticleD3PDObject (**_args (
111 3,
'TrackParticleCandidate', kw,
112 trackParametersAtGlobalPerigeeLevelOfDetails = 3,
113 storeDiagonalCovarianceAsErrors =
True))
115 if D3PDMakerFlags.DoTruth:
116 from MuonD3PDMaker.TruthMuonD3PDObject
import TruthMuonD3PDObject
117 alg += TruthMuonD3PDObject (**_args (level,
'TruthMuon', kw))
119 from TruthD3PDMaker.TruthEventD3PDObject
import TruthEventD3PDObject
120 alg += TruthEventD3PDObject (**_args (1,
'TruthEvent', kw))
122 from TruthD3PDMaker.TruthParticleD3PDObject
import TruthParticleD3PDObject
125 acc.addEventAlgo (alg.alg)