ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronIsEMSelectorMapping.py
Go to the documentation of this file.
1# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3# =============================================================================
4# Name: ElectronIsEMSelectorMapping.py
5
11
12import ElectronPhotonSelectorTools.ElectronIsEMMenuDefs as ElectronIsEMSelectorCutDefs
13from ElectronPhotonSelectorTools.EgammaPIDdefs import egammaPID
14
15
17 menuTrigDC14 = 0
18 menuDC14 = 1
19
20
21# format - key: (mask, function)
22ElectronIsEMMapDC14 = {
23 egammaPID.ElectronIDLoosePP: (
24 egammaPID.ElectronLoosePP,
25 ElectronIsEMSelectorCutDefs.ElectronIsEMLooseSelectorConfigDC14),
26 egammaPID.ElectronIDMediumPP: (
27 egammaPID.ElectronMediumPP,
28 ElectronIsEMSelectorCutDefs.ElectronIsEMMediumSelectorConfigDC14),
29 egammaPID.ElectronIDTightPP: (
30 egammaPID.ElectronTightPP,
31 ElectronIsEMSelectorCutDefs.ElectronIsEMTightSelectorConfigDC14),
32 egammaPID.NoIDCut: (
33 0,
34 ElectronIsEMSelectorCutDefs.ElectronIsEMLooseSelectorConfigDC14)
35}
36
37
38TrigElectronIsEMMapDC14 = {
39 egammaPID.ElectronIDLooseHLT:
40 (egammaPID.ElectronLooseHLT,
41 ElectronIsEMSelectorCutDefs.TrigElectronIsEMLooseSelectorConfigDC14),
42 egammaPID.ElectronIDMediumHLT:
43 (egammaPID.ElectronMediumHLT,
44 ElectronIsEMSelectorCutDefs.TrigElectronIsEMMediumSelectorConfigDC14),
45 egammaPID.ElectronIDTightHLT:
46 (egammaPID.ElectronTightHLT,
47 ElectronIsEMSelectorCutDefs.TrigElectronIsEMTightSelectorConfigDC14),
48}
49
50
51def ElectronIsEMMap(quality, menu):
52 if menu == electronPIDmenu.menuDC14:
53 return ElectronIsEMMapDC14[quality]
54 elif menu == electronPIDmenu.menuTrigDC14:
55 return TrigElectronIsEMMapDC14[quality]
56 else:
57 raise ValueError("Requested menu is undefined: %d" % menu)