ATLAS Offline Software
CaloRingerAlgsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaCommon.SystemOfUnits import GeV
6 from ROOT import CaloCell_ID
7 
8 def CaloRingsElectronBuilderCfg(flags, name="CaloRingsElectronBuilder", **kwargs):
9  kwargs.setdefault('EtaWidth', [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.2])
10  kwargs.setdefault('PhiWidth', [0.098174770424681, 0.098174770424681, 0.024543692606170,
11  0.024543692606170, 0.098174770424681, 0.098174770424681, 0.098174770424681])
12  kwargs.setdefault('NRings', [8, 64, 8, 8, 4, 4, 4])
13  kwargs.setdefault('CellMaxDEtaDist', .2)
14  kwargs.setdefault('CellMaxDPhiDist', .2)
15  kwargs.setdefault('Layers', [CaloCell_ID.PreSamplerB, CaloCell_ID.PreSamplerE,
16  CaloCell_ID.EMB1, CaloCell_ID.EME1,
17  CaloCell_ID.EMB2, CaloCell_ID.EME2,
18  CaloCell_ID.EMB3, CaloCell_ID.EME3,
19  CaloCell_ID.HEC0, CaloCell_ID.TileBar0,
20  CaloCell_ID.TileGap3, CaloCell_ID.TileExt0,
21  CaloCell_ID.HEC1, CaloCell_ID.HEC2,
22  CaloCell_ID.TileBar1, CaloCell_ID.TileGap1,
23  CaloCell_ID.TileExt1,
24  CaloCell_ID.HEC3, CaloCell_ID.TileBar2,
25  CaloCell_ID.TileGap2, CaloCell_ID.TileExt2])
26  kwargs.setdefault('RingSetNLayers', [2, 2, 2, 2, 4, 5, 4])
27  kwargs.setdefault('useShowerShapeBarycenter', flags.CaloRinger.useShowerShapeBarycenter)
28  kwargs.setdefault('CellsContainerName', flags.Egamma.Keys.Input.CaloCells)
29  kwargs.setdefault('CaloRingsContainerName', 'ElectronCaloRings')
30  kwargs.setdefault('RingSetContainerName', 'ElectronRingSets')
31  kwargs.setdefault('MinPartEnergy', flags.CaloRinger.minElectronEnergy*GeV)
32  kwargs.setdefault('doTransverseEnergy',flags.CaloRinger.doTransverseEnergy)
33 
34  tool = CompFactory.Ringer.CaloRingsBuilder(name, **kwargs)
35  return tool
36 
37 def CaloRingsAsymElectronBuilderCfg(flags, name="CaloRingsAsymElectronBuilder", **kwargs):
38  NRings = [8, 64, 8, 8, 4, 4, 4]
39  kwargs.setdefault('EtaWidth', [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.2])
40  kwargs.setdefault('PhiWidth', [0.098174770424681, 0.098174770424681,
41  0.024543692606170, 0.024543692606170,
42  0.098174770424681, 0.098174770424681,
43  0.098174770424681])
44  kwargs.setdefault('NRings', [(rings-1)*4+1 for rings in NRings])
45  kwargs.setdefault('CellMaxDEtaDist', .2)
46  kwargs.setdefault('CellMaxDPhiDist', .2)
47  kwargs.setdefault('Layers', [CaloCell_ID.PreSamplerB, CaloCell_ID.PreSamplerE,
48  CaloCell_ID.EMB1, CaloCell_ID.EME1,
49  CaloCell_ID.EMB2, CaloCell_ID.EME2,
50  CaloCell_ID.EMB3, CaloCell_ID.EME3,
51  CaloCell_ID.HEC0, CaloCell_ID.TileBar0,
52  CaloCell_ID.TileGap3, CaloCell_ID.TileExt0,
53  CaloCell_ID.HEC1, CaloCell_ID.HEC2,
54  CaloCell_ID.TileBar1, CaloCell_ID.TileGap1,
55  CaloCell_ID.TileExt1,
56  CaloCell_ID.HEC3, CaloCell_ID.TileBar2,
57  CaloCell_ID.TileGap2, CaloCell_ID.TileExt2])
58  kwargs.setdefault('RingSetNLayers', [2, 2, 2, 2, 4, 5, 4])
59  kwargs.setdefault('useShowerShapeBarycenter', flags.CaloRinger.useShowerShapeBarycenter)
60  kwargs.setdefault('CellsContainerName', flags.Egamma.Keys.Input.CaloCells)
61  kwargs.setdefault('CaloRingsContainerName', 'ElectronCaloAsymRings')
62  kwargs.setdefault('RingSetContainerName', 'ElectronAsymRingSets')
63  kwargs.setdefault('MinPartEnergy',flags.CaloRinger.minElectronEnergy*GeV)
64  kwargs.setdefault('doTransverseEnergy',flags.CaloRinger.doTransverseEnergy)
65  kwargs.setdefault('doEtaAxesDivision',True)
66  kwargs.setdefault('doPhiAxesDivision',True)
67 
68  tool = CompFactory.Ringer.CaloAsymRingsBuilder(name, **kwargs)
69  return tool
70 
71 
72 def CaloRingsStripsElectronBuilderCfg(flags, name="CaloRingsStripsElectronBuilder", **kwargs):
73  kwargs.setdefault('EtaWidth', [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.2])
74  kwargs.setdefault('PhiWidth', [0.098174770424681, 0.098174770424681,
75  0.024543692606170, 0.024543692606170,
76  0.098174770424681, 0.098174770424681,
77  0.098174770424681])
78  kwargs.setdefault('NRings', [28, 252, 28, 14, 8, 8, 4])
79  kwargs.setdefault('Axis', 0)
80  kwargs.setdefault('CellMaxDEtaDist', .2)
81  kwargs.setdefault('CellMaxDPhiDist', .2)
82  kwargs.setdefault('Layers', [CaloCell_ID.PreSamplerB, CaloCell_ID.PreSamplerE,
83  CaloCell_ID.EMB1, CaloCell_ID.EME1,
84  CaloCell_ID.EMB2, CaloCell_ID.EME2,
85  CaloCell_ID.EMB3, CaloCell_ID.EME3,
86  CaloCell_ID.HEC0, CaloCell_ID.TileBar0,
87  CaloCell_ID.TileGap3, CaloCell_ID.TileExt0,
88  CaloCell_ID.HEC1, CaloCell_ID.HEC2,
89  CaloCell_ID.TileBar1, CaloCell_ID.TileGap1,
90  CaloCell_ID.TileExt1,
91  CaloCell_ID.HEC3, CaloCell_ID.TileBar2,
92  CaloCell_ID.TileGap2, CaloCell_ID.TileExt2])
93  kwargs.setdefault('RingSetNLayers', [2, 2, 2, 2, 4, 5, 4])
94  kwargs.setdefault('useShowerShapeBarycenter', flags.CaloRinger.useShowerShapeBarycenter)
95  kwargs.setdefault('CellsContainerName', flags.Egamma.Keys.Input.CaloCells)
96  kwargs.setdefault('CaloRingsContainerName', 'ElectronCaloStripsRings')
97  kwargs.setdefault('RingSetContainerName', 'ElectronStripsRingSets')
98  kwargs.setdefault('MinPartEnergy',flags.CaloRinger.minElectronEnergy*GeV)
99  kwargs.setdefault('doTransverseEnergy',flags.CaloRinger.doTransverseEnergy)
100  kwargs.setdefault('doEtaAxesDivision',True)
101  kwargs.setdefault('doPhiAxesDivision',True)
102 
103  tool = CompFactory.Ringer.CaloStripsRingsBuilder(name, **kwargs)
104  return tool
105 
106 def CaloRingsPhotonBuilderCfg(flags, name="CaloRingsPhotonBuilder", **kwargs):
107  kwargs.setdefault('EtaWidth', [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.2])
108  kwargs.setdefault('PhiWidth', [0.098174770424681, 0.098174770424681,
109  0.024543692606170, 0.024543692606170,
110  0.098174770424681, 0.098174770424681,
111  0.098174770424681])
112  kwargs.setdefault('NRings', [8, 64, 8, 8, 4, 4, 4])
113  kwargs.setdefault('CellMaxDEtaDist', .2)
114  kwargs.setdefault('CellMaxDPhiDist', .2)
115  kwargs.setdefault('Layers', [CaloCell_ID.PreSamplerB, CaloCell_ID.PreSamplerE,
116  CaloCell_ID.EMB1, CaloCell_ID.EME1,
117  CaloCell_ID.EMB2, CaloCell_ID.EME2,
118  CaloCell_ID.EMB3, CaloCell_ID.EME3,
119  CaloCell_ID.HEC0, CaloCell_ID.TileBar0,
120  CaloCell_ID.TileGap3, CaloCell_ID.TileExt0,
121  CaloCell_ID.HEC1, CaloCell_ID.HEC2,
122  CaloCell_ID.TileBar1, CaloCell_ID.TileGap1,
123  CaloCell_ID.TileExt1,
124  CaloCell_ID.HEC3, CaloCell_ID.TileBar2,
125  CaloCell_ID.TileGap2, CaloCell_ID.TileExt2])
126  kwargs.setdefault('RingSetNLayers', [2, 2, 2, 2, 4, 5, 4])
127  kwargs.setdefault('useShowerShapeBarycenter', flags.CaloRinger.useShowerShapeBarycenter)
128  kwargs.setdefault('CellsContainerName', flags.Egamma.Keys.Input.CaloCells)
129  kwargs.setdefault('CaloRingsContainerName', 'PhotonCaloRings')
130  kwargs.setdefault('RingSetContainerName', 'PhotonRingSets')
131  kwargs.setdefault('MinPartEnergy', flags.CaloRinger.minPhotonEnergy*GeV)
132  kwargs.setdefault('doTransverseEnergy',flags.CaloRinger.doTransverseEnergy)
133 
134  tool = CompFactory.Ringer.CaloRingsBuilder(name, **kwargs)
135  return tool
136 
137 
138 def CaloRingsAsymPhotonBuilderCfg(flags, name="CaloRingsAsymPhotonBuilder", **kwargs):
139  NRings = [8, 64, 8, 8, 4, 4, 4]
140  kwargs.setdefault('EtaWidth', [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.2])
141  kwargs.setdefault('PhiWidth', [0.098174770424681, 0.098174770424681,
142  0.024543692606170, 0.024543692606170,
143  0.098174770424681, 0.098174770424681,
144  0.098174770424681])
145  kwargs.setdefault('NRings', [(rings-1)*4+1 for rings in NRings])
146  kwargs.setdefault('CellMaxDEtaDist', .2)
147  kwargs.setdefault('CellMaxDPhiDist', .2)
148  kwargs.setdefault('Layers', [CaloCell_ID.PreSamplerB, CaloCell_ID.PreSamplerE,
149  CaloCell_ID.EMB1, CaloCell_ID.EME1,
150  CaloCell_ID.EMB2, CaloCell_ID.EME2,
151  CaloCell_ID.EMB3, CaloCell_ID.EME3,
152  CaloCell_ID.HEC0, CaloCell_ID.TileBar0,
153  CaloCell_ID.TileGap3, CaloCell_ID.TileExt0,
154  CaloCell_ID.HEC1, CaloCell_ID.HEC2,
155  CaloCell_ID.TileBar1, CaloCell_ID.TileGap1,
156  CaloCell_ID.TileExt1,
157  CaloCell_ID.HEC3, CaloCell_ID.TileBar2,
158  CaloCell_ID.TileGap2, CaloCell_ID.TileExt2])
159  kwargs.setdefault('RingSetNLayers', [2, 2, 2, 2, 4, 5, 4])
160  kwargs.setdefault('useShowerShapeBarycenter', flags.CaloRinger.useShowerShapeBarycenter)
161  kwargs.setdefault('CellsContainerName', flags.Egamma.Keys.Input.CaloCells)
162  kwargs.setdefault('CaloRingsContainerName', 'PhotonCaloAsymRings')
163  kwargs.setdefault('RingSetContainerName', 'PhotonAsymRingSets')
164  kwargs.setdefault('MinPartEnergy', flags.CaloRinger.minPhotonEnergy*GeV)
165  kwargs.setdefault('doTransverseEnergy',flags.CaloRinger.doTransverseEnergy)
166  kwargs.setdefault('doEtaAxesDivision',True)
167  kwargs.setdefault('doPhiAxesDivision',True)
168 
169  tool = CompFactory.Ringer.CaloAsymRingsBuilder(name, **kwargs)
170  return tool
171 
172 
173 def CaloRingsStripsPhotonBuilderCfg(flags, name="CaloRingsStripsPhotonBuilder", **kwargs):
174  kwargs.setdefault('EtaWidth', [0.025, 0.003125, 0.025, 0.05, 0.1, 0.1, 0.2])
175  kwargs.setdefault('PhiWidth', [0.098174770424681, 0.098174770424681,
176  0.024543692606170, 0.024543692606170,
177  0.098174770424681, 0.098174770424681,
178  0.098174770424681])
179  kwargs.setdefault('NRings', [28, 252, 28, 14, 8, 8, 4])
180  kwargs.setdefault('Axis', 0)
181  kwargs.setdefault('CellMaxDEtaDist', .2)
182  kwargs.setdefault('CellMaxDPhiDist', .2)
183  kwargs.setdefault('Layers', [CaloCell_ID.PreSamplerB, CaloCell_ID.PreSamplerE,
184  CaloCell_ID.EMB1, CaloCell_ID.EME1,
185  CaloCell_ID.EMB2, CaloCell_ID.EME2,
186  CaloCell_ID.EMB3, CaloCell_ID.EME3,
187  CaloCell_ID.HEC0, CaloCell_ID.TileBar0,
188  CaloCell_ID.TileGap3, CaloCell_ID.TileExt0,
189  CaloCell_ID.HEC1, CaloCell_ID.HEC2,
190  CaloCell_ID.TileBar1, CaloCell_ID.TileGap1,
191  CaloCell_ID.TileExt1,
192  CaloCell_ID.HEC3, CaloCell_ID.TileBar2,
193  CaloCell_ID.TileGap2, CaloCell_ID.TileExt2])
194  kwargs.setdefault('RingSetNLayers', [2, 2, 2, 2, 4, 5, 4])
195  kwargs.setdefault('useShowerShapeBarycenter', flags.CaloRinger.useShowerShapeBarycenter)
196  kwargs.setdefault('CellsContainerName', flags.Egamma.Keys.Input.CaloCells)
197  kwargs.setdefault('CaloRingsContainerName', 'PhotonCaloStripsRings')
198  kwargs.setdefault('RingSetContainerName', 'PhotonStripsRingSets')
199  kwargs.setdefault('MinPartEnergy', flags.CaloRinger.minPhotonEnergy*GeV)
200  kwargs.setdefault('doTransverseEnergy',flags.CaloRinger.doTransverseEnergy)
201  kwargs.setdefault('doEtaAxesDivision',True)
202  kwargs.setdefault('doPhiAxesDivision',True)
203 
204  tool = CompFactory.Ringer.CaloStripsRingsBuilder(name, **kwargs)
205  return tool
206 
207 
208 def CaloRingerElectronsInputReaderCfg(flags, name="CaloRingerElectronsReader", **kwargs):
209  if 'Asym' in name:
210  builderTool = CaloRingsAsymElectronBuilderCfg(flags)
211  elif 'Strips' in name:
212  builderTool = CaloRingsStripsElectronBuilderCfg(flags)
213  else:
214  builderTool = CaloRingsElectronBuilderCfg(flags)
215 
216  kwargs.setdefault('crBuilder', builderTool)
217  kwargs.setdefault('inputKey', flags.Egamma.Keys.Output.Electrons)
218  kwargs.setdefault('builderAvailable', True)
219  inputReaderTool = CompFactory.Ringer.CaloRingerElectronsReader(name, **kwargs)
220 
221  return inputReaderTool, builderTool
222 
223 
224 def CaloRingerPhotonsInputReaderCfg(flags,name="CaloRingerPhotonsReader",**kwargs):
225  if 'Asym' in name:
226  builderTool = CaloRingsAsymPhotonBuilderCfg(flags)
227  elif 'Strips' in name:
228  builderTool = CaloRingsStripsPhotonBuilderCfg(flags)
229  else:
230  builderTool = CaloRingsPhotonBuilderCfg(flags)
231 
232  kwargs.setdefault('crBuilder', builderTool)
233  kwargs.setdefault('inputKey', flags.Egamma.Keys.Output.Photons)
234  kwargs.setdefault('builderAvailable', True)
235  inputReaderTool = CompFactory.Ringer.CaloRingerPhotonsReader(name, **kwargs)
236 
237  return inputReaderTool, builderTool
238 
239 def CaloRingerElectronAlgsCfg(flags, name="CaloRingerElectronAlgorithm", **kwargs):
240  electronInputReaderTool, electronBuilderTool = CaloRingerElectronsInputReaderCfg(flags)
241  acc = ComponentAccumulator()
242  acc.addPublicTool(electronBuilderTool)
243  acc.addPublicTool(electronInputReaderTool)
244  kwargs.setdefault('inputReaderTools', electronInputReaderTool)
245 
246  CaloRingerAlgorithm = CompFactory.Ringer.CaloRingerAlgorithm(name='CaloRingerElectronAlgorithm', **kwargs)
247  acc.addEventAlgo(CaloRingerAlgorithm)
248  return acc
249 
250 def CaloRingerAsymElectronAlgsCfg(flags, name="CaloRingerAsymElectronAlgorithm", **kwargs):
251  electronAsymInputReaderTool, electronAsymBuilderTool = CaloRingerElectronsInputReaderCfg(flags, name='CaloRingerAsymElectronAlgorithm')
252  acc = ComponentAccumulator()
253  acc.addPublicTool(electronAsymBuilderTool)
254  acc.addPublicTool(electronAsymInputReaderTool)
255  kwargs.setdefault('inputReaderTools', electronAsymInputReaderTool)
256 
257  CaloRingerAsymAlgorithm = CompFactory.Ringer.CaloRingerAlgorithm(name='CaloRingerAsymAlgorithm', **kwargs)
258  acc.addEventAlgo(CaloRingerAsymAlgorithm)
259  return acc
260 
261 def CaloRingerStripsElectronAlgsCfg(flags, name="CaloRingerStripsElectronAlgorithm", **kwargs):
262  electronStripsInputReaderTool, electronStripsBuilderTool = CaloRingerElectronsInputReaderCfg(flags, name='CaloRingerStripsElectronReader')
263  acc = ComponentAccumulator()
264  acc.addPublicTool(electronStripsBuilderTool)
265  acc.addPublicTool(electronStripsInputReaderTool)
266  kwargs.setdefault('inputReaderTools', electronStripsInputReaderTool)
267 
268  CaloRingerStripsAlgorithm = CompFactory.Ringer.CaloRingerAlgorithm(name='CaloRingerStripsElectronAlgorithm', **kwargs)
269  acc.addEventAlgo(CaloRingerStripsAlgorithm)
270  return acc
271 
272 def CaloRingerPhotonAlgsCfg(flags, name="CaloRingerPhotonAlgorithm", **kwargs):
273  photonInputReaderTool, photonBuilderTool = CaloRingerPhotonsInputReaderCfg(flags)
274  acc = ComponentAccumulator()
275  acc.addPublicTool(photonBuilderTool)
276  acc.addPublicTool(photonInputReaderTool)
277  kwargs.setdefault('inputReaderTools', photonInputReaderTool)
278 
279  CaloRingerAlgorithm = CompFactory.Ringer.CaloRingerAlgorithm(name='CaloRingerPhotonAlgorithm', **kwargs)
280  acc.addEventAlgo(CaloRingerAlgorithm)
281  return acc
282 
283 def CaloRingerAsymPhotonAlgsCfg(flags, name="CaloAsymRingerAlgorithm", **kwargs):
284  photonAsymInputReaderTool, photonAsymBuilderTool = CaloRingerPhotonsInputReaderCfg(flags, name='CaloAsymRingerPhotonReader')
285  acc = ComponentAccumulator()
286  acc.addPublicTool(photonAsymBuilderTool)
287  acc.addPublicTool(photonAsymInputReaderTool)
288  kwargs.setdefault('inputReaderTools', photonAsymInputReaderTool)
289 
290  CaloAsymRingerAlgorithm = CompFactory.Ringer.CaloRingerAlgorithm(name='CaloAsymRingerAlgorithm', **kwargs)
291  acc.addEventAlgo(CaloAsymRingerAlgorithm)
292  return acc
293 
294 def CaloRingerStripsPhotonAlgsCfg(flags, name="CaloRingerStripsAlgorithm", **kwargs):
295  photonStripsInputReaderTool, photonStripsBuilderTool = CaloRingerPhotonsInputReaderCfg(flags, name='CaloRingerStripsPhotonReader')
296  acc = ComponentAccumulator()
297  acc.addPublicTool(photonStripsBuilderTool)
298  acc.addPublicTool(photonStripsInputReaderTool)
299  kwargs.setdefault('inputReaderTools', photonStripsInputReaderTool)
300 
301  CaloRingerStripsAlgorithm = CompFactory.Ringer.CaloRingerAlgorithm(name='CaloRingerStripsAlgorithm', **kwargs)
302  acc.addEventAlgo(CaloRingerStripsAlgorithm)
303  return acc
304 
305 def CaloRingerOutputCfg(flags,name="CaloRingerOutputList"):
306  from OutputStreamAthenaPool.OutputStreamConfig import addToAOD, addToESD
307  acc = ComponentAccumulator()
308 
309  toOutput = []
310  if flags.CaloRinger.buildElectronRings:
311  toOutput +=[ 'xAOD::RingSetContainer#ElectronRingSets',
312  'xAOD::RingSetAuxContainer#ElectronRingSetsAux.',
313  'xAOD::CaloRingsContainer#ElectronCaloRings',
314  'xAOD::CaloRingsAuxContainer#ElectronCaloRingsAux.',
315  ]
316  if flags.CaloRinger.buildElectronAsymRings:
317  toOutput +=[ 'xAOD::RingSetContainer#ElectronAsymRingSets',
318  'xAOD::RingSetAuxContainer#ElectronAsymRingSetsAux.',
319  'xAOD::CaloRingsContainer#ElectronCaloAsymRings',
320  'xAOD::CaloRingsAuxContainer#ElectronCaloAsymRingsAux.',
321  ]
322  if flags.CaloRinger.buildElectronStripsRings:
323  toOutput +=[ 'xAOD::RingSetContainer#ElectronStripsRingSets',
324  'xAOD::RingSetAuxContainer#ElectronStripsRingSetsAux.',
325  'xAOD::CaloRingsContainer#ElectronCaloStripsRings',
326  'xAOD::CaloRingsAuxContainer#ElectronCaloStripsRingsAux.',
327  ]
328  if flags.CaloRinger.buildPhotonRings:
329  toOutput += [
330  'xAOD::RingSetContainer#PhotonRingSets',
331  'xAOD::RingSetAuxContainer#PhotonRingSetsAux.',
332  'xAOD::CaloRingsContainer#PhotonCaloRings',
333  'xAOD::CaloRingsAuxContainer#PhotonCaloRingsAux.'
334  ]
335  if flags.CaloRinger.buildPhotonAsymRings:
336  toOutput +=[
337  'xAOD::RingSetContainer#PhotonAsymRingSets',
338  'xAOD::RingSetAuxContainer#PhotonAsymRingSetsAux.',
339  'xAOD::CaloRingsContainer#PhotonCaloAsymRings',
340  'xAOD::CaloRingsAuxContainer#PhotonCaloAsymRingsAux.',
341  ]
342  if flags.CaloRinger.buildPhotonStripsRings:
343  toOutput +=[
344  'xAOD::RingSetContainer#PhotonStripsRingSets',
345  'xAOD::RingSetAuxContainer#PhotonStripsRingSetsAux.',
346  'xAOD::CaloRingsContainer#PhotonCaloStripsRings',
347  'xAOD::CaloRingsAuxContainer#PhotonCaloStripsRingsAux.',
348  ]
349  if flags.Output.doWriteAOD:
350  acc.merge(addToAOD(flags, toOutput))
351  if flags.Output.doWriteESD:
352  acc.merge(addToESD(flags, toOutput))
353 
354  return acc
355 
356 def CaloRingerSteeringCfg(flags,name="CaloRingerSteering"):
357  acc = ComponentAccumulator()
358 
359  if flags.CaloRinger.buildElectronRings:
360  acc.merge(CaloRingerElectronAlgsCfg(flags))
361  if flags.CaloRinger.buildElectronAsymRings:
362  acc.merge(CaloRingerAsymElectronAlgsCfg(flags))
363  if flags.CaloRinger.buildElectronStripsRings:
364  acc.merge(CaloRingerStripsElectronAlgsCfg(flags))
365 
366  if flags.CaloRinger.buildPhotonRings:
367  acc.merge(CaloRingerPhotonAlgsCfg(flags))
368  if flags.CaloRinger.buildPhotonAsymRings:
369  acc.merge(CaloRingerAsymPhotonAlgsCfg(flags))
370  if flags.CaloRinger.buildPhotonStripsRings:
371  acc.merge(CaloRingerStripsPhotonAlgsCfg(flags))
372 
373  acc.merge(CaloRingerOutputCfg(flags))
374  return acc
375 
376 
377 if __name__ == '__main__':
378  from AthenaConfiguration.AllConfigFlags import initConfigFlags
379  from AthenaConfiguration.TestDefaults import defaultTestFiles
380  flags = initConfigFlags()
381  flags.Input.Files = defaultTestFiles.RDO_RUN2
382  flags.Output.doWriteAOD = True
383  flags.Output.ESDFileName = 'testing.ESD.root'
384  flags.lock()
385  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
386  cfg = MainServicesCfg(flags)
387  cfg.merge(CaloRingerSteeringCfg(flags))
CaloRingerAlgsConfig.CaloRingerStripsElectronAlgsCfg
def CaloRingerStripsElectronAlgsCfg(flags, name="CaloRingerStripsElectronAlgorithm", **kwargs)
Definition: CaloRingerAlgsConfig.py:261
SystemOfUnits
CaloRingerAlgsConfig.CaloRingerElectronsInputReaderCfg
def CaloRingerElectronsInputReaderCfg(flags, name="CaloRingerElectronsReader", **kwargs)
Definition: CaloRingerAlgsConfig.py:208
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloRingerAlgsConfig.CaloRingsPhotonBuilderCfg
def CaloRingsPhotonBuilderCfg(flags, name="CaloRingsPhotonBuilder", **kwargs)
Definition: CaloRingerAlgsConfig.py:106
CaloRingerAlgsConfig.CaloRingsElectronBuilderCfg
def CaloRingsElectronBuilderCfg(flags, name="CaloRingsElectronBuilder", **kwargs)
Definition: CaloRingerAlgsConfig.py:8
CaloRingerAlgsConfig.CaloRingsStripsPhotonBuilderCfg
def CaloRingsStripsPhotonBuilderCfg(flags, name="CaloRingsStripsPhotonBuilder", **kwargs)
Definition: CaloRingerAlgsConfig.py:173
CaloRingerAlgsConfig.CaloRingerSteeringCfg
def CaloRingerSteeringCfg(flags, name="CaloRingerSteering")
Definition: CaloRingerAlgsConfig.py:356
CaloRingerAlgsConfig.CaloRingerStripsPhotonAlgsCfg
def CaloRingerStripsPhotonAlgsCfg(flags, name="CaloRingerStripsAlgorithm", **kwargs)
Definition: CaloRingerAlgsConfig.py:294
CaloRingerAlgsConfig.CaloRingerAsymPhotonAlgsCfg
def CaloRingerAsymPhotonAlgsCfg(flags, name="CaloAsymRingerAlgorithm", **kwargs)
Definition: CaloRingerAlgsConfig.py:283
CaloRingerAlgsConfig.CaloRingsAsymPhotonBuilderCfg
def CaloRingsAsymPhotonBuilderCfg(flags, name="CaloRingsAsymPhotonBuilder", **kwargs)
Definition: CaloRingerAlgsConfig.py:138
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
CaloRingerAlgsConfig.CaloRingerOutputCfg
def CaloRingerOutputCfg(flags, name="CaloRingerOutputList")
Definition: CaloRingerAlgsConfig.py:305
CaloRingerAlgsConfig.CaloRingsStripsElectronBuilderCfg
def CaloRingsStripsElectronBuilderCfg(flags, name="CaloRingsStripsElectronBuilder", **kwargs)
Definition: CaloRingerAlgsConfig.py:72
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
CaloRingerAlgsConfig.CaloRingerAsymElectronAlgsCfg
def CaloRingerAsymElectronAlgsCfg(flags, name="CaloRingerAsymElectronAlgorithm", **kwargs)
Definition: CaloRingerAlgsConfig.py:250
CaloRingerAlgsConfig.CaloRingerElectronAlgsCfg
def CaloRingerElectronAlgsCfg(flags, name="CaloRingerElectronAlgorithm", **kwargs)
Definition: CaloRingerAlgsConfig.py:239
CaloRingerAlgsConfig.CaloRingsAsymElectronBuilderCfg
def CaloRingsAsymElectronBuilderCfg(flags, name="CaloRingsAsymElectronBuilder", **kwargs)
Definition: CaloRingerAlgsConfig.py:37
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
CaloRingerAlgsConfig.CaloRingerPhotonsInputReaderCfg
def CaloRingerPhotonsInputReaderCfg(flags, name="CaloRingerPhotonsReader", **kwargs)
Definition: CaloRingerAlgsConfig.py:224
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
CaloRingerAlgsConfig.CaloRingerPhotonAlgsCfg
def CaloRingerPhotonAlgsCfg(flags, name="CaloRingerPhotonAlgorithm", **kwargs)
Definition: CaloRingerAlgsConfig.py:272