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
Find most energetic cell in the middle layer for an egamma object and store in UserData.