ATLAS Offline Software
Functions | Variables
EMPIDBuilderConfig Namespace Reference

Functions

def EMPIDBuilderElectronCfg (flags, name='EMPIDBuilderElectron', **kwargs)
 
def EMPIDBuilderPhotonCfg (flags, name='EMPIDBuilderPhoton', **kwargs)
 

Variables

string __doc__ = "Configure the electron and photon selectors."
 
 flags = initConfigFlags()
 
 Files
 
 cfg = ComponentAccumulator()
 
 mlog = logging.getLogger("EMPIDBuilderConfigTest")
 
 nestLevel
 
 printDefaults
 
 f = open("empidbuilder.pkl", "wb")
 

Function Documentation

◆ EMPIDBuilderElectronCfg()

def EMPIDBuilderConfig.EMPIDBuilderElectronCfg (   flags,
  name = 'EMPIDBuilderElectron',
**  kwargs 
)

Definition at line 11 of file EMPIDBuilderConfig.py.

11 def EMPIDBuilderElectronCfg(flags, name='EMPIDBuilderElectron', **kwargs):
12 
13  mlog = logging.getLogger(name)
14  mlog.debug('Start configuration')
15 
16  acc = ComponentAccumulator()
17 
18  # Electron Selectors
19  # Cut based
20  from ROOT import LikeEnum
21  from ElectronPhotonSelectorTools.AsgElectronIsEMSelectorsConfig import (
22  AsgElectronIsEMSelectorCfg)
23  if "electronIsEMselectors" not in kwargs:
24  LooseElectronSelectorAcc = AsgElectronIsEMSelectorCfg(
25  flags, "LooseElectronSelector", egammaPID.ElectronIDLoosePP)
26  MediumElectronSelectorAcc = AsgElectronIsEMSelectorCfg(
27  flags, "MediumElectronSelector", egammaPID.ElectronIDMediumPP)
28  TightElectronSelectorAcc = AsgElectronIsEMSelectorCfg(
29  flags, "TightElectronSelector", egammaPID.ElectronIDTightPP)
30 
31  kwargs["electronIsEMselectors"] = [
32  LooseElectronSelectorAcc.popPrivateTools(),
33  MediumElectronSelectorAcc.popPrivateTools(),
34  TightElectronSelectorAcc.popPrivateTools()]
35  kwargs["electronIsEMselectorResultNames"] = [
36  "Loose", "Medium", "Tight"]
37  acc.merge(LooseElectronSelectorAcc)
38  acc.merge(MediumElectronSelectorAcc)
39  acc.merge(TightElectronSelectorAcc)
40 
41  # Likelihood
42  from ElectronPhotonSelectorTools.AsgElectronLikelihoodToolsConfig import (
43  AsgElectronLikelihoodToolCfg)
44  if "electronLHselectors" not in kwargs:
45  LooseLHSelectorAcc = AsgElectronLikelihoodToolCfg(
46  flags, "LooseLHSelector", LikeEnum.Loose)
47  LooseLHSelectorAcc.primaryVertexContainer = "PrimaryVertices"
48  MediumLHSelectorAcc = AsgElectronLikelihoodToolCfg(
49  flags, "MediumLHSelector", LikeEnum.Medium)
50  MediumLHSelectorAcc.primaryVertexContainer = "PrimaryVertices"
51  TightLHSelectorAcc = AsgElectronLikelihoodToolCfg(
52  flags, "TightLHSelector", LikeEnum.Tight)
53  TightLHSelectorAcc.primaryVertexContainer = "PrimaryVertices"
54  kwargs["electronLHselectors"] = [LooseLHSelectorAcc.popPrivateTools(),
55  MediumLHSelectorAcc.popPrivateTools(),
56  TightLHSelectorAcc.popPrivateTools()]
57  kwargs["electronLHselectorResultNames"] = [
58  "LHLoose", "LHMedium", "LHTight"]
59  acc.merge(LooseLHSelectorAcc)
60  acc.merge(MediumLHSelectorAcc)
61  acc.merge(TightLHSelectorAcc)
62 
63  tool = CompFactory.EMPIDBuilder(name, **kwargs)
64 
65  acc.setPrivateTools(tool)
66  return acc
67 
68 

◆ EMPIDBuilderPhotonCfg()

