ATLAS Offline Software
Calorimeter/CaloClusterCorrection/python/constants.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/constants.py
5 # Created: Nov 2009, sss
6 # Purpose: Some constants used for the cluster correction configuration.
7 #
8 # Broken out from common.py so that they can be used in contexts where
9 # it's too early to import common.py.
10 #
11 
12 # Correction class strings.
13 # In cool, we make folders with paths like
14 # /CALO/<classname>/<correction name>
15 # We want to group together, i.e, all SW corrections and topo corrections.
16 CALOCORR_SW = 'CaloSwClusterCorrections'
17 CALOCORR_EMTOPO = 'EMTopoClusterCorrections'
18 
19 # Lists of implemented cluster type keys. Need to be here rather than
20 # in the top-level steering modules to avoid circular imports.
21 sw_valid_keys = ['ele55', 'ele35', 'ele37',
22  'gam55', 'gam35', 'gam37']
23 topoem_valid_keys = ['ele633', 'gam633', 'ele420']
24 
25 # Region codes from CaloClusterCorrectionCommon.h.
26 CALOCORR_EMB1 = 0
27 CALOCORR_EMB2 = 1
28 CALOCORR_EME1 = 2
29 CALOCORR_EME2 = 3
30 CALOCORR_COMBINED2 = 4
31 CALOCORR_CLUSTER = 5
32 
33 # Origin codes. For reading from job options, pool, or cool.
34 CALOCORR_JO = 'jo'
35 CALOCORR_POOL = 'pool'
36 CALOCORR_COOL = 'cool'
37 
38 # Used to mark a tool that shouldn't be saved to pool.
39 CALOCORR_NOPOOL = 'nopool'
40 
41 # Special case for constructing a tool to write constants to pool.
42 # Acts like CALOCORR_JO, except that if the tool is marked
43 # with CALOCORR_NOPOOL,
44 # we don't make the tool. Also, we set the name appropriately for writing
45 # to pool.
46 CALOCORR_TOPOOL = 'topool'
47 
48 # Some default settings.
49 CALOCORR_DEFAULT_KEY = 'ele55'
50 
51 # Symbolic names for calorimeter samplings,
52 # and string representations for them.
53 EMB1 = 1
54 EMB2 = 2
55 EME1 = 5
56 EME2 = 6
57 
58 sampnames = { EMB1 : 'b1',
59  EMB2 : 'b2',
60  EME1 : 'e1',
61  EME2 : 'e2',
62  None : '',
63  }