ATLAS Offline Software
CaloTopoEMetaoffSW.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/CaloTopoEMetaoffSW.py
5 # Created: Apr, 2009, sss
6 # Purpose: Steering module + corrections for eta offset corrections
7 # for TopoEM clusters.
8 #
9 # TopoEM uses an old version of the SW corrections.
10 # We need to get a copy of it under the topoem hierarchy.
11 #
12 
13 from AthenaConfiguration.ComponentFactory import CompFactory
14 from CaloClusterCorrection.constants import \
15  CALOCORR_COOL, CALOCORR_DEFAULT_KEY, CALOCORR_EMTOPO
16 from CaloClusterCorrection.common import makecorr
17 
18 #
19 # This table lists all available versions of this correction.
20 # See common.py for a description of the contents.
21 #
22 from CaloClusterCorrection.constants import topoem_valid_keys as keys
23 cls_v2 = CompFactory.CaloSwEtaoff_v2 # CaloClusterCorrection
24 CaloTopoEMetaoffSW_versions = [
25 
26  # Copied from SW.
27  # DC2 simulation and 8.x.0 reconstruction.
28  # Electrons at 50, 100, and 200 GeV were used.
29  # Derived for 5x5 clusters only.
30  # Added in LArClusterRec-02-05-12, in 8.6.0.
31  ['v2', cls_v2, ['CaloSwEtaoff_v2.CaloSwEtaoff_v2_parms',
32  'calotopoemcorr_pool', CALOCORR_COOL], keys],
33  ]
34 
35 
36 #
37 # Create a new tool instance.
38 # FLAGS is the configuration flags instance.
39 # SAMPLING is the calorimeter sampling (EMB1, EMB2, EME1, EME2) to which
40 # this correction will be applied, or None.
41 # NAME is the base name for this tool. If defaulted, a name will
42 # be constructed from the name of the correction, the version, and the key.
43 # If SUFFIX is not None, it will be added onto the end of the tool name.
44 # VERSION is a string specifying which of several versions of the correction
45 # to choose. If defaulted, the latest version of the correction is chosen.
46 # KEY is a string to specify the type of cluster to which the correction
47 # applies. The convention is to use `ele55' for 5x5 electron clusters,
48 # `gam35' for 3x5 photon clusters, and so on.
49 # SOURCE tells from where we should read the calibration constants.
50 # See common.py for a description of the possibilities.
51 # None means to use the default.
52 # CONFCLASS gives the Configurable class to use to create the tool.
53 # It may (and usually should) be defaulted.
54 #
55 # Additional keyword arguments may be passed to override any tool
56 # parameters/constants.
57 #
59  sampling,
60  name = None,
61  suffix = None,
62  version = None,
63  key = CALOCORR_DEFAULT_KEY,
64  source = None,
65  confclass = None,
66  **kw):
67  # Make the tool.
68  return makecorr (flags,
69  versions = CaloTopoEMetaoffSW_versions,
70  name = name,
71  basename = 'topoetaoffsw',
72  suffix = suffix,
73  version = version,
74  key = key,
75  sampling = sampling,
76  source = source,
77  confclass = confclass,
78  corrclass = CALOCORR_EMTOPO,
79  **kw)
CaloTopoEMetaoffSW.make_CaloTopoEMetaoffSW
def make_CaloTopoEMetaoffSW(flags, sampling, name=None, suffix=None, version=None, key=CALOCORR_DEFAULT_KEY, source=None, confclass=None, **kw)
Definition: CaloTopoEMetaoffSW.py:58