ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
python
CaloTopoEMlayers.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/CaloTopoEMlayers.py
5
# Created: Mar 2007, sss, from old job options.
6
# Purpose: Layer variable calculation.
7
#
8
# This `correction' is responsible for calculating the layer-by-layer
9
# variables (position, width, energy) from the list of cells composing
10
# a cluster.
11
#
12
#
13
14
from
AthenaConfiguration.ComponentFactory
import
CompFactory
15
from
CaloClusterCorrection.constants
import
\
16
CALOCORR_NOPOOL, CALOCORR_DEFAULT_KEY, CALOCORR_EMTOPO
17
from
CaloClusterCorrection.common
import
makecorr
18
19
#
20
# This table lists all available versions of this correction.
21
# See common.py for a description of the contents.
22
#
23
cls = CompFactory.CaloTopoEMlayers
# CaloClusterCorrection
24
CaloTopoEMlayers_versions = [
25
[
''
, cls, [
'CaloTopoEMlayers.CaloTopoEMlayers_parms'
, CALOCORR_NOPOOL]],
26
]
27
28
29
#
30
# Create a new tool instance.
31
# FLAGS is the configuration flags instance.
32
# NAME is the base name for this tool. If defaulted, a name will
33
# be constructed from the name of the correction, the version, and the key.
34
# If SUFFIX is not None, it will be added onto the end of the tool name.
35
# VERSION is a string specifying which of several versions of the correction
36
# to choose. If defaulted, the latest version of the correction is chosen.
37
# KEY is a string to specify the type of cluster to which the correction
38
# applies. The convention is to use `ele55' for 5x5 electron clusters,
39
# `gam35' for 3x5 photon clusters, and so on.
40
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
# The following arguments set tool parameters:
48
# CELLS_NAME specifies the SG key to use to find the scintillator cells.
49
#
50
# Additional keyword arguments may be passed to override any tool
51
# parameters/constants.
52
#
53
def
make_CaloTopoEMlayers
(flags,
54
name = None,
55
suffix = None,
56
version = None,
57
key = CALOCORR_DEFAULT_KEY,
58
source = None,
59
confclass = None,
60
cells_name = None,
61
**kw):
62
63
if
cells_name
is
not
None
:
64
kw[
'cells_name'
] = cells_name
65
66
return
makecorr (flags,
67
versions = CaloTopoEMlayers_versions,
68
name = name,
69
basename =
'layers'
,
70
suffix = suffix,
71
version = version,
72
key = key,
73
sampling =
None
,
74
source = source,
75
confclass = confclass,
76
corrclass = CALOCORR_EMTOPO,
77
**kw)
78
79
# ... layer computations -- ugly workaround using a large window
80
# to make "sure" all the TopoCluster's cells are inside
81
class
CaloTopoEMlayers_parms
:
82
eta_size = 11
83
phi_size = 11
CaloTopoEMlayers.CaloTopoEMlayers_parms
Definition
CaloTopoEMlayers.py:81
CaloTopoEMlayers.make_CaloTopoEMlayers
make_CaloTopoEMlayers(flags, name=None, suffix=None, version=None, key=CALOCORR_DEFAULT_KEY, source=None, confclass=None, cells_name=None, **kw)
Definition
CaloTopoEMlayers.py:61
Generated on
for ATLAS Offline Software by
1.17.0