ATLAS Offline Software
Classes | Functions | Variables
python.L1.Config.TypeWideThresholdConfig Namespace Reference

Classes

class  L1Config_cTAU
 
class  L1Config_eTAU
 
class  L1Config_jTAU
 
class  ValueWithEtaDependence
 

Functions

def leq_all_eta (ValueWithEtaDependence lhs, ValueWithEtaDependence rhs)
 
def validate_ordering (var, wpl, wpg, conf)
 
def eFEXfwToFloatConversion (fw, bitshift)
 
def eFEXfwToFloatConversion_wstot (fw, bitshift)
 
def eTAUfwToFloatConversion_bdt (fw)
 
def eFEXfwToFloatConversion_minIsoEt (fw)
 
def jFEXfloatToFWConversion (decimal)
 
def cTAUfwToFlowConversion (fw)
 
def getTypeWideThresholdConfig (ttype, do_HI_tob_thresholds=False, do_eFex_BDT_Tau=True)
 
def getConfig_MU ()
 
def getConfig_eEM (do_HI_tob_thresholds)
 
def getConfig_jEM ()
 
def getConfig_jJ ()
 
def getConfig_jLJ ()
 
def getConfig_gJ ()
 
def getConfig_gLJ ()
 
def getConfig_jXE ()
 
def getConfig_jTE ()
 
def getConfig_gXE ()
 
def getConfig_gTE ()
 
def getConfig_EM (do_HI_tob_thresholds)
 
def getConfig_TAU (do_HI_tob_thresholds)
 
def getConfig_JET ()
 
def getConfig_XS ()
 

Variables

 log
 
 getConfig_eTAU
 
 getConfig_cTAU
 
 getConfig_jTAU
 

Function Documentation

◆ cTAUfwToFlowConversion()

def python.L1.Config.TypeWideThresholdConfig.cTAUfwToFlowConversion (   fw)

Definition at line 98 of file TypeWideThresholdConfig.py.

99  decimal = fw/1024
100  return float("{:.2f}".format(decimal))
101 

◆ eFEXfwToFloatConversion()

def python.L1.Config.TypeWideThresholdConfig.eFEXfwToFloatConversion (   fw,
  bitshift 
)

Definition at line 77 of file TypeWideThresholdConfig.py.

77 def eFEXfwToFloatConversion(fw,bitshift):
78  decimal = 1/(1+fw/pow(2,bitshift))
79  return float("{:.3f}".format(decimal))
80 

◆ eFEXfwToFloatConversion_minIsoEt()

def python.L1.Config.TypeWideThresholdConfig.eFEXfwToFloatConversion_minIsoEt (   fw)

Definition at line 89 of file TypeWideThresholdConfig.py.

90  decimal = fw * 100.0 # To MeV units
91  return float("{:.3f}".format(decimal))
92 
93 # jFEX conversion based on ATR-21235

◆ eFEXfwToFloatConversion_wstot()

def python.L1.Config.TypeWideThresholdConfig.eFEXfwToFloatConversion_wstot (   fw,
  bitshift 
)

Definition at line 81 of file TypeWideThresholdConfig.py.

81 def eFEXfwToFloatConversion_wstot(fw,bitshift):
82  decimal = pow(2,bitshift)/fw
83  return float("{:.3f}".format(decimal))
84 

◆ eTAUfwToFloatConversion_bdt()

def python.L1.Config.TypeWideThresholdConfig.eTAUfwToFloatConversion_bdt (   fw)

Definition at line 85 of file TypeWideThresholdConfig.py.

86  decimal = fw/4096
87  return float("{:.2f}".format(decimal))
88 

◆ getConfig_eEM()

def python.L1.Config.TypeWideThresholdConfig.getConfig_eEM (   do_HI_tob_thresholds)

Definition at line 184 of file TypeWideThresholdConfig.py.

