13 import ElectronPhotonSelectorTools.PhotonIsEMMenuDefs
as PhotonIsEMMenuDefs
14 from ElectronPhotonSelectorTools.EgammaPIDdefs
import egammaPID
32 menuMuDependent2022 = 2
36 PhotonIsEMMapCurrent = {
37 egammaPID.PhotonIDLoose: (
38 egammaPID.PhotonLoose,
39 PhotonIsEMMenuDefs.PhotonIsEMLooseSelectorConfig),
40 egammaPID.PhotonIDMedium: (
41 egammaPID.PhotonMedium,
42 PhotonIsEMMenuDefs.PhotonIsEMMediumSelectorConfig),
43 egammaPID.PhotonIDTight: (
44 egammaPID.PhotonTight,
45 PhotonIsEMMenuDefs.PhotonIsEMTightSelectorConfig),
47 egammaPID.PhotonIDLooseAR: (
48 egammaPID.PhotonLooseAR,
49 PhotonIsEMMenuDefs.PhotonIsEMLooseSelectorConfig),
50 egammaPID.PhotonIDMediumAR: (
51 egammaPID.PhotonMediumAR,
52 PhotonIsEMMenuDefs.PhotonIsEMMediumSelectorConfig),
53 egammaPID.PhotonIDTightAR: (
54 egammaPID.PhotonTightAR,
55 PhotonIsEMMenuDefs.PhotonIsEMTightSelectorConfig),
58 PhotonIsEMMenuDefs.PhotonIsEMLooseSelectorConfig)
61 PhotonIsEMMapPtInclJan2018 = {
62 egammaPID.PhotonIDTight: (
63 egammaPID.PhotonTight,
64 PhotonIsEMMenuDefs.PhotonIsEMTightSelectorConfigPtInclJan2018),
67 PhotonIsEMMapMuDependent2022 = {
68 egammaPID.PhotonIDTight: (
69 egammaPID.PhotonTight,
70 PhotonIsEMMenuDefs.PhotonIsEMTightSelectorConfigMuDependent2022),
76 if menu == photonPIDmenu.menuCurrentCuts
and quality
in PhotonIsEMMapCurrent.keys():
77 return PhotonIsEMMapCurrent[quality]
78 elif menu == photonPIDmenu.menuPtInclJan2018
and quality
in PhotonIsEMMapPtInclJan2018.keys():
79 return PhotonIsEMMapPtInclJan2018[quality]
80 elif menu == photonPIDmenu.menuMuDependent2022
and quality
in PhotonIsEMMapMuDependent2022.keys():
81 return PhotonIsEMMapMuDependent2022[quality]
83 raise ValueError(
"Requested menu is undefined: %d" % menu)