ATLAS Offline Software
Loading...
Searching...
No Matches
WriteCaloTopoEMCorrections.py
Go to the documentation of this file.
1#!/usr/bin/env athena.py
2# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
3#
4# File: CaloClusterCorrection/python/WriteCaloTopoEMCorrections.py
5# Author: scott snyder <snyder@bnl.gov>
6# Date: May 2024, from old config version
7# Purpose: Write cluster correction constants to pool+cool.
8#
9
10
11CALOCORR_POOLFILE = 'CaloTopoEMCorrections.pool.root'
12CALOCORR_COOLFILE = 'topoemcool.db'
13CaloTopoEMCorrKeys = ['ele633', 'ele420', 'gam633']
14
15
16from AthenaConfiguration.MainServicesConfig import \
17 MainServicesCfg
18from CaloClusterCorrection.WriteCorrectionsConfig import \
19 WriteCorrectionsFlags, WriteCorrectionsCfg
20
21flags = WriteCorrectionsFlags (CALOCORR_COOLFILE)
22cfg = MainServicesCfg (flags)
23
24
25from CaloClusterCorrection.CaloTopoEMCorrections import CaloTopoEMCorrections
26from CaloClusterCorrection.constants import CALOCORR_EMTOPO
27(corr_output_list, tag_list, ca) =\
28 CaloTopoEMCorrections.config_for_pool (flags,
29 CaloTopoEMCorrKeys,
30 CALOCORR_EMTOPO)
31cfg.merge (ca)
32
33cfg.merge (WriteCorrectionsCfg (flags, CALOCORR_POOLFILE,
34 corr_output_list, tag_list))
35
36
37sc = cfg.run (flags.Exec.MaxEvents)
38import sys
39sys.exit (sc.isFailure())