184 def getConfig_eEM(do_HI_tob_thresholds):
185  confObj = odict()
186  confObj["workingPoints"] = odict()
187  bitshift_reta = 3
188  bitshift_rhad = 3
189  bitshift_wstot = 5
190  reta_fw_loose = 72
191  reta_fw_medium = 92
192  reta_fw_tight = 106
193  rhad_fw_loose = 92
194  rhad_fw_medium = 192
195  rhad_fw_tight = 192
196  wstot_fw_loose = 8
197  wstot_fw_medium = 29
198  wstot_fw_tight = 29
199  # based on https://indico.cern.ch/event/1035198/contributions/4378014/attachments/2251846/3820098/20210526_l1calo_TGM.pdf
200  confObj["workingPoints"]["Loose"] = [
201  odict([("reta_fw", reta_fw_loose), ("reta", eFEXfwToFloatConversion(reta_fw_loose,bitshift_reta)),
202  ("wstot_fw", 0), ("wstot", 0),
203  ("rhad_fw", rhad_fw_loose), ("rhad", eFEXfwToFloatConversion(rhad_fw_loose,bitshift_rhad)),
204  ("etamin", -49), ("etamax", -24), ("priority", 0)]),
205  odict([("reta_fw", reta_fw_loose), ("reta", eFEXfwToFloatConversion(reta_fw_loose,bitshift_reta)),
206  ("wstot_fw", wstot_fw_loose), ("wstot", eFEXfwToFloatConversion_wstot(wstot_fw_loose,bitshift_wstot)),
207  ("rhad_fw", rhad_fw_loose), ("rhad", eFEXfwToFloatConversion(rhad_fw_loose,bitshift_rhad)),
208  ("etamin", -24), ("etamax", 24), ("priority", 0)]),
209  odict([("reta_fw", reta_fw_loose), ("reta", eFEXfwToFloatConversion(reta_fw_loose,bitshift_reta)),
210  ("wstot_fw", 0), ("wstot", 0),
211  ("rhad_fw", rhad_fw_loose), ("rhad", eFEXfwToFloatConversion(rhad_fw_loose,bitshift_rhad)),
212  ("etamin", 24), ("etamax", 49), ("priority", 0)]),
213  # More granular cuts from -24 to 25 are specified in FexThresholdParameters
214  # with priority 2
215  ]
216  confObj["workingPoints"]["Medium"] = [
217  odict([("reta_fw", reta_fw_medium), ("reta", eFEXfwToFloatConversion(reta_fw_medium,bitshift_reta)),
218  ("wstot_fw", 0), ("wstot", 0),
219  ("rhad_fw", rhad_fw_medium), ("rhad", eFEXfwToFloatConversion(rhad_fw_medium,bitshift_rhad)),
220  ("etamin", -49), ("etamax", -24), ("priority", 0)]),
221  odict([("reta_fw", reta_fw_medium), ("reta", eFEXfwToFloatConversion(reta_fw_medium,bitshift_reta)),
222  ("wstot_fw", wstot_fw_medium), ("wstot", eFEXfwToFloatConversion_wstot(wstot_fw_medium,bitshift_wstot)),
223  ("rhad_fw", rhad_fw_medium), ("rhad", eFEXfwToFloatConversion(rhad_fw_medium,bitshift_rhad)),
224  ("etamin", -24), ("etamax", 24), ("priority", 0)]),
225  odict([("reta_fw", reta_fw_medium), ("reta", eFEXfwToFloatConversion(reta_fw_medium,bitshift_reta)),
226  ("wstot_fw", 0), ("wstot", 0),
227  ("rhad_fw", rhad_fw_medium), ("rhad", eFEXfwToFloatConversion(rhad_fw_medium,bitshift_rhad)),
228  ("etamin", 24), ("etamax", 49), ("priority", 0)]),
229  # More granular cuts from -24 to 25 are specified in FexThresholdParameters
230  ]
231  confObj["workingPoints"]["Tight"] = [
232  odict([("reta_fw", reta_fw_tight), ("reta", eFEXfwToFloatConversion(reta_fw_tight,bitshift_reta)),
233  ("wstot_fw", 0), ("wstot", 0),
234  ("rhad_fw", rhad_fw_tight), ("rhad", eFEXfwToFloatConversion(rhad_fw_tight,bitshift_rhad)),
235  ("etamin", -49), ("etamax", -24), ("priority", 0)]),
236  odict([("reta_fw", reta_fw_tight), ("reta", eFEXfwToFloatConversion(reta_fw_tight,bitshift_reta)),
237  ("wstot_fw", wstot_fw_tight), ("wstot", eFEXfwToFloatConversion_wstot(wstot_fw_tight,bitshift_wstot)),
238  ("rhad_fw", rhad_fw_tight), ("rhad", eFEXfwToFloatConversion(rhad_fw_tight,bitshift_rhad)),
239  ("etamin", -24), ("etamax", 24), ("priority", 0)]),
240  odict([("reta_fw", reta_fw_tight), ("reta", eFEXfwToFloatConversion(reta_fw_tight,bitshift_reta)),
241  ("wstot_fw", 0), ("wstot", 0),
242  ("rhad_fw", rhad_fw_tight), ("rhad", eFEXfwToFloatConversion(rhad_fw_tight,bitshift_rhad)),
243  ("etamin", 24), ("etamax", 49), ("priority", 0)]),
244  # More granular cuts from -24 to 25 are specified in FexThresholdParameters
245  ]
246  confObj["ptMinToTopo"] = 1 if do_HI_tob_thresholds else 3
247  confObj["maxEt"] = 60
248  confObj["resolutionMeV"] = 100
249 
250  # Add any eta-dependent cuts that are defined for specific working points
251  # with higher priority than the low-granularity values above
252  eEM_eta_cuts = eta_dependent_cuts["eEM"]
253  for wp in confObj["workingPoints"]:
254  if wp in eEM_eta_cuts:
255  # Check that all cut vector lengths are matching
256  # the eta range
257  etarange = eEM_eta_cuts[wp]["etarange"]
258  stride = etarange[2]
259  n_eta_bins = (etarange[1]-etarange[0]) / stride
260  assert len(eEM_eta_cuts[wp]["rhad"]) == n_eta_bins
261  assert len(eEM_eta_cuts[wp]["rhad"]) == n_eta_bins
262  assert len(eEM_eta_cuts[wp]["wstot"]) == n_eta_bins
263  for ieta, etalow in enumerate(range(*etarange)):
264  reta_cut = eEM_eta_cuts[wp]["reta"][ieta]
265  rhad_cut = eEM_eta_cuts[wp]["rhad"][ieta]
266  wstot_cut = eEM_eta_cuts[wp]["wstot"][ieta]
267  confObj["workingPoints"][wp].append(
268  odict([("reta_fw", reta_cut), ("reta", eFEXfwToFloatConversion(reta_cut,bitshift_reta)),
269  ("wstot_fw", wstot_cut), ("wstot", wstot_cut),
270  ("rhad_fw", rhad_cut), ("rhad", eFEXfwToFloatConversion(rhad_cut,bitshift_rhad)),
271  ("etamin", etalow), ("etamax", etalow+stride), ("priority", 2)])
272  )
273 
274  # Check that FW values are integers
275  for wp in confObj["workingPoints"]:
276  for ssthr in confObj["workingPoints"][wp]:
277  for ssthr_i in ssthr:
278  if "_fw" in ssthr_i:
279  if not isinstance(ssthr[ssthr_i], int):
280  raise RuntimeError("Threshold %s in eEM configuration is not an integer!", ssthr_i )
281 
282  # Check that T >= M >= L [ATR-27796]
283  for var in ["reta_fw","rhad_fw","wstot_fw"]:
284  validate_ordering(var,"Loose","Medium",confObj["workingPoints"])
285  validate_ordering(var,"Medium","Tight",confObj["workingPoints"])
286 
287  return confObj
288 

