ATLAS Offline Software
CaloTopoEMgap.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/CaloTopoEMgap.py
5 # Created: Mar 2007, sss, from earlier job options.
6 # Purpose: Steering module + corrections for gap correction
7 # for TopoEM clusters.
8 #
9 
10 from AthenaConfiguration.ComponentFactory import CompFactory
11 from CaloClusterCorrection.constants import \
12  CALOCORR_COOL, CALOCORR_DEFAULT_KEY, CALOCORR_EMTOPO, CALOCORR_CLUSTER
13 from CaloClusterCorrection.common import makecorr
14 
15 #
16 # This table lists all available versions of this correction.
17 # See common.py for a description of the contents.
18 #
19 from CaloClusterCorrection.constants import topoem_valid_keys as keys
20 cls = CompFactory.CaloTopoEMGap # CaloClusterCorrection
21 CaloTopoEMgap_versions = [
22 
23  # v1 --- from the original DC3 job options file.
24  ['v1', cls, ['CaloTopoEMgap.CaloTopoEMgap_v1_parms',
25  'calotopoemcorr_pool', CALOCORR_COOL], keys],
26 
27  ]
28 
29 
30 #
31 # Create a new tool instance.
32 # FLAGS is the configuration flags instance.
33 # NAME is the base name for this tool. If defaulted, a name will
34 # be constructed from the name of the correction, the version, and the key.
35 # If SUFFIX is not None, it will be added onto the end of the tool name.
36 # VERSION is a string specifying which of several versions of the correction
37 # to choose. If defaulted, the latest version of the correction is chosen.
38 # KEY is a string to specify the type of cluster to which the correction
39 # applies. The convention is to use `ele55' for 5x5 electron clusters,
40 # `gam35' for 3x5 photon clusters, and so on.
41 # SOURCE tells from where we should read the calibration constants.
42 # See common.py for a description of the possibilities.
43 # None means to use the default.
44 # CONFCLASS gives the Configurable class to use to create the tool.
45 # It may (and usually should) be defaulted.
46 #
47 # Additional keyword arguments may be passed to override any tool
48 # parameters/constants.
49 #
50 def make_CaloTopoEMgap (flags,
51  name = None,
52  suffix = None,
53  version = None,
54  key = CALOCORR_DEFAULT_KEY,
55  source = None,
56  confclass = None,
57  **kw):
58  # Make the tool.
59  return makecorr (flags,
60  versions = CaloTopoEMgap_versions,
61  name = name,
62  basename = 'topogap',
63  suffix = suffix,
64  version = version,
65  key = key,
66  sampling = None,
67  source = source,
68  confclass = confclass,
69  corrclass = CALOCORR_EMTOPO,
70  **kw)
71 
72 
73 # Gap correction, from 12.0.3?
74 # I think this was derived for 6-3-3 clusters.
75 # Currently applied for all emtopo clusters.
76 GapCorr_el_1203 = [
77 [1.4375, 881.659, 1.51111, 1.09507, 893.54],
78 [1.4625, 924.435, 1.60056, 1.14361, 2136.88],
79 [1.4875, 1738.92, 1.35488, 1.06781, 2691.53],
80 [1.5125, 1418.49, 1.52461, 0.864585, 3665.26],
81 [1.5375, 404.816, 1.14325, 0.914854, 1577.98],
82 ]
83 
84 GapCorr_gam_1203 = [
85 [1.4375, 707.923, 1.0929, 1.12359, 0.0],
86 [1.4625, 2385.57, 1.35795, 1.10472, 0.0],
87 [1.4875, 11680, 1.98237, 0.732961, 0.0],
88 [1.5125, 4506.57, 1.77194, 0.749464, 0.0],
89 [1.5375, 589.303, 0.850365, 0.955104, 0.0],
90 ]
91 
92 
94  _default_keys = ['ele633', 'gam633']
95 
96  region = CALOCORR_CLUSTER
97  # Disable this correction for ele420 clusters.
98  _etamin_crack = 1.425
99  etamin_crack = {'ele633' : _etamin_crack,
100  'gam633' : _etamin_crack,
101  'ele420' : 999999999,
102  'ele430' : 999999999,
103  }
104  etamax_crack = 1.55
105  degree = 3
106  use_raw_eta = False
107  correction = {'ele633' : GapCorr_el_1203,
108  'gam633' : GapCorr_gam_1203}
109 
CaloTopoEMgap.make_CaloTopoEMgap
def make_CaloTopoEMgap(flags, name=None, suffix=None, version=None, key=CALOCORR_DEFAULT_KEY, source=None, confclass=None, **kw)
Definition: CaloTopoEMgap.py:50
CaloTopoEMgap.CaloTopoEMgap_v1_parms
Definition: CaloTopoEMgap.py:93