ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ThinningUtils
python
ThinNegativeEnergyCaloClustersConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3
__doc__ =
"""
4
Instantiate the Negative Calo Cluster Thinning
5
"""
6
7
from
AthenaCommon.Logging
import
logging
8
from
AthenaConfiguration.ComponentFactory
import
CompFactory
9
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
10
11
12
def
ThinNegativeEnergyCaloClustersCfg
(flags,
13
name="ThinNegativeEnergyCaloClustersAlg",
14
**kwargs):
15
16
acc = ComponentAccumulator()
17
kwargs.setdefault(
"StreamName"
,
"StreamAOD"
)
18
kwargs.setdefault(
"ThinNegativeEnergyCaloClusters"
,
True
)
19
kwargs.setdefault(
"CaloClustersKey"
,
"CaloCalTopoClusters"
)
20
acc.addEventAlgo(
21
CompFactory.ThinNegativeEnergyCaloClustersAlg(name, **kwargs)
22
)
23
return
acc
24
25
26
if
__name__ ==
"__main__"
:
27
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
28
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
29
from
AthenaConfiguration.ComponentAccumulator
import
printProperties
30
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
31
flags = initConfigFlags()
32
flags.Input.Files = defaultTestFiles.RDO_RUN2
33
flags.Output.doWriteAOD =
True
# To test the AOD parts
34
flags.lock()
35
acc = MainServicesCfg(flags)
36
acc.merge(
ThinNegativeEnergyCaloClustersCfg
(flags))
37
mlog = logging.getLogger(
"ThinNegativeEnergyCaloClustersConfigTest"
)
38
printProperties(
39
mlog,
40
acc.getEventAlgo(
"ThinNegativeEnergyCaloClustersAlg"
),
41
nestLevel=1,
42
printDefaults=
True
,
43
)
44
45
with
open(
"thinnegativeenergycaloclusterscfg.pkl"
,
"wb"
)
as
f:
46
acc.store(f)
python.ThinNegativeEnergyCaloClustersConfig.ThinNegativeEnergyCaloClustersCfg
ThinNegativeEnergyCaloClustersCfg(flags, name="ThinNegativeEnergyCaloClustersAlg", **kwargs)
Definition
ThinNegativeEnergyCaloClustersConfig.py:14
Generated on
for ATLAS Offline Software by
1.17.0