◆ getConfig_EM()

def python.L1.Config.TypeWideThresholdConfig.getConfig_EM (   do_HI_tob_thresholds)

Definition at line 706 of file TypeWideThresholdConfig.py.

706 def getConfig_EM(do_HI_tob_thresholds):
707  confObj = odict()
708  confObj["isolation"] = odict()
709  confObj["isolation"]["HAIsoForEMthr"] = odict([ ( "thrtype", "HAIsoForEMthr" ), ("Parametrization", []) ])
710  confObj["isolation"]["HAIsoForEMthr"]["Parametrization"] += [
711  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 1), ("mincut", 10), ("offset", -2), ("priority", 0), ("slope", 230), ("upperlimit", 50)]),
712  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 2), ("mincut", 0), ("offset", 0), ("priority", 0), ("slope", 0), ("upperlimit", 0)]),
713  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 3), ("mincut", 10), ("offset", -2), ("priority", 0), ("slope", 230), ("upperlimit", 50)]),
714  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 4), ("mincut", 10), ("offset", -2), ("priority", 0), ("slope", 230), ("upperlimit", 50)]),
715  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 5), ("mincut", 10), ("offset", -2), ("priority", 0), ("slope", 230), ("upperlimit", 50)]),
716  ]
717  confObj["isolation"]["EMIsoForEMthr"] = odict([ ("thrtype", "EMIsoForEMthr" ), ("Parametrization", []) ])
718  confObj["isolation"]["EMIsoForEMthr"]["Parametrization"] += [
719  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 1), ("mincut", 0), ("offset", 0), ("priority", 0), ("slope", 0), ("upperlimit", 0)]),
720  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 2), ("mincut", 20), ("offset", -18), ("priority", 0), ("slope", 80), ("upperlimit", 50)]),
721  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 3), ("mincut", 20), ("offset", -18), ("priority", 0), ("slope", 80), ("upperlimit", 50)]),
722  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 4), ("mincut", 10), ("offset", -20), ("priority", 0), ("slope", 80), ("upperlimit", 50)]),
723  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 5), ("mincut", 20), ("offset", -18), ("priority", 0), ("slope", 80), ("upperlimit", 50)]),
724  ]
725  confObj["ptMinToTopo"] = 8 if do_HI_tob_thresholds else 3
726  confObj["resolutionMeV"] = 500
727  return confObj
728 
729 

◆ getConfig_gJ()

def python.L1.Config.TypeWideThresholdConfig.getConfig_gJ ( )

Definition at line 613 of file TypeWideThresholdConfig.py.

613 def getConfig_gJ():
614  confObj = odict()
615  confObj["ptMinToTopo1"] = 0
616  confObj["ptMinToTopo2"] = 0
617  confObj["resolutionMeV"] = 200
618  return confObj
619 

◆ getConfig_gLJ()

def python.L1.Config.TypeWideThresholdConfig.getConfig_gLJ ( )

Definition at line 620 of file TypeWideThresholdConfig.py.

