ATLAS Offline Software
Loading...
Searching...
No Matches
egammaSumCellsGainAlgConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3#
4# @file egammaD3PDAnalysis/python/egamaSumCellsGainAlgConfig.py
5# @author Mike Hance
6# @date Aug. 2013
7# @brief Configure egamaSumCellsGainAlgAlg to fill UserData.
8#
9
10
11from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
12from D3PDMakerCoreComps.resolveSGKey import resolveSGKey
13from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
14from AthenaConfiguration.ComponentFactory import CompFactory
15
16D3PD = CompFactory.D3PD
17
18
20 (flags,
21 prefix = '',
22 sgkey = D3PDMakerFlags.ElectronSGKey,
23 typeName = 'ElectronContainer',
24 allowMissing = False):
25 """Configure egammaSumCellsGainAlg for D3PD making.
26
27 PREFIX is a prefix to add to the name of the algorithm scheduled.
28
29 SGKEY/TYPENAME is the StoreGate key of the input electron container
30 and the name of its type.
31
32 If ALLOWMISSING is true, don't fail if the SG key doesn't exist.
33 """
34
35 acc = ComponentAccumulator()
36
37 if (not D3PDMakerFlags.MakeEgammaUserData or
38 D3PDMakerFlags.HaveEgammaUserData):
39 return acc
40
42 resolved_sgkey = resolveSGKey (flags, sgkey)
43 auxprefix = (D3PDMakerFlags.EgammaUserDataPrefix + '_' +
44 resolved_sgkey + '_')
45
46 algName = 'egammaSumCellsGainAlg' + resolved_sgkey
47
49 (algName,
50 Getter = DVGetter
51 (prefix + 'egammaSumCellsGainAlgGetter',
52 TypeName = typeName,
53 SGKey = sgkey),
54 AllowMissing = allowMissing,
55 AuxPrefix = auxprefix,)
56
57 acc.addEventAlgo (myAlg)
58
59 return acc
Getter tool to retrieve DataVector/List collections from StoreGate.
Find most energetic cell in the middle layer for an egamma object and store in UserData.
egammaSumCellsGainAlgCfg(flags, prefix='', sgkey=D3PDMakerFlags.ElectronSGKey, typeName='ElectronContainer', allowMissing=False)