ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSwClcon.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/CaloSwClcon.py
5# Created: Nov 2006, sss
6# Purpose: Steering module for cluster containment corrections.
7#
8# The cluster containment corrections scale the overall cluster energy
9# by a constant which is both eta end energy dependent.
10#
11# The original definition of this correction was to include only the energy
12# lost due to the spread of the cluster and the shower outside of the fixed
13# window. Later, this was used as a closure correction: it was set to get
14# the cluster energy back to the true value, thus including any effects
15# not otherwise accounted for. In the current version of the corrections,
16# this has been absorbed into the layer weights correction, and is no
17# longer used as a separate correction pass.
18#
19
20
21from AthenaConfiguration.ComponentFactory import CompFactory
22from CaloClusterCorrection.constants import \
23 CALOCORR_COOL, CALOCORR_DEFAULT_KEY, CALOCORR_SW
24from CaloClusterCorrection.common import makecorr
25
26#
27# This table lists all available versions of this correction.
28# See common.py for a description of the contents.
29#
30from CaloClusterCorrection.constants import sw_valid_keys as keys
31cls_g3 = CompFactory.CaloSwClcon_g3 # CaloClusterCorrection
32cls_v2 = CompFactory.CaloSwClcon_v2 # CaloClusterCorrection
33CaloSwClcon_versions = [
34
35 # The original G3-based correction, translated from the
36 # original fortran version.
37 ['g3', cls_g3, ['CaloSwClcon_g3.CaloSwClcon_g3_parms',
38 'caloswcorr_pool', CALOCORR_COOL], keys],
39
40 # DC2 simulation.
41 # To be used with the `old' layer weights corrections.
42 # Electrons at 50, 100, and 200 GeV were used.
43 # Added in LArClusterRec-02-05-25, in 9.0.3.
44 ['dc2', cls_v2, ['CaloSwClcon_dc2.CaloSwClcon_dc2_parms',
45 'caloswcorr_pool', CALOCORR_COOL], keys],
46
47 # DC2 simulation.
48 # To be used with the `904' LW corrections with DC2 data.
49 # Electrons at 20, 50, 100, 200, 500, and 1000 GeV were used.
50 # Added in LArClusterRec-02-05-32, in 10.0.1.
51 ['dc2new', cls_v2, ['CaloSwClcon_dc2new.CaloSwClcon_dc2new_parms',
52 'caloswcorr_pool', CALOCORR_COOL], keys],
53 ]
54
55
56#
57# Create a new tool instance.
58# FLAGS is the configuration flags instance.
59# NAME is the base name for this tool. If defaulted, a name will
60# be constructed from the name of the correction, the version, and the key.
61# If SUFFIX is not None, it will be added onto the end of the tool name.
62# VERSION is a string specifying which of several versions of the correction
63# to choose. If defaulted, the latest version of the correction is chosen.
64# KEY is a string to specify the type of cluster to which the correction
65# applies. The convention is to use `ele55' for 5x5 electron clusters,
66# `gam35' for 3x5 photon clusters, and so on.
67# SOURCE tells from where we should read the calibration constants.
68# See common.py for a description of the possibilities.
69# None means to use the default.
70# CONFCLASS gives the Configurable class to use to create the tool.
71# It may (and usually should) be defaulted.
72#
73# Additional keyword arguments may be passed to override any tool
74# parameters/constants.
75#
77 name = None,
78 suffix = None,
79 version = None,
80 key = CALOCORR_DEFAULT_KEY,
81 source = None,
82 confclass = None,
83 **kw):
84 # Make the tool.
85 return makecorr (flags,
86 versions = CaloSwClcon_versions,
87 name = name,
88 basename = 'clcon',
89 suffix = suffix,
90 version = version,
91 key = key,
92 sampling = None,
93 source = source,
94 confclass = confclass,
95 corrclass = CALOCORR_SW,
96 **kw)
97
make_CaloSwClcon(flags, name=None, suffix=None, version=None, key=CALOCORR_DEFAULT_KEY, source=None, confclass=None, **kw)