620 def getConfig_gLJ():
621  confObj = odict()
622  confObj["ptMinToTopo1"] = 6
623  confObj["ptMinToTopo2"] = 6
624  confObj["seedThrA"] = 20
625  confObj["seedThrB"] = 20
626  confObj["seedThrC"] = 20
627  confObj["rhoTowerMinA"] = -9.6
628  confObj["rhoTowerMinB"] = -9.6
629  confObj["rhoTowerMinC"] = -9.6
630  confObj["rhoTowerMaxA"] = 10
631  confObj["rhoTowerMaxB"] = 10
632  confObj["rhoTowerMaxC"] = 10
633  confObj["resolutionMeV"] = 200
634 
635  # Check that all values are integers in MeV
636  for param in confObj:
637  if int(confObj[param]*1000) != (confObj[param]*1000):
638  raise RuntimeError("Param %s in gLJ configuration is not an integer in MeV! %d", param, confObj[param])
639  return confObj
640 

◆ getConfig_gTE()

def python.L1.Config.TypeWideThresholdConfig.getConfig_gTE ( )

Definition at line 698 of file TypeWideThresholdConfig.py.

698 def getConfig_gTE():
699  confObj = odict()
700  confObj["resolutionMeV"] = 800
701  return confObj
702 
703 
704 # LEGACY
705 

◆ getConfig_gXE()

def python.L1.Config.TypeWideThresholdConfig.getConfig_gXE ( )

Definition at line 675 of file TypeWideThresholdConfig.py.

675 def getConfig_gXE():
676  confObj = odict()
677  confObj["seedThrA"] = 16
678  confObj["seedThrB"] = 16
679  confObj["seedThrC"] = 16
680  confObj["XERHO_sigmaPosA"] = 3
681  confObj["XERHO_sigmaPosB"] = 3
682  confObj["XERHO_sigmaPosC"] = 3
683  confObj["XERHO_sigmaNegA"] = 8
684  confObj["XERHO_sigmaNegB"] = 8
685  confObj["XERHO_sigmaNegC"] = 8
686  confObj["XEJWOJ_a_A"] = 1003
687  confObj["XEJWOJ_a_B"] = 1003
688  confObj["XEJWOJ_a_C"] = 1003
689  confObj["XEJWOJ_b_A"] = 409
690  confObj["XEJWOJ_b_B"] = 409
691  confObj["XEJWOJ_b_C"] = 0
692  confObj["XEJWOJ_c_A"] = 0
693  confObj["XEJWOJ_c_B"] = 0
694  confObj["XEJWOJ_c_C"] = 0
695  confObj["resolutionMeV"] = 200
696  return confObj
697 

◆ getConfig_jEM()

def python.L1.Config.TypeWideThresholdConfig.getConfig_jEM ( )

Definition at line 289 of file TypeWideThresholdConfig.py.

289 def getConfig_jEM():
290 
291  iso_loose_float = 0.1 # PLACEHOLDER
292  iso_medium_float = 0.1 # PLACEHOLDER
293  iso_tight_float = 0.1 # PLACEHOLDER
294  frac_loose_float = 0.2 # PLACEHOLDER
295  frac_medium_float = 0.2 # PLACEHOLDER
296  frac_tight_float = 0.2 # PLACEHOLDER
297  frac2_loose_float = 0.3 # PLACEHOLDER
298  frac2_medium_float = 0.3 # PLACEHOLDER
299  frac2_tight_float = 0.3 # PLACEHOLDER
300 
301  confObj = odict()
302  confObj["workingPoints"] = odict()
303  confObj["workingPoints"]["Loose"] = [
304  odict([("iso_fw", jFEXfloatToFWConversion(iso_loose_float)), ("iso", iso_loose_float),
305  ("frac_fw", jFEXfloatToFWConversion(frac_loose_float)), ("frac", frac_loose_float),
306  ("frac2_fw", jFEXfloatToFWConversion(frac2_loose_float)), ("frac2", frac2_loose_float),
307  ("etamin", -49), ("etamax", 49), ("priority", 0)]),
308  ]
309  confObj["workingPoints"]["Medium"] = [
310  odict([("iso_fw", jFEXfloatToFWConversion(iso_medium_float)), ("iso", iso_medium_float),
311  ("frac_fw", jFEXfloatToFWConversion(frac_medium_float)), ("frac", frac_medium_float),
312  ("frac2_fw", jFEXfloatToFWConversion(frac2_medium_float)), ("frac2", frac2_medium_float),
313  ("etamin", -49), ("etamax", 49), ("priority", 0)]),
314  ]
315  confObj["workingPoints"]["Tight"] = [
316  odict([("iso_fw", jFEXfloatToFWConversion(iso_tight_float)), ("iso", iso_tight_float),
317  ("frac_fw", jFEXfloatToFWConversion(frac_tight_float)), ("frac", frac_tight_float),
318  ("frac2_fw", jFEXfloatToFWConversion(frac2_tight_float)), ("frac2", frac2_tight_float),
319  ("etamin", -49), ("etamax", 49), ("priority", 0)]),
320  ]
321  confObj["ptMinToTopo1"] = 5 # PLACEHOLDER
322  confObj["ptMinToTopo2"] = 5 # PLACEHOLDER
323  confObj["ptMinToTopo3"] = 5 # PLACEHOLDER
324  confObj["ptMinxTOB1"] = 5 # PLACEHOLDER
325  confObj["ptMinxTOB2"] = 5 # PLACEHOLDER
326  confObj["ptMinxTOB3"] = 5 # PLACEHOLDER
327  confObj["maxEt"] = 50 # PLACEHOLDER
328  confObj["resolutionMeV"] = 200
329 
330  # Check that FW values are integers
331  for wp in confObj["workingPoints"]:
332  for ssthr in confObj["workingPoints"][wp]:
333  for ssthr_i in ssthr:
334  if "_fw" in ssthr_i:
335  if not isinstance(ssthr[ssthr_i], int):
336  raise RuntimeError("Threshold %s in jEM configuration is not an integer!", ssthr_i )
337 
338  # Check that T >= M >= L [ATR-27796]
339  for var in ["iso_fw","frac_fw","frac2_fw"]:
340  validate_ordering(var,"Loose","Medium",confObj["workingPoints"])
341  validate_ordering(var,"Medium","Tight",confObj["workingPoints"])
342 
343  return confObj
344 
345 
346 @dataclass

