ATLAS Offline Software
CaloSwCalibHitsCalibration.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 #
4 # File: CaloClusterCorrection/python/CaloSwCalibHitsCalibration.py
5 # Created: Jan 2007, L. Carminati
6 # Purpose: Steering module for CalibHits based calibration of e/gamma
7 #
8 # This module is used to set up the calibration hits based corrections
9 # for electrons and photons
10 #
11 # The entry point for this module is make_CaloSwCalibHitsCalibration, which
12 # returns a new correction tool. The available versions are given
13 # in the table below.
14 #
15 
16 
17 from AthenaConfiguration.ComponentFactory import CompFactory
18 from CaloClusterCorrection.constants import \
19  CALOCORR_COOL, CALOCORR_DEFAULT_KEY, CALOCORR_SW
20 from CaloClusterCorrection.common import makecorr
21 
22 #
23 # This table lists all available versions of this correction.
24 # See common.py for a description of the contents.
25 #
26 from CaloClusterCorrection.constants import sw_valid_keys as keys
27 cls = CompFactory.CaloSwCalibHitsCalibration # CaloClusterCorrection
28 CaloSwCalibHitsCalibration_versions = [
29 
30  # 12.0.3 simulation and reconstruction, with ideal (calib0) geometry.
31  ['v1', cls, ['CaloSwCalibHitsCalibration_v1.' +
32  'CaloSwCalibHitsCalibration_v1_parms',
33  'caloswcorr_pool', CALOCORR_COOL], keys],
34  ['v2', cls, ['CaloSwCalibHitsCalibration_v2.' +
35  'CaloSwCalibHitsCalibration_v2_parms',
36  'caloswcorr_pool', CALOCORR_COOL], keys],
37 
38  # ATLAS-CSC-05-00-00 (14.0.0) geometry simulation.
39  ['v5', cls, ['CaloSwCalibHitsCalibration_v5.' +
40  'CaloSwCalibHitsCalibration_v5_parms',
41  'caloswcorr_pool', CALOCORR_COOL], keys],
42 
43  # ATLAS-CSC-05-00-00 (14.0.0) geometry simulation.
44  # Some fixes for eta=0 and eta=0.8 .
45  ['v5_1', cls, ['CaloSwCalibHitsCalibration_v5_1.' +
46  'CaloSwCalibHitsCalibration_v5_1_parms',
47  'caloswcorr_pool', CALOCORR_COOL], keys],
48 
49  # ATLAS-GEO-16-00-00 (15.6.X) geometry simulation + ad-hoc correction for data-MC leakage difference
50  # Now have separate corrections for converted and unconverted photons.
51  ['v8leakdata', cls, ['CaloSwCalibHitsCalibration_v8leakdata.' +
52  'CaloSwCalibHitsCalibration_v8leakdata_parms',
53  'caloswcorr_pool', CALOCORR_COOL],
54  ['ele55', 'ele35', 'ele37',
55  'gam55_conv', 'gam35_conv', 'gam37_conv',
56  'gam55_unconv', 'gam35_unconv', 'gam37_unconv',
57  'ele33', 'ele57', 'ele77',
58  'gam33_conv', 'gam57_conv', 'gam77_conv',
59  'gam33_unconv', 'gam57_unconv', 'gam77_unconv'] ],
60 
61  # ATLAS-GEO-16-00-00 (15.6.X) geometry simulation.
62  # Now have separate corrections for converted and unconverted photons.
63  ['v8', cls, ['CaloSwCalibHitsCalibration_v8.' +
64  'CaloSwCalibHitsCalibration_v8_parms',
65  'caloswcorr_pool', CALOCORR_COOL],
66  ['ele55', 'ele35', 'ele37',
67  'gam55_conv', 'gam35_conv', 'gam37_conv',
68  'gam55_unconv', 'gam35_unconv', 'gam37_unconv',
69  'ele33', 'ele57', 'ele77',
70  'gam33_conv', 'gam57_conv', 'gam77_conv',
71  'gam33_unconv', 'gam57_unconv', 'gam77_unconv'] ],
72 
73  # ATLAS-GEO-18-01-00 (mc11) geometry simulation + ad-hoc correction for data-MC leakage difference
74  # Now have separate corrections for converted and unconverted photons.
75  ['v9leakdata', cls, ['CaloSwCalibHitsCalibration_v9leakdata.' +
76  'CaloSwCalibHitsCalibration_v9leakdata_parms',
77  'caloswcorr_pool', CALOCORR_COOL],
78  ['ele55', 'ele35', 'ele37',
79  'gam55_conv', 'gam35_conv', 'gam37_conv',
80  'gam55_unconv', 'gam35_unconv', 'gam37_unconv',
81  'ele33', 'ele57', 'ele77',
82  'gam33_conv', 'gam57_conv', 'gam77_conv',
83  'gam33_unconv', 'gam57_unconv', 'gam77_unconv'] ],
84 
85  # ATLAS-GEO-18-01-00 (mc11) geometry simulation.
86  # Now have separate corrections for converted and unconverted photons.
87  ['v9', cls, ['CaloSwCalibHitsCalibration_v9.' +
88  'CaloSwCalibHitsCalibration_v9_parms',
89  'caloswcorr_pool', CALOCORR_COOL],
90  ['ele55', 'ele35', 'ele37',
91  'gam55_conv', 'gam35_conv', 'gam37_conv',
92  'gam55_unconv', 'gam35_unconv', 'gam37_unconv',
93  'ele33', 'ele57', 'ele77',
94  'gam33_conv', 'gam57_conv', 'gam77_conv',
95  'gam33_unconv', 'gam57_unconv', 'gam77_unconv'] ],
96 
97  # ATLAS-CSC-05-00-00 (14.0.0) geometry simulation + ad-hoc correction for data-MC leakage difference
98  # Now have separate corrections for converted and unconverted photons.
99  ['v6leakdata', cls, ['CaloSwCalibHitsCalibration_v6leakdata.' +
100  'CaloSwCalibHitsCalibration_v6leakdata_parms',
101  'caloswcorr_pool', CALOCORR_COOL],
102  ['ele55', 'ele35', 'ele37',
103  'gam55_conv', 'gam35_conv', 'gam37_conv',
104  'gam55_unconv', 'gam35_unconv', 'gam37_unconv',
105  'ele33', 'ele57', 'ele77',
106  'gam33_conv', 'gam57_conv', 'gam77_conv',
107  'gam33_unconv', 'gam57_unconv', 'gam77_unconv'] ],
108 
109  # ATLAS-CSC-05-00-00 (14.0.0) geometry simulation.
110  # Now have separate corrections for converted and unconverted photons.
111  ['v6', cls, ['CaloSwCalibHitsCalibration_v6.' +
112  'CaloSwCalibHitsCalibration_v6_parms',
113  'caloswcorr_pool', CALOCORR_COOL],
114  ['ele55', 'ele35', 'ele37',
115  'gam55_conv', 'gam35_conv', 'gam37_conv',
116  'gam55_unconv', 'gam35_unconv', 'gam37_unconv',
117  'ele33', 'ele57', 'ele77',
118  'gam33_conv', 'gam57_conv', 'gam77_conv',
119  'gam33_unconv', 'gam57_unconv', 'gam77_unconv'] ]
120 
121  ]
122 
123 #
124 # Create a new tool instance.
125 # FLAGS is the configuration flags instance.
126 # NAME is the base name for this tool. If defaulted, a name will
127 # be constructed from the name of the correction, the version, and the key.
128 # If SUFFIX is not None, it will be added onto the end of the tool name.
129 # VERSION is a string specifying which of several versions of the correction
130 # to choose. If defaulted, the latest version of the correction is chosen.
131 # KEY is a string to specify the type of cluster to which the correction
132 # applies. The convention is to use `ele55' for 5x5 electron clusters,
133 # `gam35' for 3x5 photon clusters, and so on.
134 # SOURCE tells from where we should read the calibration constants.
135 # See common.py for a description of the possibilities.
136 # None means to use the default.
137 # CONFCLASS gives the Configurable class to use to create the tool.
138 # It may (and usually should) be defaulted.
139 #
140 # Additional keyword arguments may be passed to override any tool
141 # parameters/constants.
142 #
144  name = None,
145  suffix = None,
146  version = None,
147  key = CALOCORR_DEFAULT_KEY,
148  source = None,
149  confclass = None,
150  **kw):
151  # Make the tool.
152  return makecorr (flags,
153  versions = CaloSwCalibHitsCalibration_versions,
154  name = name,
155  basename = 'calhits',
156  suffix = suffix,
157  version = version,
158  key = key,
159  sampling = None,
160  source = source,
161  confclass = confclass,
162  corrclass = CALOCORR_SW,
163  **kw)
CaloSwCalibHitsCalibration.make_CaloSwCalibHitsCalibration
def make_CaloSwCalibHitsCalibration(flags, name=None, suffix=None, version=None, key=CALOCORR_DEFAULT_KEY, source=None, confclass=None, **kw)
Definition: CaloSwCalibHitsCalibration.py:143