ATLAS Offline Software
EgammaCalibCfg.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def EgammaCalibToolCfg(flags, name ="EgammaCalibrationAndSmearingTool", **kwargs ):
8  kwargs.setdefault("decorrelationModel", "1NP_v1" )
9  kwargs.setdefault("useFastSim", flags.Input.isMC and not flags.Sim.ISF.Simulator.isFullSim() )
10  kwargs.setdefault("ESModel", "es2018_R21_v1")
11  the_tool = CompFactory.CP.EgammaCalibrationAndSmearingTool(name, **kwargs)
12  acc.setPrivateTools(the_tool)
13  return acc
14 
15 def setupEgammaCalibProviderCfg(flags, name="EgammaCalibProvider", **kwargs):
16  acc = ComponentAccumulator()
17  kwargs.setdefault("Tool", acc.popToolsAndMerge(EgammaCalibToolCfg(flags)))
18  the_alg = CompFactory.CP.CalibratedEgammaProvider(name, **kwargs)
19  acc.addEventAlgo(the_alg, primary =True)
20  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
EgammaCalibCfg.EgammaCalibToolCfg
def EgammaCalibToolCfg(flags, name="EgammaCalibrationAndSmearingTool", **kwargs)
Definition: EgammaCalibCfg.py:6
EgammaCalibCfg.setupEgammaCalibProviderCfg
def setupEgammaCalibProviderCfg(flags, name="EgammaCalibProvider", **kwargs)
Definition: EgammaCalibCfg.py:15