◆ getConfig_JET()

def python.L1.Config.TypeWideThresholdConfig.getConfig_JET ( )

Definition at line 746 of file TypeWideThresholdConfig.py.

746 def getConfig_JET():
747  confObj = odict()
748  confObj["ptMinToTopoLargeWindow"] = 12
749  confObj["ptMinToTopoSmallWindow"] = 12
750  return confObj
751 
752 

◆ getConfig_jJ()

def python.L1.Config.TypeWideThresholdConfig.getConfig_jJ ( )

Definition at line 591 of file TypeWideThresholdConfig.py.

591 def getConfig_jJ():
592  confObj = odict()
593  confObj["ptMinToTopo1"] = 15
594  confObj["ptMinToTopo2"] = 15
595  confObj["ptMinToTopo3"] = 15
596  confObj["ptMinxTOB1"] = 15
597  confObj["ptMinxTOB2"] = 15
598  confObj["ptMinxTOB3"] = 15
599  confObj["resolutionMeV"] = 200
600  return confObj
601 

◆ getConfig_jLJ()

def python.L1.Config.TypeWideThresholdConfig.getConfig_jLJ ( )

Definition at line 602 of file TypeWideThresholdConfig.py.

602 def getConfig_jLJ():
603  confObj = odict()
604  confObj["ptMinToTopo1"] = 15 # PLACEHOLDER
605  confObj["ptMinToTopo2"] = 15 # PLACEHOLDER
606  confObj["ptMinToTopo3"] = 15 # PLACEHOLDER
607  confObj["ptMinxTOB1"] = 15 # PLACEHOLDER
608  confObj["ptMinxTOB2"] = 15 # PLACEHOLDER
609  confObj["ptMinxTOB3"] = 15 # PLACEHOLDER
610  confObj["resolutionMeV"] = 200
611  return confObj
612 

◆ getConfig_jTE()

def python.L1.Config.TypeWideThresholdConfig.getConfig_jTE ( )

Definition at line 646 of file TypeWideThresholdConfig.py.

646 def getConfig_jTE():
647 
648  def convertTowerToEta(tower, module): #ATR-21235
649  boundaries1 = {0:16, 1:17, 2:18, 3:19, 4:20, 5:21, 6:22, 7:23, 8:24, 9:25, 10:27, 11:29, 12:31, 13:32, 14:49}
650  boundaries2 = {0:8, 1:9, 2:10, 3:11, 4:12, 5:13, 6:14, 7:15, 8:16}
651  boundaries3 = {0:0, 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8}
652  if module==1:
653  return boundaries1[tower]
654  elif module==2:
655  return boundaries2[tower]
656  elif module==3:
657  return boundaries3[tower]
658  else:
659  raise RuntimeError("getConfig_jTE::convertTowerToEta: module not recognised")
660 
661  module1 = 9
662  module2 = 4
663  module3 = 4
664 
665  confObj = odict()
666  confObj["etaBoundary1"] = convertTowerToEta(module1,1)
667  confObj["etaBoundary1_fw"] = module1
668  confObj["etaBoundary2"] = convertTowerToEta(module2,2)
669  confObj["etaBoundary2_fw"] = module2
670  confObj["etaBoundary3"] = convertTowerToEta(module3,3)
671  confObj["etaBoundary3_fw"] = module3
672  confObj["resolutionMeV"] = 200
673  return confObj
674 

◆ getConfig_jXE()

