ATLAS Offline Software
Loading...
Searching...
No Matches
ForwardElectronSelectorConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3"""
4ComponentAccumulator configuration for DNN-based forward electron
5calibration and identification tools in Run 4 with ITk and HGTD.
6Internal Notes:
7 Calibration: https://cds.cern.ch/record/2922184
8 ID: https://cds.cern.ch/record/2922175
9"""
10
11from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12from AthenaConfiguration.ComponentFactory import CompFactory
13
14
15def AsgForwardElectronCalibrationToolCfg(flags, name="AsgForwardElectronCalibrationTool", **kwargs):
16 """
17 Configure the DNN-based pT calibration tool for forward electrons.
18 Three eta bins: [2.5,2.7], [2.7,3.2], [3.2,4.0]
19 """
20 acc = ComponentAccumulator()
21
22 kwargs.setdefault("ModelFiles", [
23 "ElectronPhotonSelectorTools/ForwardElectronCalibration/20260428/calibration_eta_2.5_2.7_DNN.json",
24 "ElectronPhotonSelectorTools/ForwardElectronCalibration/20260428/calibration_eta_2.7_3.2_DNN.json",
25 "ElectronPhotonSelectorTools/ForwardElectronCalibration/20260428/calibration_eta_3.2_4.0_DNN.json",
26 ])
27 kwargs.setdefault("pTMin", 10000.) # 10 GeV in MeV
28 kwargs.setdefault("pTMax", 255000.) # 255 GeV in MeV
29
30 acc.setPrivateTools(
31 CompFactory.AsgForwardElectronCalibrationTool(name, **kwargs)
32 )
33 return acc
34
35
36def AsgForwardElectronSelectorToolCfg(flags, name="AsgForwardElectronSelectorTool",
37 workingPoint="Medium", **kwargs):
38 """
39 Configure the DNN-based ID selector tool for forward electrons.
40 Three eta bins: [2.5,2.7], [2.7,3.2], [3.2,4.0]
41 Available working points: Loose = 90% | Medium = 80% | Tight = 70%
42 """
43 acc = ComponentAccumulator()
44
45 # Build the calibration tool as a private tool
47 flags,
48 name=name + "_CalibTool"
49 )
50 calibTool = acc.popToolsAndMerge(calibAcc)
51
52 kwargs.setdefault("ModelFiles", [
53 "ElectronPhotonSelectorTools/ForwardElectronSelector/20260428/id_eta_2.5_2.7_DNN.json",
54 "ElectronPhotonSelectorTools/ForwardElectronSelector/20260428/id_eta_2.7_3.2_DNN.json",
55 "ElectronPhotonSelectorTools/ForwardElectronSelector/20260428/id_eta_3.2_4.0_DNN.json",
56 ])
57 kwargs.setdefault("WorkingPoint", workingPoint)
58 kwargs.setdefault("CalibrationTool", calibTool)
59
60 acc.setPrivateTools(
61 CompFactory.AsgForwardElectronSelectorTool(name, **kwargs)
62 )
63 return acc
64
65
66
67def AsgForwardElectronLooseSelectorToolCfg(flags, name="AsgForwardElectronLooseSelectorTool", **kwargs):
68 return AsgForwardElectronSelectorToolCfg(flags, name=name, workingPoint="Loose", **kwargs)
69
70def AsgForwardElectronMediumSelectorToolCfg(flags, name="AsgForwardElectronMediumSelectorTool", **kwargs):
71 return AsgForwardElectronSelectorToolCfg(flags, name=name, workingPoint="Medium", **kwargs)
72
73def AsgForwardElectronTightSelectorToolCfg(flags, name="AsgForwardElectronTightSelectorTool", **kwargs):
74 return AsgForwardElectronSelectorToolCfg(flags, name=name, workingPoint="Tight", **kwargs)
AsgForwardElectronLooseSelectorToolCfg(flags, name="AsgForwardElectronLooseSelectorTool", **kwargs)
AsgForwardElectronTightSelectorToolCfg(flags, name="AsgForwardElectronTightSelectorTool", **kwargs)
AsgForwardElectronCalibrationToolCfg(flags, name="AsgForwardElectronCalibrationTool", **kwargs)
AsgForwardElectronMediumSelectorToolCfg(flags, name="AsgForwardElectronMediumSelectorTool", **kwargs)
AsgForwardElectronSelectorToolCfg(flags, name="AsgForwardElectronSelectorTool", workingPoint="Medium", **kwargs)