ATLAS Offline Software
CaloRingerKeys.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 __doc__ = """CaloRingerKeys.py contains the input and output types used by
4 CaloRinger Algorithm and Tools. It is inpired in egammaKeys.py by Bruno
5 Lenzi"""
6 __author__ = "Werner S. Freund"
7 
8 # Temporary solution just to emulate what was being done in egammaGetter.py
9 from egammaRec.egammaKeys import egammaKeysDict
10 
12  return 'xAOD::RingSetContainer'
13 
15  return 'xAOD::CaloRingsContainer'
16 
18  return 'xAOD::RingSetConfContainer'
19 
21  return 'xAOD::RingSetAuxContainer'
22 
24  return 'xAOD::CaloRingsAuxContainer'
25 
27  return 'xAOD::RingSetConfAuxContainer'
28 
30 
31  # Copy dictionary value, key key with same name:
32  inputs = dict(
33  Electron = egammaKeysDict.outputs.get ( "Electron" ),
34  Photon = egammaKeysDict.outputs.get ( "Photon" ),
35  )
36 
37  # Define new outputs here:
38  _output_values = [
39  [outputRingSetType(), 'ElectronRingSets', ''],
40  [outputRingSetType(), 'ElectronAsymRingSets', ''],
41  [outputCaloRingsType(), 'ElectronCaloRings', ''],
42  [outputCaloRingsType(), 'ElectronCaloAsymRings', ''],
43  [outputRingSetType(), 'PhotonRingSets', ''],
44  [outputRingSetType(), 'PhotonAsymRingSets', ''],
45  [outputCaloRingsType(), 'PhotonCaloRings', ''],
46  [outputCaloRingsType(), 'PhotonCaloAsymRings', ''],
47  ]
48 
49  # This will keep dict key equal to Container key:
50  outputs = {value[1]: value for value in _output_values}
51 
52  # Keys in this dictionary must be different from _output_values
53  # for CaloRingerOutputItemList be able to distinguish if an output comes
54  # from outputs or outputsMetaData
55  _outputMetaData_values = [
56  [outputRingSetConfType(), 'ElectronRingSetsConf' , ''],
57  [outputRingSetConfType(), 'PhotonRingSetsConf' , ''],
58  ]
59 
60  # This will keep dict key equal to Container key:
61  outputsMetaData = {value[1]: value for value in _outputMetaData_values}
62 
63 
70 for i, j in CaloRingerKeysDict.inputs.items():
71  globals()['input%sType'%i] = lambda x = j[0]: '%s' % x
72  globals()['input%sKey' %i] = lambda x = j[1]: '%s' % x
73 #
74 for i, j in CaloRingerKeysDict.outputs.items():
75  globals()['output%sType'%i] = lambda x = j[0]: '%s' % x
76  globals()['output%sKey' %i] = lambda x = j[1]: '%s' % x
77 #
78 for i, j in CaloRingerKeysDict.outputsMetaData.items():
79  globals()['output%sType'%i] = lambda x = j[0]: '%s' % x
80  globals()['output%sKey' %i] = lambda x = j[1]: '%s' % x
81 
82 
CaloRingerKeys.outputCaloRingsAuxType
def outputCaloRingsAuxType()
Definition: CaloRingerKeys.py:23
CaloRingerKeys.outputRingSetConfAuxType
def outputRingSetConfAuxType()
Definition: CaloRingerKeys.py:26
CaloRingerKeys.outputCaloRingsType
def outputCaloRingsType()
Definition: CaloRingerKeys.py:14
CaloRingerKeys.outputRingSetType
def outputRingSetType()
Definition: CaloRingerKeys.py:11
CaloRingerKeys.outputRingSetAuxType
def outputRingSetAuxType()
Definition: CaloRingerKeys.py:20
CaloRingerKeys.outputRingSetConfType
def outputRingSetConfType()
Definition: CaloRingerKeys.py:17
CaloRingerKeys.CaloRingerKeysDict
Definition: CaloRingerKeys.py:29