def python.L1.Config.TypeWideThresholdConfig.getConfig_jXE ( )

Definition at line 641 of file TypeWideThresholdConfig.py.

641 def getConfig_jXE():
642  confObj = odict()
643  confObj["resolutionMeV"] = 200
644  return confObj
645 

◆ getConfig_MU()

def python.L1.Config.TypeWideThresholdConfig.getConfig_MU ( )

Definition at line 145 of file TypeWideThresholdConfig.py.

145 def getConfig_MU():
146  confObj = odict()
147  confObj["exclusionLists"] = odict()
148  confObj["exclusionLists"]["rpcFeet"] = []
149  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B21"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
150  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B22"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
151  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B25"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
152  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B26"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
153  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B53"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
154  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B54"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
155  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B57"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
156  confObj["exclusionLists"]["rpcFeet"].append( odict([("sectorName", "B58"), ("rois",[8,9,10,11,16,17,18,19,20,21,22,23,28,29,30,31])]) )
157 
158 
159  # roads from https://indico.cern.ch/event/1011425/contributions/4272884/
160  confObj["roads"] = odict()
161  confObj["roads"]["rpc"] = odict([(0,0), (4,1), (6,2), (8,3), (10,4), (12,5), (14,6)])
162  confObj["roads"]["tgc"] = odict([(0,0)] + list(zip([3,4,5,6,7,8,9,10,11,12,13,14,15,18,20],list(range(1,16)))))
163 
164  # check that there is a unique assignment between roads and pt values
165  for muonDet in ("rpc","tgc"):
166  roads = []
167  ptValues = []
168  for ptValue in confObj["roads"][muonDet]:
169  if ptValue in ptValues:
170  raise RuntimeError("Muon roads: pt value %s is duplicated, please fix.", str(ptValue) )
171  else:
172  ptValues += [ptValue]
173  road = confObj["roads"][muonDet][ptValue]
174  if road !=0 and road in roads:
175  raise RuntimeError("Muon roads: road %s is duplicated, please fix.", str(road) )
176  else:
177  roads += [road]
178  if len(confObj["roads"]["rpc"])!=7 or len(confObj["roads"]["tgc"])!=16:
179  raise RuntimeError("Muon roads: number of roads not as expected. TGC=%s (exp 16), RCP=%s (exp 7)", len(confObj["roads"]["tgc"]), len(confObj["roads"]["rpc"]) )
180 
181  return confObj
182 
183 

◆ getConfig_TAU()

def python.L1.Config.TypeWideThresholdConfig.getConfig_TAU (   do_HI_tob_thresholds)

Definition at line 730 of file TypeWideThresholdConfig.py.

730 def getConfig_TAU(do_HI_tob_thresholds):
731  confObj = odict()
732  confObj["isolation"] = odict()
733  confObj["isolation"]["EMIsoForTAUthr"] = odict([ ( "thrtype", "EMIsoForTAUthr" ), ("Parametrization", []) ])
734  confObj["isolation"]["EMIsoForTAUthr"]["Parametrization"] += [
735  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 1), ("mincut", 0), ("offset", 30), ("priority", 0), ("slope", 100), ("upperlimit", 60)]),
736  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 2), ("mincut", 0), ("offset", 20), ("priority", 0), ("slope", 100), ("upperlimit", 60)]),
737  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 3), ("mincut", 0), ("offset", 15), ("priority", 0), ("slope", 100), ("upperlimit", 60)]),
738  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 4), ("mincut", 0), ("offset", 40), ("priority", 0), ("slope", 0), ("upperlimit", 124)]),
739  odict([ ("etamax", 49), ("etamin", -49), ("isobit", 5), ("mincut", 0), ("offset", 30), ("priority", 0), ("slope", 100), ("upperlimit", 60)])
740  ]
741  confObj["ptMinToTopo"] = 1 if do_HI_tob_thresholds else 8
742  confObj["resolutionMeV"] = 500
743  return confObj
744 
745 

◆ getConfig_XS()

def python.L1.Config.TypeWideThresholdConfig.getConfig_XS ( )

Definition at line 753 of file TypeWideThresholdConfig.py.

753 def getConfig_XS():
754  confObj = odict()
755  confObj["significance"] = odict()
756  confObj["significance"]["xeMin"] = 11
757  confObj["significance"]["xeMax"] = 63
758  confObj["significance"]["teSqrtMin"] = 4
759  confObj["significance"]["teSqrtMax"] = 63
760  confObj["significance"]["xsSigmaScale"] = 1150
761  confObj["significance"]["xsSigmaOffset"] = 1640
762  return confObj
763 

◆ getTypeWideThresholdConfig()

def python.L1.Config.TypeWideThresholdConfig.getTypeWideThresholdConfig (   ttype,
  do_HI_tob_thresholds = False,
  do_eFex_BDT_Tau = True 
)

Definition at line 102 of file TypeWideThresholdConfig.py.

