ATLAS Offline Software
EgammaPhysValMonitoringConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 '''@file EGammaPhysValMonitoringConfig.py
6 @author T. Strebler
7 @date 2022-07-05
8 @brief Main CA-based python configuration for EGammaPhysValMonitoring
9 '''
10 
11 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12 from AthenaConfiguration.ComponentFactory import CompFactory
13 
14 def EgammaPhysValMonitoringToolCfg(flags, **kwargs):
15  acc = ComponentAccumulator()
16 
17  kwargs.setdefault("EnableLumi", False)
18  kwargs.setdefault("DetailLevel", 10)
19  kwargs.setdefault("isMC", flags.Input.isMC)
20 
21  if "MCTruthClassifier" not in kwargs:
22  from MCTruthClassifier.MCTruthClassifierConfig import (
23  MCTruthClassifierCaloTruthMatchCfg)
24  kwargs.setdefault("MCTruthClassifier", acc.popToolsAndMerge(
26 
27  if flags.Tracking.doLargeD0:
28  kwargs.setdefault("LRTElectronContainerName", "LRTElectrons")
29 
30 
31  from ElectronPhotonSelectorTools.AsgElectronLikelihoodToolsConfig import AsgElectronLikelihoodToolCfg
32  from ElectronPhotonSelectorTools.ElectronLikelihoodToolMapping import electronLHmenu
33  from ROOT import LikeEnum
34 
35  lhMenu = electronLHmenu.offlineMC21
36 
37  # VeryLooseNoPix
38  ElectronLHSelectorVeryLooseNoPix = acc.popToolsAndMerge(AsgElectronLikelihoodToolCfg(
39  flags,
40  name="ElectronLHSelectorVeryLooseNoPix",
41  quality=LikeEnum.VeryLooseLLP,
42  menu=lhMenu)
43  )
44  ElectronLHSelectorVeryLooseNoPix.primaryVertexContainer = "PrimaryVertices"
45  kwargs.setdefault("ElectronLHSelectorVeryLooseNoPix", ElectronLHSelectorVeryLooseNoPix)
46 
47  # LooseNoPix
48  ElectronLHSelectorLooseNoPix = acc.popToolsAndMerge(AsgElectronLikelihoodToolCfg(
49  flags,
50  name="ElectronLHSelectorLooseNoPix",
51  quality=LikeEnum.LooseLLP,
52  menu=lhMenu)
53  )
54  ElectronLHSelectorLooseNoPix.primaryVertexContainer = "PrimaryVertices"
55  kwargs.setdefault("ElectronLHSelectorLooseNoPix", ElectronLHSelectorLooseNoPix)
56 
57  # MediumNoPix
58  ElectronLHSelectorMediumNoPix = acc.popToolsAndMerge(AsgElectronLikelihoodToolCfg(
59  flags,
60  name="ElectronLHSelectorMediumNoPix",
61  quality=LikeEnum.MediumLLP,
62  menu=lhMenu)
63  )
64  ElectronLHSelectorMediumNoPix.primaryVertexContainer = "PrimaryVertices"
65  kwargs.setdefault("ElectronLHSelectorMediumNoPix", ElectronLHSelectorMediumNoPix)
66 
67  # TightNoPix
68  ElectronLHSelectorTightNoPix = acc.popToolsAndMerge(AsgElectronLikelihoodToolCfg(
69  flags,
70  name="ElectronLHSelectorTightNoPix",
71  quality=LikeEnum.TightLLP,
72  menu=lhMenu)
73  )
74  ElectronLHSelectorTightNoPix.primaryVertexContainer = "PrimaryVertices"
75  kwargs.setdefault("ElectronLHSelectorTightNoPix", ElectronLHSelectorTightNoPix)
76 
77  acc.setPrivateTools(
78  CompFactory.EgammaPhysValMonitoring.EgammaPhysValMonitoringTool(**kwargs))
79 
80 
81  return acc
82 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.AsgElectronLikelihoodToolsConfig.AsgElectronLikelihoodToolCfg
def AsgElectronLikelihoodToolCfg(flag, name, quality, menu=electronLHmenu.offlineMC21)
Definition: AsgElectronLikelihoodToolsConfig.py:13
EgammaPhysValMonitoringConfig.EgammaPhysValMonitoringToolCfg
def EgammaPhysValMonitoringToolCfg(flags, **kwargs)
Definition: EgammaPhysValMonitoringConfig.py:14
MCTruthClassifierConfig.MCTruthClassifierCaloTruthMatchCfg
def MCTruthClassifierCaloTruthMatchCfg(flags, **kwargs)
Definition: MCTruthClassifier/python/MCTruthClassifierConfig.py:18