ATLAS Offline Software
Loading...
Searching...
No Matches
TrigADHypoConfig Namespace Reference

Functions

 TrigADGetConfigValue (chainDict, key)
 TrigADComboHypoToolFromDict (flags, chainDict)

Variables

 log = logging.getLogger('TrigADHypoAlgs')
dict object_cuts_sets
dict config_dict

Function Documentation

◆ TrigADComboHypoToolFromDict()

TrigADHypoConfig.TrigADComboHypoToolFromDict ( flags,
chainDict )

Definition at line 49 of file TrigADHypoConfig.py.

49def TrigADComboHypoToolFromDict(flags, chainDict):
50 name = chainDict['chainName']
51 group = chainDict['groups']
52
53 log.debug("Inside AD ComboHypoToolFromDict")
54 log.debug("chainDict: %s", chainDict)
55
56 cfg_name = TrigADGetConfigValue(chainDict, "anomdet")
57 cfg = config_dict[cfg_name]
58
59 obj_cuts = object_cuts_sets[cfg["object_cuts"]]
60
61 if "adWrite" in group:
62 adScoreName = recordable("HLT_AnomDet_ComboHypo")
63 else:
64 adScoreName = ""
65
66 tool = CompFactory.TrigADComboHypoTool(
67 name,
68 max_jets = obj_cuts["max_jets"],
69 max_electrons = obj_cuts["max_electrons"],
70 max_muons = obj_cuts["max_muons"],
71 max_photons = obj_cuts["max_photons"],
72 ModelFileName = "TrigAnomalyDetectionHypo/2025-03-12/HLT_AD_v2.onnx",
73 adScoreThres = float(cfg["adScoreThres"]),
74 adScoreKey = adScoreName,
75 )
76
77 if "adMon:online" in group:
78 monTool = GenericMonitoringTool(flags, 'MonTool', HistPath='TrigADComboHypoTool/'+name.replace("leg000_",""))
79 monTool.defineHistogram("adScore", path='EXPERT', type='TH1F', title="HLT AD Score;;Entries", xbins=200, xmin=0, xmax=20 )
80 monFlag = True
81 tool.monTool = monTool
82 tool.monFlag = monFlag
83 else:
84 monFlag = False
85 tool.monFlag = monFlag
86
87 return tool

◆ TrigADGetConfigValue()

TrigADHypoConfig.TrigADGetConfigValue ( chainDict,
key )

Definition at line 41 of file TrigADHypoConfig.py.

41def TrigADGetConfigValue(chainDict, key):
42 values = [i.strip(key) for i in chainDict['topo']]
43
44 if len(values) != 1:
45 raise RuntimeError("Invalid chain dictionary for AD trigger, unable to find config value in {}".format(str(chainDict)))
46
47 return values[0]
48

Variable Documentation

◆ config_dict

dict TrigADHypoConfig.config_dict
Initial value:
1= {
2 "default":{
3 "object_cuts": "default",
4 "adScoreThres": 0.5,
5 },
6 "L":{
7 "object_cuts": "default",
8 "adScoreThres": 6.174, # 20 Hz est. w/ v2
9 },
10 "M":{
11 "object_cuts": "default",
12 "adScoreThres": 6.929, # 10 Hz est. w/ v2
13 },
14 "T":{
15 "object_cuts": "default",
16 "adScoreThres": 8.358, # 5 Hz est. w/ v2
17 }
18
19}

Definition at line 21 of file TrigADHypoConfig.py.

◆ log

TrigADHypoConfig.log = logging.getLogger('TrigADHypoAlgs')

Definition at line 8 of file TrigADHypoConfig.py.

◆ object_cuts_sets

dict TrigADHypoConfig.object_cuts_sets
Initial value:
1= {
2 "default": {
3 "max_jets": 6,
4 "max_electrons": 3,
5 "max_muons": 3,
6 "max_photons": 3,
7 }
8}

Definition at line 11 of file TrigADHypoConfig.py.