13 from ElectronPhotonSelectorTools.LikelihoodEnums
import LikeEnum
14 import ElectronPhotonSelectorTools.ElectronLikelihoodMenuDefs
as ElectronLikelihoodMenuDefs
25 ElectronLHMapTrigger2015 = {
26 LikeEnum.Loose: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodLooseTriggerConfig2015),
27 LikeEnum.Medium: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodMediumTriggerConfig2015),
28 LikeEnum.Tight: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodTightTriggerConfig2015),
31 ElectronLHMapOfflineMC20 = {
32 LikeEnum.VeryLoose: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodVeryLooseOfflineConfigMC20),
33 LikeEnum.Loose: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodLooseOfflineConfigMC20),
34 LikeEnum.LooseBL: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodLooseBLOfflineConfigMC20),
35 LikeEnum.Medium: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodMediumOfflineConfigMC20),
36 LikeEnum.Tight: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodTightOfflineConfigMC20),
38 LikeEnum.VeryLooseLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodVeryLooseLLPOfflineConfigMC20),
39 LikeEnum.LooseLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodLooseLLPOfflineConfigMC20),
40 LikeEnum.MediumLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodMediumLLPOfflineConfigMC20),
41 LikeEnum.TightLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodTightLLPOfflineConfigMC20),
44 ElectronLHMapOfflineMC21 = {
45 LikeEnum.VeryLoose: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodVeryLooseOfflineConfigMC21),
46 LikeEnum.Loose: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodLooseOfflineConfigMC21),
47 LikeEnum.LooseBL: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodLooseBLOfflineConfigMC21),
48 LikeEnum.Medium: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodMediumOfflineConfigMC21),
49 LikeEnum.Tight: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodTightOfflineConfigMC21),
51 LikeEnum.VeryLooseLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodVeryLooseLLPOfflineConfigMC21),
52 LikeEnum.LooseLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodLooseLLPOfflineConfigMC21),
53 LikeEnum.MediumLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodMediumLLPOfflineConfigMC21),
54 LikeEnum.TightLLP: (LikeEnum.CustomOperatingPoint, ElectronLikelihoodMenuDefs.ElectronLikelihoodTightLLPOfflineConfigMC21),
58 if menu == electronLHmenu.trigger2015:
59 return ElectronLHMapTrigger2015[quality]
60 elif menu == electronLHmenu.offlineMC20:
61 return ElectronLHMapOfflineMC20[quality]
62 elif menu == electronLHmenu.offlineMC21:
63 return ElectronLHMapOfflineMC21[quality]
65 raise ValueError(
"Requested menu is undefined: %d" % menu)