11 from D3PDMakerConfig.D3PDMakerFlags
import D3PDMakerFlags
12 from D3PDMakerCoreComps.resolveSGKey
import resolveSGKey
13 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
14 from AthenaConfiguration.ComponentFactory
import CompFactory
16 D3PD = CompFactory.D3PD
22 sgkey = D3PDMakerFlags.ElectronSGKey,
23 typeName =
'ElectronContainer',
24 allowMissing =
False):
25 """Configure PhotonTruthAlg for D3PD making.
27 FLAGS are the configuration flags.
29 PREFIX is a prefix to add to the name of the algorithm scheduled.
31 SGKEY/TYPENAME is the StoreGate key of the input electron container
32 and the name of its type.
34 If ALLOWMISSING is true, don't fail if the SG key doesn't exist.
39 if not D3PDMakerFlags.DoTruth:
42 if (
not D3PDMakerFlags.MakeEgammaUserData
or
43 D3PDMakerFlags.HaveEgammaUserData):
47 resolved_sgkey = resolveSGKey (flags, sgkey)
48 auxprefix = (D3PDMakerFlags.EgammaUserDataPrefix +
'_' +
51 from TruthD3PDMaker.MCTruthClassifierConfig \
52 import D3PDMCTruthClassifierCfg
53 acc.merge (D3PDMCTruthClassifierCfg (flags))
54 ptaname =
'PhotonTruthAlg_' + resolved_sgkey
57 PhotonGetter = DVGetter
58 (prefix +
'PhotonTruthAlgGetter',
61 AllowMissing = allowMissing,
62 AuxPrefix = auxprefix,
64 (
'D3PD__PhotonTruthTool',
65 Classifier = acc.getPublicTool (
'D3PDMCTruthClassifier'))))