def EMPIDBuilderConfig.EMPIDBuilderPhotonCfg (   flags,
  name = 'EMPIDBuilderPhoton',
**  kwargs 
)

Definition at line 69 of file EMPIDBuilderConfig.py.

69 def EMPIDBuilderPhotonCfg(flags, name='EMPIDBuilderPhoton', **kwargs):
70 
71  mlog = logging.getLogger(name)
72  mlog.debug('Start configuration')
73 
74  acc = ComponentAccumulator()
75 
76  # photon Selectors
77  from ElectronPhotonSelectorTools.AsgPhotonIsEMSelectorsConfig import (
78  AsgPhotonIsEMSelectorCfg)
79  LoosePhotonSelectorAcc = AsgPhotonIsEMSelectorCfg(
80  flags, "LoosePhotonSelector", egammaPID.PhotonIDLoose)
81  TightPhotonSelectorAcc = AsgPhotonIsEMSelectorCfg(
82  flags, "TightPhotonSelector", egammaPID.PhotonIDTight)
83 
84  if "photonIsEMselectors" not in kwargs:
85  kwargs["photonIsEMselectors"] = [
86  LoosePhotonSelectorAcc.popPrivateTools(),
87  TightPhotonSelectorAcc.popPrivateTools()]
88  kwargs["photonIsEMselectorResultNames"] = ["Loose", "Tight"]
89 
90  acc.merge(LoosePhotonSelectorAcc)
91  acc.merge(TightPhotonSelectorAcc)
92 
93  tool = CompFactory.EMPIDBuilder(name, **kwargs)
94  acc.setPrivateTools(tool)
95  return acc
96 
97 

Variable Documentation

◆ __doc__

string EMPIDBuilderConfig.__doc__ = "Configure the electron and photon selectors."
private

Definition at line 3 of file EMPIDBuilderConfig.py.

◆ cfg

EMPIDBuilderConfig.cfg = ComponentAccumulator()

Definition at line 109 of file EMPIDBuilderConfig.py.

◆ f

EMPIDBuilderConfig.f = open("empidbuilder.pkl", "wb")

Definition at line 122 of file EMPIDBuilderConfig.py.

◆ Files

EMPIDBuilderConfig.Files

Definition at line 104 of file EMPIDBuilderConfig.py.

◆ flags

EMPIDBuilderConfig.flags = initConfigFlags()

Definition at line 103 of file EMPIDBuilderConfig.py.

◆ mlog

EMPIDBuilderConfig.mlog = logging.getLogger("EMPIDBuilderConfigTest")

Definition at line 110 of file EMPIDBuilderConfig.py.

◆ nestLevel

EMPIDBuilderConfig.nestLevel

Definition at line 114 of file EMPIDBuilderConfig.py.

◆ printDefaults

EMPIDBuilderConfig.printDefaults

Definition at line 115 of file EMPIDBuilderConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.AsgElectronLikelihoodToolsConfig.AsgElectronLikelihoodToolCfg
def AsgElectronLikelihoodToolCfg(flag, name, quality, menu=electronLHmenu.offlineMC21)
Definition: AsgElectronLikelihoodToolsConfig.py:13
EMPIDBuilderConfig.EMPIDBuilderElectronCfg
def EMPIDBuilderElectronCfg(flags, name='EMPIDBuilderElectron', **kwargs)
Definition: EMPIDBuilderConfig.py:11
EMPIDBuilderConfig.EMPIDBuilderPhotonCfg
def EMPIDBuilderPhotonCfg(flags, name='EMPIDBuilderPhoton', **kwargs)
Definition: EMPIDBuilderConfig.py:69
python.AsgPhotonIsEMSelectorsConfig.AsgPhotonIsEMSelectorCfg
def AsgPhotonIsEMSelectorCfg(flags, name, quality, menu=photonPIDmenu.menuCurrentCuts, trigger=False)
Definition: AsgPhotonIsEMSelectorsConfig.py:15
python.AsgElectronIsEMSelectorsConfig.AsgElectronIsEMSelectorCfg
def AsgElectronIsEMSelectorCfg(flags, name, quality, menu=electronPIDmenu.menuDC14)
Definition: AsgElectronIsEMSelectorsConfig.py:14