3 from AthenaCommon.Logging
import logging
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from xAODEgamma.xAODEgammaParameters
import xAOD
11 acc.setPrivateTools(CompFactory.egammaMVACalibTool(**kwargs))
19 kwargs.setdefault(
"folder", flags.Egamma.Calib.MVAVersion)
21 if "ElectronTool" not in kwargs:
22 kwargs[
"ElectronTool"] = acc.popToolsAndMerge(
25 name=
"electronMVATool",
26 ParticleType=xAOD.EgammaParameters.electron,
27 folder=kwargs[
'folder'])
30 if "UnconvertedPhotonTool" not in kwargs:
31 kwargs[
"UnconvertedPhotonTool"] = acc.popToolsAndMerge(
34 name=
"unconvertedPhotonMVATool",
35 ParticleType=xAOD.EgammaParameters.unconvertedPhoton,
36 folder=kwargs[
'folder'])
39 if "ConvertedPhotonTool" not in kwargs:
40 kwargs[
"ConvertedPhotonTool"] = acc.popToolsAndMerge(
43 name=
"convertedPhotonMVATool",
44 ParticleType=xAOD.EgammaParameters.convertedPhoton,
45 folder=kwargs[
'folder'])
49 CompFactory.egammaMVASvc(
51 **kwargs), primary=
True)
55 if __name__ ==
"__main__":
57 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
58 from AthenaConfiguration.ComponentAccumulator
import printProperties
59 from AthenaConfiguration.TestDefaults
import defaultTestFiles
61 flags.Input.Files = defaultTestFiles.RDO_RUN2
66 mlog = logging.getLogger(
"egammaMVASvcConfigTest")
67 mlog.info(
"Configuring egammaMVASvc :")
70 folder=flags.Egamma.Calib.MVAVersion)),
75 f =
open(
"egmvatools.pkl",
"wb")