19 **kwargs):
20
21 seqkw = {'sequence': sequenceName} if sequenceName else {}
22 acc = ComponentAccumulator (**seqkw)
23
24 if "EMClusterTool" not in kwargs:
25 emclustool = EMClusterToolCfg(flags)
26 kwargs["EMClusterTool"] = acc.popToolsAndMerge(emclustool)
27
28 if "EMShowerTool" not in kwargs:
29 emshowerbuilder = EMShowerBuilderCfg(flags)
30 kwargs["EMShowerTool"] = acc.popToolsAndMerge(emshowerbuilder)
31
32 if "ObjectQualityTool" not in kwargs and not flags.Common.isOnline:
33 oqtool = egammaOQFlagsBuilderCfg(flags)
34 kwargs["ObjectQualityTool"] = acc.popToolsAndMerge(oqtool)
35
36 eleTools = [acc.popToolsAndMerge(EMPIDBuilderElectronCfg(flags))]
37 phoTools = [acc.popToolsAndMerge(EMPIDBuilderPhotonCfg(flags))]
38
39 kwargs.setdefault(
40 "InputElectronRecCollectionName",
41 flags.Egamma.Keys.Internal.ElectronSuperRecs)
42 kwargs.setdefault(
43 "InputPhotonRecCollectionName",
44 flags.Egamma.Keys.Internal.PhotonSuperRecs)
45 kwargs.setdefault(
46 "ElectronOutputName",
47 flags.Egamma.Keys.Output.Electrons)
48 kwargs.setdefault(
49 "PhotonOutputName",
50 flags.Egamma.Keys.Output.Photons)
51 kwargs.setdefault(
52 "AmbiguityTool",
53 CompFactory.EGammaAmbiguityTool())
54 kwargs.setdefault(
55 "ElectronTools",
56 eleTools)
57 kwargs.setdefault(
58 "PhotonTools",
59 phoTools)
60 kwargs.setdefault(
61 "isTruth",
62 flags.Input.isMC
63 )
64
65 topoegAlg = CompFactory.xAODEgammaBuilder(name, **kwargs)
66
67 acc.addEventAlgo(topoegAlg)
68 return acc
69
70