102 def getTypeWideThresholdConfig(ttype, do_HI_tob_thresholds=False, do_eFex_BDT_Tau=True):
103  if isinstance(ttype, str):
104  ttype = ThrType[ttype]
105 
106  if ttype == ThrType.MU:
107  return getConfig_MU()
108  if ttype == ThrType.eEM:
109  return getConfig_eEM(do_HI_tob_thresholds)
110  if ttype == ThrType.jEM:
111  return getConfig_jEM()
112  if ttype == ThrType.eTAU:
113  return getConfig_eTAU(do_eFex_BDT_Tau, do_HI_tob_thresholds)
114  if ttype == ThrType.cTAU:
115  return getConfig_cTAU(do_eFex_BDT_Tau)
116  if ttype == ThrType.jTAU:
117  return getConfig_jTAU(do_HI_tob_thresholds)
118  if ttype == ThrType.jJ:
119  return getConfig_jJ()
120  if ttype == ThrType.jLJ:
121  return getConfig_jLJ()
122  if ttype == ThrType.gJ:
123  return getConfig_gJ()
124  if ttype == ThrType.gLJ:
125  return getConfig_gLJ()
126  if ttype == ThrType.jXE:
127  return getConfig_jXE()
128  if ttype == ThrType.jTE:
129  return getConfig_jTE()
130  if ttype == ThrType.gXE:
131  return getConfig_gXE()
132  if ttype == ThrType.gTE:
133  return getConfig_gTE()
134  if ttype == ThrType.EM:
135  return getConfig_EM(do_HI_tob_thresholds)
136  if ttype == ThrType.TAU:
137  return getConfig_TAU(do_HI_tob_thresholds)
138  if ttype == ThrType.JET:
139  return getConfig_JET()
140  if ttype == ThrType.XS:
141  return getConfig_XS()
142  return odict()
143 
144 

◆ jFEXfloatToFWConversion()

def python.L1.Config.TypeWideThresholdConfig.jFEXfloatToFWConversion (   decimal)

Definition at line 94 of file TypeWideThresholdConfig.py.

94 def jFEXfloatToFWConversion(decimal):
95  fw = round((1-decimal)/decimal)
96  return fw
97 

◆ leq_all_eta()

def python.L1.Config.TypeWideThresholdConfig.leq_all_eta ( ValueWithEtaDependence  lhs,
ValueWithEtaDependence  rhs 
)

Definition at line 55 of file TypeWideThresholdConfig.py.

55 def leq_all_eta(lhs: ValueWithEtaDependence, rhs: ValueWithEtaDependence):
56  for (k,v) in lhs.eta_to_value.items():
57  if v>rhs.eta_to_value[k]:
58  log.error(f"{lhs.name} ({v}) > {rhs.name} ({rhs.eta_to_value[k]}) for eta bin {k}")
59  return False
60  return True
61 
62 # Enforce the ordering principle above either for eta-dependent/independent cuts
63 # Treat as a single uniform value if conf does not have etamin,etamax fields

◆ validate_ordering()

def python.L1.Config.TypeWideThresholdConfig.validate_ordering (   var,
  wpl,
  wpg,
  conf 
)

Definition at line 64 of file TypeWideThresholdConfig.py.

64 def validate_ordering(var, wpl, wpg, conf):
65  if "etamin" in conf[wpl][0]:
66  _lesser = ValueWithEtaDependence(var,wpl,conf[wpl])
67  _greater = ValueWithEtaDependence(var,wpg,conf[wpg])
68  assert leq_all_eta(_lesser,_greater), f"Working point ordering violated for {_lesser.name}, {_greater.name}"
69  else:
70  assert len(conf[wpl])==1 and len(conf[wpg])==1, (
71  f"Unsupported comparison between eta-dependent and eta-independent WPs {wpl}.{var}, {wpg}.{var}"
72  )
73  assert conf[wpl][0][var] <= conf[wpg][0][var], f"Working point ordering violated: {wpl}.{var} > {wpg}.{var}"
74 
75 # eFEX conversions based on https://indico.cern.ch/event/1026972/contributions/4312070/attachments/2226175/3772176/Copy%20of%20Reta_Threshold_Setting.pdf
76 # ATR-23596

Variable Documentation

◆ getConfig_cTAU

python.L1.Config.TypeWideThresholdConfig.getConfig_cTAU

Definition at line 533 of file TypeWideThresholdConfig.py.

◆ getConfig_eTAU

python.L1.Config.TypeWideThresholdConfig.getConfig_eTAU

Definition at line 430 of file TypeWideThresholdConfig.py.

◆ getConfig_jTAU

python.L1.Config.TypeWideThresholdConfig.getConfig_jTAU

Definition at line 588 of file TypeWideThresholdConfig.py.

◆ log

python.L1.Config.TypeWideThresholdConfig.log

Definition at line 8 of file TypeWideThresholdConfig.py.

