10from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
11from D3PDMakerCoreComps.resolveSGKey
import resolveSGKey
12from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
13from AthenaConfiguration.ComponentFactory
import CompFactory
15D3PD = CompFactory.D3PD
21 sgkey = D3PDMakerFlags.ElectronSGKey,
22 typeName =
'ElectronContainer',
23 allowMissing =
False):
24 """Configure egammaNbCellsGainAlg for D3PD making.
26 PREFIX is a prefix to add to the name of the algorithm scheduled.
28 SGKEY/TYPENAME is the StoreGate key of the input electron container
29 and the name of its type.
31 If ALLOWMISSING is true, don't fail if the SG key doesn't exist.
34 acc = ComponentAccumulator()
36 if (
not D3PDMakerFlags.MakeEgammaUserData
or
37 D3PDMakerFlags.HaveEgammaUserData):
41 resolved_sgkey = resolveSGKey (flags, sgkey)
42 auxprefix = (D3PDMakerFlags.EgammaUserDataPrefix +
'_' +
45 algName =
'egammaNbCellsGainAlg' + resolved_sgkey
50 (prefix +
'egammaNbCellsGainAlgGetter',
53 AllowMissing = allowMissing,
54 AuxPrefix = auxprefix,)
56 acc.addEventAlgo (myAlg)
Count the number of cells in each gain, layer by layer.
egammaNbCellsGainAlgCfg(flags, prefix='', sgkey=D3PDMakerFlags.ElectronSGKey, typeName='ElectronContainer', allowMissing=False)