ATLAS Offline Software
egammaDeltaEmax2Config.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 # @file egammaD3PDAnalysis/python/egammaDeltaEmax2Config.py
4 # @author scott snyder <snyder@bnl.gov>
5 # @date Nov, 2011
6 # @brief Configure egammaDeltaEmax2Alg to fill UserData.
7 #
8 
9 
10 from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
11 from D3PDMakerCoreComps.resolveSGKey import resolveSGKey
12 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
13 from AthenaConfiguration.ComponentFactory import CompFactory
14 
15 D3PD = CompFactory.D3PD
16 
17 
19  (flags,
20  prefix = '',
21  sgkey = D3PDMakerFlags.ElectronSGKey,
22  typeName = 'DataVector<xAOD::Electron_v1>',
23  allowMissing = False):
24  """Configure egammaDeltaEmax2Alg for D3PD making.
25 
26  FLAGS are the configuration flags.
27 
28  PREFIX is a prefix to add to the name of the algorithm scheduled.
29 
30  SGKEY/TYPENAME is the StoreGate key of the input electron container
31  and the name of its type.
32 
33  If ALLOWMISSING is true, don't fail if the SG key doesn't exist.
34 """
35 
36  acc = ComponentAccumulator()
37 
38  if (not D3PDMakerFlags.MakeEgammaUserData or
39  D3PDMakerFlags.HaveEgammaUserData):
40  return acc
41 
43  resolved_sgkey = resolveSGKey (flags, sgkey)
44  auxprefix = (D3PDMakerFlags.EgammaUserDataPrefix + '_' +
45  resolved_sgkey + '_')
46 
47  emax2name = 'DeltaEmax2Alg_' + resolved_sgkey
48  highlum = False
49  if typeName == 'ElectronContainer':
50  if flags.Beam.numberOfCollisions >= 20 :
51  highlum = True
52 
53  acc.addEventAlgo (D3PD.egammaDeltaEmax2Alg \
54  (emax2name,
55  Getter = DVGetter
56  (prefix + 'DeltaEmax2Getter',
57  TypeName = typeName,
58  SGKey = sgkey),
59  AllowMissing = allowMissing,
60  HighLum = highlum,
61  AuxPrefix = auxprefix))
62 
63  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.egammaDeltaEmax2Config.egammaDeltaEmax2Cfg
def egammaDeltaEmax2Cfg(flags, prefix='', sgkey=D3PDMakerFlags.ElectronSGKey, typeName='DataVector< xAOD::Electron_v1 >', allowMissing=False)
Definition: egammaDeltaEmax2Config.py:19
D3PD::SGDataVectorGetterTool
Getter tool to retrieve DataVector/List collections from StoreGate.
Definition: SGDataVectorGetterTool.h:55
D3PD::egammaDeltaEmax2Alg
Calculate deltaEmax2 for egamma objects and store as UD.
Definition: egammaDeltaEmax2Alg.h:31