ATLAS Offline Software
Loading...
Searching...
No Matches
egammaLargeClusterMakerConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3""" Configure egammaLargeClusterMaker which chooses cells to store in the AOD"""
4
5__author__ = "Jovan Mitrevski"
6
7from AthenaCommon.Logging import logging
8from AthenaConfiguration.ComponentFactory import CompFactory
9from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
10
11
12def egammaLargeClusterMakerCfg(flags, name="egammaLCMakerTool", **kwargs):
13
14 acc = ComponentAccumulator()
15
16 kwargs.setdefault("CellsName", flags.Egamma.Keys.Input.CaloCells)
17 kwargs.setdefault("InputClusterCollection",
18 flags.Egamma.Keys.Output.CaloClusters)
19 acc.setPrivateTools(CompFactory.egammaLargeClusterMaker(name, **kwargs))
20
21 return acc
22
23
24if __name__ == "__main__":
25
26 from AthenaConfiguration.AllConfigFlags import initConfigFlags
27 from AthenaConfiguration.ComponentAccumulator import printProperties
28 from AthenaConfiguration.TestDefaults import defaultTestFiles
29 flags = initConfigFlags()
30 flags.Input.Files = defaultTestFiles.RDO_RUN2
31 flags.fillFromArgs()
32 flags.lock()
33 flags.dump()
34
35 cfg = ComponentAccumulator()
36 mlog = logging.getLogger("egammaLargeClusterMakerConfigTest")
37 mlog.info("Configuring egammaLargeClusterMaker: ")
38 printProperties(mlog, cfg.popToolsAndMerge(
40 nestLevel=1,
41 printDefaults=True)
42
43 f = open("egammalargeclustermaker.pkl", "wb")
44 cfg.store(f)
45 f.close()
egammaLargeClusterMakerCfg(flags, name="egammaLCMakerTool", **kwargs)