python.L1.Config.TypeWideThresholdConfig.getConfig_jTE
def getConfig_jTE()
Definition: TypeWideThresholdConfig.py:646
python.L1.Config.TypeWideThresholdConfig.getConfig_gJ
def getConfig_gJ()
Definition: TypeWideThresholdConfig.py:613
python.L1.Config.TypeWideThresholdConfig.getTypeWideThresholdConfig
def getTypeWideThresholdConfig(ttype, do_HI_tob_thresholds=False, do_eFex_BDT_Tau=True)
Definition: TypeWideThresholdConfig.py:102
python.L1.Config.TypeWideThresholdConfig.getConfig_eTAU
getConfig_eTAU
Definition: TypeWideThresholdConfig.py:430
python.L1.Config.TypeWideThresholdConfig.eFEXfwToFloatConversion
def eFEXfwToFloatConversion(fw, bitshift)
Definition: TypeWideThresholdConfig.py:77
python.L1.Config.TypeWideThresholdConfig.eTAUfwToFloatConversion_bdt
def eTAUfwToFloatConversion_bdt(fw)
Definition: TypeWideThresholdConfig.py:85
vtune_athena.format
format
Definition: vtune_athena.py:14
python.L1.Config.TypeWideThresholdConfig.cTAUfwToFlowConversion
def cTAUfwToFlowConversion(fw)
Definition: TypeWideThresholdConfig.py:98
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
python.L1.Config.TypeWideThresholdConfig.getConfig_jTAU
getConfig_jTAU
Definition: TypeWideThresholdConfig.py:588
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.L1.Config.TypeWideThresholdConfig.getConfig_gLJ
def getConfig_gLJ()
Definition: TypeWideThresholdConfig.py:620
python.L1.Config.TypeWideThresholdConfig.eFEXfwToFloatConversion_minIsoEt
def eFEXfwToFloatConversion_minIsoEt(fw)
Definition: TypeWideThresholdConfig.py:89
python.L1.Config.TypeWideThresholdConfig.getConfig_jLJ
def getConfig_jLJ()
Definition: TypeWideThresholdConfig.py:602
python.L1.Config.TypeWideThresholdConfig.jFEXfloatToFWConversion
def jFEXfloatToFWConversion(decimal)
Definition: TypeWideThresholdConfig.py:94
python.L1.Config.TypeWideThresholdConfig.getConfig_MU
def getConfig_MU()
Definition: TypeWideThresholdConfig.py:145
python.L1.Config.TypeWideThresholdConfig.getConfig_gXE
def getConfig_gXE()
Definition: TypeWideThresholdConfig.py:675
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.L1.Config.TypeWideThresholdConfig.getConfig_JET
def getConfig_JET()
Definition: TypeWideThresholdConfig.py:746
python.L1.Config.TypeWideThresholdConfig.validate_ordering
def validate_ordering(var, wpl, wpg, conf)
Definition: TypeWideThresholdConfig.py:64
python.L1.Config.TypeWideThresholdConfig.getConfig_eEM
def getConfig_eEM(do_HI_tob_thresholds)
Definition: TypeWideThresholdConfig.py:184
python.L1.Config.TypeWideThresholdConfig.getConfig_gTE
def getConfig_gTE()
Definition: TypeWideThresholdConfig.py:698
python.L1.Config.TypeWideThresholdConfig.getConfig_jJ
def getConfig_jJ()
Definition: TypeWideThresholdConfig.py:591
python.L1.Config.TypeWideThresholdConfig.getConfig_cTAU
getConfig_cTAU
Definition: TypeWideThresholdConfig.py:533
python.L1.Config.TypeWideThresholdConfig.leq_all_eta
def leq_all_eta(ValueWithEtaDependence lhs, ValueWithEtaDependence rhs)
Definition: TypeWideThresholdConfig.py:55
str
Definition: BTagTrackIpAccessor.cxx:11
python.L1.Config.TypeWideThresholdConfig.eFEXfwToFloatConversion_wstot
def eFEXfwToFloatConversion_wstot(fw, bitshift)
Definition: TypeWideThresholdConfig.py:81
python.L1.Config.TypeWideThresholdConfig.getConfig_XS
def getConfig_XS()
Definition: TypeWideThresholdConfig.py:753
python.L1.Config.TypeWideThresholdConfig.getConfig_jEM
def getConfig_jEM()
Definition: TypeWideThresholdConfig.py:289
readCCLHist.float
float
Definition: readCCLHist.py:83
python.L1.Config.TypeWideThresholdConfig.getConfig_TAU
def getConfig_TAU(do_HI_tob_thresholds)
Definition: TypeWideThresholdConfig.py:730
python.L1.Config.TypeWideThresholdConfig.getConfig_jXE
def getConfig_jXE()
Definition: TypeWideThresholdConfig.py:641
python.L1.Config.TypeWideThresholdConfig.getConfig_EM
def getConfig_EM(do_HI_tob_thresholds)
Definition: TypeWideThresholdConfig.py:706