ATLAS Offline Software
Functions | Variables
python.PhotonTruthConfig Namespace Reference

Functions

def PhotonTruthCfg (flags, prefix='', sgkey=D3PDMakerFlags.ElectronSGKey, typeName='ElectronContainer', allowMissing=False)
 

Variables

 D3PD = CompFactory.D3PD
 

Function Documentation

◆ PhotonTruthCfg()

def python.PhotonTruthConfig.PhotonTruthCfg (   flags,
  prefix = '',
  sgkey = D3PDMakerFlags.ElectronSGKey,
  typeName = 'ElectronContainer',
  allowMissing = False 
)
Configure PhotonTruthAlg for D3PD making.

FLAGS are the configuration flags.

PREFIX is a prefix to add to the name of the algorithm scheduled.

SGKEY/TYPENAME is the StoreGate key of the input electron container
and the name of its type.

If ALLOWMISSING is true, don't fail if the SG key doesn't exist.

Definition at line 19 of file PhotonTruthConfig.py.

20  (flags,
21  prefix = '',
22  sgkey = D3PDMakerFlags.ElectronSGKey,
23  typeName = 'ElectronContainer',
24  allowMissing = False):
25  """Configure PhotonTruthAlg for D3PD making.
26 
27  FLAGS are the configuration flags.
28 
29  PREFIX is a prefix to add to the name of the algorithm scheduled.
30 
31  SGKEY/TYPENAME is the StoreGate key of the input electron container
32  and the name of its type.
33 
34  If ALLOWMISSING is true, don't fail if the SG key doesn't exist.
35 """
36 
37  acc = ComponentAccumulator()
38 
39  if not D3PDMakerFlags.DoTruth:
40  return acc
41 
42  if (not D3PDMakerFlags.MakeEgammaUserData or
43  D3PDMakerFlags.HaveEgammaUserData):
44  return acc
45 
47  resolved_sgkey = resolveSGKey (flags, sgkey)
48  auxprefix = (D3PDMakerFlags.EgammaUserDataPrefix + '_' +
49  resolved_sgkey + '_')
50 
51  from TruthD3PDMaker.MCTruthClassifierConfig \
52  import D3PDMCTruthClassifierCfg
53  acc.merge (D3PDMCTruthClassifierCfg (flags))
54  ptaname = 'PhotonTruthAlg_' + resolved_sgkey
55  acc.addEventAlgo (D3PD.PhotonTruthAlg \
56  (ptaname,
57  PhotonGetter = DVGetter
58  (prefix + 'PhotonTruthAlgGetter',
59  TypeName = typeName,
60  SGKey = sgkey),
61  AllowMissing = allowMissing,
62  AuxPrefix = auxprefix,
63  TruthTool = D3PD.PhotonTruthTool
64  ('D3PD__PhotonTruthTool',
65  Classifier = acc.getPublicTool ('D3PDMCTruthClassifier'))))
66 
67  return acc

Variable Documentation

◆ D3PD

python.PhotonTruthConfig.D3PD = CompFactory.D3PD

Definition at line 16 of file PhotonTruthConfig.py.

D3PD::PhotonTruthTool
Definition: PhotonTruthTool.h:40
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
D3PD::SGDataVectorGetterTool
Getter tool to retrieve DataVector/List collections from StoreGate.
Definition: SGDataVectorGetterTool.h:55
D3PD::PhotonTruthAlg
Analyze GenParticle's matching photons and made UD decorations.
Definition: PhotonTruthAlg.h:36