3 from MCTruthClassifier.MCTruthClassifierConfig
import (
4 MCTruthClassifierCaloTruthMatchCfg)
5 __doc__ =
"Configure egammaTruthAssociation"
7 from AthenaCommon.Logging
import logging
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
16 seqkw = {
'sequence': sequenceName}
if sequenceName
else {}
17 acc = ComponentAccumulator (**seqkw)
19 if "MCTruthClassifier" not in kwargs:
20 kwargs[
"MCTruthClassifier"] = acc.popToolsAndMerge(
24 "ClusterContainerName",
25 flags.Egamma.Keys.Output.CaloClusters)
27 "ElectronContainerName",
28 flags.Egamma.Keys.Output.Electrons)
30 "PhotonContainerName",
31 flags.Egamma.Keys.Output.Photons)
33 "FwdElectronContainerName",
34 flags.Egamma.Keys.Output.ForwardElectrons)
36 "TruthEventContainerName",
37 flags.Egamma.Keys.Input.TruthEvents)
39 "TruthParticleContainerName",
40 flags.Egamma.Keys.Input.TruthParticles)
42 "EgammaTruthContainerName",
43 flags.Egamma.Keys.Output.TruthParticles)
45 "MatchForwardElectrons",
46 flags.Egamma.doForward)
48 egtruthAlg = CompFactory.egammaTruthAssociationAlg(name, **kwargs)
50 acc.addEventAlgo(egtruthAlg)
54 if __name__ ==
"__main__":
55 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
56 from AthenaConfiguration.TestDefaults
import defaultTestFiles
57 from AthenaConfiguration.ComponentAccumulator
import printProperties
58 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
60 flags.Input.Files = defaultTestFiles.RDO_RUN2
63 mlog = logging.getLogger(
"egammaTruthAssociationConfigTest")
64 mlog.info(
"Configuring egammaTruthAssociation: ")
67 acc.getEventAlgo(
"egammaTruthAssociation"),
70 with open(
"egammatruthassociation.pkl",
"wb")
as f: