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

Classes

class  TrigMufastHypoToolConfig
class  TrigmuCombHypoConfig

Functions

 getThresholdsFromDict (chainDict)
 TrigMufastHypoAlgCfg (flags, name="UNSPECIFIED", **kwargs)
 TrigMufastHypoToolFromDict (flags, chainDict)
 TrigmuCombHypoAlgCfg (flags, name="UNSPECIFIED", **kwargs)
 TrigmuCombHypoToolFromDict (flags, chainDict)
 TrigmuCombHypoToolwORFromDict (flags, chainDict)
 Trigl2IOHypoToolwORFromDict (flags, chainDict)
 Trigl2mtCBHypoToolwORFromDict (flags, chainDict)
 TrigMuonEFHypoAlgCfg (flags, name="UNSPECIFIED", **kwargs)
 TrigMuonEFFastRecoSAHypoToolFromDict (flags, chainDict)
 TrigMuonEFMSonlyHypoToolFromDict (flags, chainDict)
 TrigMuonEFMSonlyHypoToolFromName (flags, chainDict)
 TrigMuonEFHypoToolCfg (name, thresholds, doSA=False, **kwargs)
 TrigMuonEFCombinerHypoToolFromDict (flags, chainDict)
 TrigMuonEFCombinerHypoToolFromName (flags, chainDict)
 TrigMuonEFTrackIsolationHypoToolFromDict (flags, chainDict)
 TrigMuonEFTrackIsolationHypoCfg (flags, name, isoCut, **kwargs)
 TrigMuonEFTrackIsolationHypoAlgCfg (flags, name="TrigMuonEFTrackIsolationHypoAlg", **kwargs)
 TrigMuonEFInvMassHypoToolFromDict (flags, chainDict)
 TrigMuonEFInvMassHypoCfg (flags, toolName, thresholds, **kwargs)
 TrigMuonEFIdtpHypoToolFromDict (flags, chainDict)
 TrigMuonEFIdtpHypoCfg (name, thresholds, **kwargs)
 TrigMuonEFIdtpInvMassHypoToolFromDict (flags, chainDict)
 TrigMuonEFIdtpInvMassHypoCfg (name, thresholds, **kwargs)
 TrigMuonEFIdtpHypoAlgCfg (flags, name="TrigMuonEFIdtpHypoAlg", **kwargs)
 TrigMuonLateMuRoIHypoAlgCfg (flags, name="TrigMuRoIHypoAlg", **kwargs)
 TrigMuonLateMuRoIHypoToolFromDict (flags, chainDict)
 TrigMuonLateMuRoIHypoCfg (flags, name="TrigMuRoIHypoTool")

Variables

bool monitorAll = False
 log = logging.getLogger('TrigMuonHypoConfig')
dict muFastThresholds
dict muCombThresholds
dict trigMuonEFSAThresholds
dict efCombinerThresholds
dict muFastThresholdsForECWeakBRegion
dict trigMuonEFTrkIsoThresholds
dict trigMuonLrtd0Cut
dict trigMuonEFInvMassThresholds
list muonHypoMonGroups = ['muonMon:online']
list idHypoMonGroups = ['idMon:t0','idMon:shifter']

Function Documentation

◆ getThresholdsFromDict()

getThresholdsFromDict ( chainDict)

Definition at line 280 of file TrigMuonHypoConfig.py.

280def getThresholdsFromDict( chainDict ):
281 cparts = [i for i in chainDict['chainParts'] if i['signature']=='Muon' or i['signature']=='Bphysics']
282 return sum( [ [part['threshold']]*int(part['multiplicity']) for part in cparts ], [])
283
284

◆ Trigl2IOHypoToolwORFromDict()

Trigl2IOHypoToolwORFromDict ( flags,
chainDict )

Definition at line 574 of file TrigMuonHypoConfig.py.

574def Trigl2IOHypoToolwORFromDict( flags, chainDict ):
575
576 thresholds = getThresholdsFromDict( chainDict )
577 if chainDict['chainParts'][0]['multiplicity']=="0":
578 thresholds = [chainDict['chainParts'][0]['threshold']]
579
580 config = TrigmuCombHypoConfig()
581
582 tight = False # can be probably decoded from some of the proprties of the chain, expert work
583
584 acceptAll = False
585 domuCombTag=False
586
587 tool=config.ConfigurationHypoTool( chainDict['chainName'], thresholds, tight, acceptAll, domuCombTag )
588
589 # Overlap Removal
590 tool.ApplyOR = True
591 tool.RequireDR = True
592 tool.RequireMufastDR = False
593 tool.RequireMass = True
594 tool.RequireSameSign = True
595 tool.EtaBins = [0, 0.9, 1.1, 1.9, 2.1, 9.9]
596 tool.DRThres = [0.002, 0.001, 0.002, 0.002, 0.002]
597 tool.MufastDRThres = [0]
598 tool.MassThres = [0.004, 0.002, 0.006, 0.006, 0.006]
599
600 return tool
601
602
603# muComb Hypo for L2 multi-track SA mode

◆ Trigl2mtCBHypoToolwORFromDict()

Trigl2mtCBHypoToolwORFromDict ( flags,
chainDict )

Definition at line 604 of file TrigMuonHypoConfig.py.

604def Trigl2mtCBHypoToolwORFromDict( flags, chainDict ):
605
606 if 'idperf' in chainDict['chainParts'][0]['addInfo'] or 'idtp' in chainDict['chainParts'][0]['addInfo'] :
607 thresholds = ['passthrough']
608 elif chainDict['chainParts'][0]['multiplicity']=="0":
609 thresholds = [chainDict['chainParts'][0]['threshold']]
610 else:
611 thresholds = getThresholdsFromDict( chainDict )
612
613 config = TrigmuCombHypoConfig()
614
615 tight = False # can be probably decoded from some of the proprties of the chain, expert work
616
617 acceptAll = False
618 domuCombTag = False
619
620 tool=config.ConfigurationHypoTool( chainDict['chainName'], thresholds, tight, acceptAll, domuCombTag )
621
622 # Overlap Removal
623 tool.ApplyOR = True
624 tool.RequireDR = True
625 tool.RequireMufastDR = True
626 tool.RequireMass = True
627 tool.RequireSameSign = True
628 tool.EtaBins = [0, 0.9, 1.1, 1.9, 2.1, 9.9]
629 tool.DRThres = [0.002, 0.001, 0.002, 0.002, 0.002]
630 tool.MufastDRThres = [0.4, 0.4, 0.4, 0.4, 0.4]
631 tool.MassThres = [0.004, 0.002, 0.006, 0.006, 0.006]
632
633 return tool
634
635

◆ TrigmuCombHypoAlgCfg()

TrigmuCombHypoAlgCfg ( flags,
name = "UNSPECIFIED",
** kwargs )

Definition at line 486 of file TrigMuonHypoConfig.py.

486def TrigmuCombHypoAlgCfg(flags, name="UNSPECIFIED", **kwargs):
487 return CompFactory.TrigmuCombHypoAlg(name, **kwargs)
488

◆ TrigmuCombHypoToolFromDict()

TrigmuCombHypoToolFromDict ( flags,
chainDict )

Definition at line 489 of file TrigMuonHypoConfig.py.

489def TrigmuCombHypoToolFromDict( flags, chainDict ):
490
491 if 'idperf' in chainDict['chainParts'][0]['addInfo'] or 'idtp' in chainDict['chainParts'][0]['addInfo'] :
492 thresholds = ['passthrough']
493 elif chainDict['chainParts'][0]['multiplicity']=="0":
494 thresholds = [chainDict['chainParts'][0]['threshold']]
495 else:
496 thresholds = getThresholdsFromDict( chainDict )
497
498 config = TrigmuCombHypoConfig()
499
500 tight = False # can be probably decoded from some of the proprties of the chain, expert work
501
502 acceptAll = False
503
504 if 'mucombTag' in chainDict['chainParts'][0]['extra']:
505 domuCombTag = True
506 else:
507 domuCombTag = False
508
509 if chainDict['chainParts'][0]['signature'] == 'Bphysics':
510 acceptAll = True
511
512 tool = config.ConfigurationHypoTool( chainDict['chainName'], thresholds, tight, acceptAll, domuCombTag )
513
514 if monitorAll:
515 tool.MonTool = TrigmuCombHypoMonitoring(flags, "TrigmuCombHypoTool/"+chainDict['chainName'])
516 else:
517 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
518 tool.MonTool = TrigmuCombHypoMonitoring(flags, "TrigmuCombHypoTool/"+chainDict['chainName'])
519
520 d0cut=0.
521 if 'd0loose' in chainDict['chainParts'][0]['lrtInfo']:
522 d0cut=trigMuonLrtd0Cut['d0loose']
523 elif 'd0medium' in chainDict['chainParts'][0]['lrtInfo']:
524 d0cut=trigMuonLrtd0Cut['d0medium']
525 elif 'd0tight' in chainDict['chainParts'][0]['lrtInfo']:
526 d0cut=trigMuonLrtd0Cut['d0tight']
527 tool.MinimumD0=d0cut
528
529 return tool
530
531

◆ TrigmuCombHypoToolwORFromDict()

TrigmuCombHypoToolwORFromDict ( flags,
chainDict )

Definition at line 532 of file TrigMuonHypoConfig.py.

532def TrigmuCombHypoToolwORFromDict( flags, chainDict ):
533
534 if 'idperf' in chainDict['chainParts'][0]['addInfo'] or 'idtp' in chainDict['chainParts'][0]['addInfo'] :
535 thresholds = ['passthrough']
536 elif chainDict['chainParts'][0]['multiplicity']=="0":
537 thresholds = [chainDict['chainParts'][0]['threshold']]
538 else:
539 thresholds = getThresholdsFromDict( chainDict )
540
541 config = TrigmuCombHypoConfig()
542
543 tight = False # can be probably decoded from some of the proprties of the chain, expert work
544
545 acceptAll = False
546 if 'mucombTag' in chainDict['chainParts'][0]['extra']:
547 domuCombTag = True
548 else:
549 domuCombTag = False
550
551 tool = config.ConfigurationHypoTool( chainDict['chainName'], thresholds, tight, acceptAll, domuCombTag )
552
553 if monitorAll:
554 tool.MonTool = TrigL2MuonOverlapRemoverMonitoringMucomb(flags, "TrigmuCombHypoTool/"+chainDict['chainName'])
555 else:
556 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
557 tool.MonTool = TrigL2MuonOverlapRemoverMonitoringMucomb(flags, "TrigmuCombHypoTool/"+chainDict['chainName'])
558
559 # Overlap Removal
560 tool.ApplyOR = True
561 tool.RequireDR = True
562 tool.RequireMufastDR = True
563 tool.RequireMass = True
564 tool.RequireSameSign = True
565 tool.EtaBins = [0, 0.9, 1.1, 1.9, 2.1, 9.9]
566 tool.DRThres = [0.002, 0.001, 0.002, 0.002, 0.002]
567 tool.MufastDRThres = [0.4, 0.4, 0.4, 0.4, 0.4]
568 tool.MassThres = [0.004, 0.002, 0.006, 0.006, 0.006]
569
570 return tool
571
572
573# muComb Hypo for L2 inside-out

◆ TrigMufastHypoAlgCfg()

TrigMufastHypoAlgCfg ( flags,
name = "UNSPECIFIED",
** kwargs )

Definition at line 285 of file TrigMuonHypoConfig.py.

285def TrigMufastHypoAlgCfg(flags, name="UNSPECIFIED", **kwargs):
286 return CompFactory.TrigMufastHypoAlg(name, **kwargs)
287

◆ TrigMufastHypoToolFromDict()

TrigMufastHypoToolFromDict ( flags,
chainDict )

Definition at line 288 of file TrigMuonHypoConfig.py.

288def TrigMufastHypoToolFromDict(flags, chainDict):
289
290 chainPart = chainDict['chainParts'][0]
291
292 doOverlapRemoval = False
293 if chainPart['signature'] == 'Bphysics' or 'l2io' in chainPart['l2AlgInfo']:
294 doOverlapRemoval = False
295 elif int(chainPart['multiplicity']) > 1:
296 doOverlapRemoval = True
297 elif len(chainDict['signatures']) > 1 and not chainPart['extra']:
298 doOverlapRemoval = True
299
300 doMonitoring = monitorAll or any(group in muonHypoMonGroups for group in chainDict['monGroups'])
301
302 config = TrigMufastHypoToolConfig(chainDict['chainName'], chainPart, chainDict['eventBuildType'], doOverlapRemoval, doMonitoring)
303 config.compile(flags)
304 return config.tool()
305
306

◆ TrigMuonEFCombinerHypoToolFromDict()

TrigMuonEFCombinerHypoToolFromDict ( flags,
chainDict )

Definition at line 900 of file TrigMuonHypoConfig.py.

900def TrigMuonEFCombinerHypoToolFromDict( flags, chainDict ) :
901 if 'idperf' in chainDict['chainParts'][0]['addInfo'] or 'idtp' in chainDict['chainParts'][0]['addInfo']:
902 thresholds = ['passthrough']
903 elif chainDict['chainParts'][0]['multiplicity']=="0":
904 thresholds = [chainDict['chainParts'][0]['threshold']]
905 else:
906 thresholds = getThresholdsFromDict( chainDict )
907
908 if 'muonqual' in chainDict['chainParts'][0]['addInfo']:
909 muonquality = True
910 else:
911 muonquality = False
912
913 if 'nscan10' in chainDict['chainParts'][0]['addInfo']:
914 conesize = 0.1
915 narrowscan = True
916 elif 'nscan20' in chainDict['chainParts'][0]['addInfo']:
917 conesize = 0.2
918 narrowscan = True
919 elif 'nscan30' in chainDict['chainParts'][0]['addInfo']:
920 conesize = 0.3
921 narrowscan = True
922 elif 'nscan40' in chainDict['chainParts'][0]['addInfo']:
923 conesize = 0.4
924 narrowscan = True
925 elif 'nscan' in chainDict['chainParts'][0]['addInfo']:
926 conesize = 0.5
927 narrowscan = True
928 else:
929 narrowscan = False
930 conesize = 0.0
931
932 if 'noL1' not in chainDict['chainParts'][0]['extra']:
933 overlap=True
934 else:
935 overlap=False
936
937 monTool=None
938 if monitorAll:
939 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFCombinerHypoTool/"+chainDict['chainName'])
940 else:
941 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
942 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFCombinerHypoTool/"+chainDict['chainName'])
943
944 d0cut=0.
945 if 'd0loose' in chainDict['chainParts'][0]['lrtInfo']:
946 d0cut=trigMuonLrtd0Cut['d0loose']
947 elif 'd0medium' in chainDict['chainParts'][0]['lrtInfo']:
948 d0cut=trigMuonLrtd0Cut['d0medium']
949 elif 'd0tight' in chainDict['chainParts'][0]['lrtInfo']:
950 d0cut=trigMuonLrtd0Cut['d0tight']
951
952
953 tool = TrigMuonEFHypoToolCfg(chainDict['chainName'], thresholds, doSA=False, MuonQualityCut=muonquality, MonTool=monTool,
954 NarrowScan=narrowscan, RemoveOverlaps=overlap, ConeSize=conesize, MinimumD0=d0cut)
955
956 return tool
957

◆ TrigMuonEFCombinerHypoToolFromName()

TrigMuonEFCombinerHypoToolFromName ( flags,
chainDict )

Definition at line 958 of file TrigMuonHypoConfig.py.

958def TrigMuonEFCombinerHypoToolFromName( flags, chainDict ):
959 #For full scan chains, we need to configure the thresholds based on all muons
960 #in the chain to get the counting correct. Currently a bit convoluted as
961 #the chain dict is (improperly) overwritten when merging for FS chains.
962 #Can probably improve this once serial merging is officially implemented
963 thresholds=[]
964 chainName = chainDict["chainName"]
965 hltChainName = chainName.rsplit("_L1",1)[0]
966 cparts = hltChainName.split("_")
967 if 'HLT' in hltChainName:
968 cparts.remove('HLT')
969 for part in cparts:
970 if 'mu' in part:
971 thrPart = part.split('mu')
972 if not thrPart[0] or thrPart[0] == "0":
973 mult = 1
974 else:
975 mult=thrPart[0]
976 thr = thrPart[1]
977 if 'noL1' in part:
978 thr =thr.replace('noL1','')
979 for i in range(1,int(mult)+1):
980 thresholds.append(thr)
981 if 'nscan10' in chainDict['chainParts'][0]['addInfo']:
982 conesize = 0.1
983 narrowscan = True
984 elif 'nscan20' in chainDict['chainParts'][0]['addInfo']:
985 conesize = 0.2
986 narrowscan = True
987 elif 'nscan30' in chainDict['chainParts'][0]['addInfo']:
988 conesize = 0.3
989 narrowscan = True
990 elif 'nscan40' in chainDict['chainParts'][0]['addInfo']:
991 conesize = 0.4
992 narrowscan = True
993 if 'nscan' in chainDict['chainParts'][0]['addInfo']:
994 conesize = 0.5
995 narrowscan = True
996 else:
997 narrowscan = False
998 conesize = 0.0
999
1000 if 'muonqual' in chainDict['chainParts'][0]['addInfo']:
1001 muonquality = True
1002 else:
1003 muonquality = False
1004
1005 monTool=None
1006 if monitorAll:
1007 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFCombinerHypoTool/"+chainDict['chainName'])
1008 else:
1009 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
1010 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFCombinerHypoTool/"+chainDict['chainName'])
1011
1012 tool = TrigMuonEFHypoToolCfg(chainDict['chainName'], thresholds, doSA=False, MuonQualityCut=muonquality, MonTool=monTool,
1013 NarrowScan=narrowscan, ConeSize=conesize)
1014
1015 return tool
1016
1017
1018

◆ TrigMuonEFFastRecoSAHypoToolFromDict()

TrigMuonEFFastRecoSAHypoToolFromDict ( flags,
chainDict )

Definition at line 686 of file TrigMuonHypoConfig.py.

686def TrigMuonEFFastRecoSAHypoToolFromDict( flags, chainDict ) :
687
688 chainPart = chainDict['chainParts'][0]
689
690 thresholds = getThresholdsFromDict( chainDict )
691 if int(chainPart['multiplicity']) == 0:
692 thresholds = [chainPart['threshold']]
693
694 doOverlapRemoval = False
695 # This is taken from Run-3 L2 Hypo Tool Cfg
696 if chainPart['signature'] == 'Bphysics' or 'l2io' in chainPart['l2AlgInfo']:
697 doOverlapRemoval = False
698 elif int(chainPart['multiplicity']) > 1:
699 doOverlapRemoval = True
700 elif len(chainDict['signatures']) > 1 and not chainPart['extra']:
701 doOverlapRemoval = True
702
703 kwargs={}
704 kwargs["RequireSAMuons"] = True
705 kwargs["IsFastReco"] = True
706 kwargs["RemoveOverlaps"] = doOverlapRemoval
707
708 # Same monitoring settings as Run-3 L2 Hypo Tool Cfg
709 if monitorAll or any(group in muonHypoMonGroups for group in chainDict['monGroups']):
710 if doOverlapRemoval:
711 from TrigMuonHypo.TrigMuonHypoMonitoring import TrigL2MuonOverlapRemoverMonitoringMufast
712 kwargs["MonTool"] = TrigL2MuonOverlapRemoverMonitoringMufast(flags, 'TrigMuonEFFastSAHypoTool/' + chainDict['chainName'])
713 else:
714 from TrigMuonHypo.TrigMuonHypoMonitoring import TrigMufastHypoMonitoring
715 kwargs["MonTool"] = TrigMufastHypoMonitoring(flags, 'TrigMuonEFFastSAHypoTool/' + chainDict['chainName'])
716
717 kwargs["ConeSize"] = 0.0
718 kwargs["NarrowScan"] = False
719
720 name = chainDict['chainName']
721 log = logging.getLogger(name)
722
723 # Implementing the same threshold configuration as in the Run-3 L2 Hypo Tool Cfg
724 # However, special thresholds for EC weak Bfield regions cannot be implemented
725 nt = len(thresholds)
726 log.debug('Set %d thresholds', nt)
727 PtBins = [ [ 0.0, 2.5 ] ] * nt
728 PtThresholds = [ [ 5.49 * GeV ] ] * nt
729
730 for th, thvalue in enumerate(thresholds):
731 thvaluename = '6GeV_v15a'
732
733 useGeV_v15a = any(x in chainPart['addInfo'] for x in ['idperf', 'idtp', '3layersEC'])
734 if useGeV_v15a or int(thvalue) < 5:
735 thvaluename = thvalue + 'GeV_v15a'
736 if int(thvalue) == 3:
737 thvaluename = thvalue + 'GeV_v22a'
738
739 isBarrelOnly = '0eta105' in chainPart['etaRange']
740 if isBarrelOnly:
741 thvaluename = thvalue+ "GeV_barrelOnly_v15a"
742
743 if int(thvalue) >= 20:
744 thvaluename = thvalue + 'GeV_v15a'
745
746 log.debug('Number of threshold = %d, Value of threshold = %s', th, thvaluename)
747
748 values = muFastThresholds[thvaluename]
749
750 PtBins[th] = values[0]
751 PtThresholds[th] = [ x * GeV for x in values[1] ]
752 log.debug('Configration of threshold[%d] %s', th, PtThresholds[th])
753 log.debug('Configration of PtBins[%d] %s', th, PtBins[th])
754
755 kwargs["AcceptAll"] = 'mucombTag' in chainPart['extra']
756 kwargs["PtBins"] = PtBins
757 kwargs["PtThresholds"] = PtThresholds
758 return CompFactory.TrigMuonEFHypoTool(name, **kwargs)
759

◆ TrigMuonEFHypoAlgCfg()

TrigMuonEFHypoAlgCfg ( flags,
name = "UNSPECIFIED",
** kwargs )

Definition at line 683 of file TrigMuonHypoConfig.py.

683def TrigMuonEFHypoAlgCfg(flags, name="UNSPECIFIED", **kwargs):
684 return CompFactory.TrigMuonEFHypoAlg(name, **kwargs)
685

◆ TrigMuonEFHypoToolCfg()

TrigMuonEFHypoToolCfg ( name,
thresholds,
doSA = False,
** kwargs )

Definition at line 858 of file TrigMuonHypoConfig.py.

858def TrigMuonEFHypoToolCfg(name, thresholds, doSA=False, **kwargs):
859
860
861 log = logging.getLogger(name)
862
863 nt = len(thresholds)
864 log.debug('Set %d thresholds', nt)
865 PtBins = [ [ 0.0, 2.5 ] ] * nt
866 PtThresholds = [ [ 5.49 * GeV ] ] * nt
867 passthrough=False
868 for th, thvalue in enumerate(thresholds):
869 if (thvalue=='passthrough'):
870 passthrough = True
871 PtBins[th] = [-10000.,10000.]
872 PtThresholds[th] = [ -1. * GeV ]
873 else:
874 if "0eta105" in name:
875 thvaluename = thvalue+ "GeV_barrelOnly"
876 else:
877 if int(thvalue)==3:
878 thvaluename = thvalue + 'GeV_v22a'
879 else:
880 if doSA:
881 thvaluename = thvalue + 'GeV'
882 else:
883 thvaluename = thvalue + 'GeV_v15a'
884 log.debug('Number of threshold = %d, Value of threshold = %s', th, thvaluename)
885
886 if doSA:
887 values = trigMuonEFSAThresholds[thvaluename]
888 else:
889 values = efCombinerThresholds[thvaluename]
890 PtBins[th] = values[0]
891 PtThresholds[th] = [ x * GeV for x in values[1] ]
892
893
894 kwargs.setdefault("AcceptAll", passthrough)
895 kwargs.setdefault("PtBins", PtBins)
896 kwargs.setdefault("PtThresholds", PtThresholds)
897 return CompFactory.TrigMuonEFHypoTool(name, **kwargs)
898
899

◆ TrigMuonEFIdtpHypoAlgCfg()

TrigMuonEFIdtpHypoAlgCfg ( flags,
name = "TrigMuonEFIdtpHypoAlg",
** kwargs )

Definition at line 1168 of file TrigMuonHypoConfig.py.

1168def TrigMuonEFIdtpHypoAlgCfg(flags, name="TrigMuonEFIdtpHypoAlg", **kwargs):
1169 return CompFactory.TrigMuonEFIdtpHypoAlg(name, **kwargs)
1170

◆ TrigMuonEFIdtpHypoCfg()

TrigMuonEFIdtpHypoCfg ( name,
thresholds,
** kwargs )

Definition at line 1108 of file TrigMuonHypoConfig.py.

1108def TrigMuonEFIdtpHypoCfg(name, thresholds, **kwargs):
1109
1110 log = logging.getLogger(name)
1111
1112 nt = len(thresholds)
1113 log.debug('Set %d thresholds', nt)
1114 ptBins = [ [ 0, 2.5 ] ] * nt
1115 ptThresholds = [ [ 5.49 * GeV ] ] * nt
1116 for th, thvalue in enumerate(thresholds):
1117 thvaluename = thvalue + 'GeV'
1118 if int(thvalue)==3:
1119 thvaluename = thvalue + 'GeV_v22a'
1120 log.debug('Number of threshold = %d, Value of threshold = %s', th, thvaluename)
1121 if (thvalue=='passthrough'):
1122 ptBins[th] = [-10000.,10000.]
1123 ptThresholds[th] = [ -1. * GeV ]
1124 else:
1125 values = trigMuonEFSAThresholds[thvaluename]
1126 ptBins[th] = values[0]
1127 ptThresholds[th] = [ x * GeV for x in values[1] ]
1128
1129
1130 if (thvalue=='passthrough'):
1131 kwargs.setdefault("AcceptAll", True)
1132 else:
1133 kwargs.setdefault("AcceptAll", False)
1134
1135 kwargs.setdefault("PtBins", ptBins)
1136 kwargs.setdefault("PtThresholds", ptThresholds)
1137
1138
1139 return CompFactory.TrigMuonEFIdtpHypoTool( name, **kwargs )
1140

◆ TrigMuonEFIdtpHypoToolFromDict()

TrigMuonEFIdtpHypoToolFromDict ( flags,
chainDict )

Definition at line 1099 of file TrigMuonHypoConfig.py.

1099def TrigMuonEFIdtpHypoToolFromDict( flags, chainDict ) :
1100 thresholds = getThresholdsFromDict( chainDict )
1101 monTool=None
1102 if any(group in idHypoMonGroups for group in chainDict['monGroups']):
1103 monTool = TrigMuonEFIdtpHypoMonitoring(flags, "TrigMuonEFIdtpHypoTool/"+chainDict['chainName'])
1104 tool = TrigMuonEFIdtpHypoCfg( chainDict['chainName'], thresholds, MonTool=monTool )
1105 return tool
1106
1107

◆ TrigMuonEFIdtpInvMassHypoCfg()

TrigMuonEFIdtpInvMassHypoCfg ( name,
thresholds,
** kwargs )

Definition at line 1158 of file TrigMuonHypoConfig.py.

1158def TrigMuonEFIdtpInvMassHypoCfg(name, thresholds, **kwargs) :
1159
1160 massWindow = trigMuonEFInvMassThresholds[thresholds]
1161 kwargs.setdefault("InvMassLow", massWindow[0])
1162 kwargs.setdefault("InvMassHigh", massWindow[1])
1163 kwargs.setdefault("AcceptAll", False)
1164
1165 return CompFactory.TrigMuonEFIdtpInvMassHypoTool(name, **kwargs)
1166
1167

◆ TrigMuonEFIdtpInvMassHypoToolFromDict()

TrigMuonEFIdtpInvMassHypoToolFromDict ( flags,
chainDict )

Definition at line 1141 of file TrigMuonHypoConfig.py.

1141def TrigMuonEFIdtpInvMassHypoToolFromDict(flags, chainDict) :
1142 cname = chainDict['chainName']
1143 if 'idZmumu' in cname :
1144 thresholds = 'idZmumu'
1145 elif 'idJpsimumu' in cname :
1146 thresholds = 'idJpsimumu'
1147 else :
1148 log.warning("unknown chain name for IdtpInvmassHypo, chain name= %s, setting threshold of Z mass",cname)
1149 thresholds = 'idZmumu'
1150
1151 tool = TrigMuonEFIdtpInvMassHypoCfg( chainDict['chainName'], thresholds )
1152
1153 if any(group in idHypoMonGroups for group in chainDict['monGroups']):
1154 tool.MonTool = TrigMuonEFIdtpInvMassHypoMonitoring(flags, "TrigMuonEFIdtpInvMassHypoTool/"+chainDict['chainName'])
1155
1156 return tool
1157

◆ TrigMuonEFInvMassHypoCfg()

TrigMuonEFInvMassHypoCfg ( flags,
toolName,
thresholds,
** kwargs )

Definition at line 1088 of file TrigMuonHypoConfig.py.

1088def TrigMuonEFInvMassHypoCfg(flags, toolName, thresholds, **kwargs):
1089
1090 massWindow = trigMuonEFInvMassThresholds[thresholds]
1091
1092 kwargs.setdefault("InvMassLow", massWindow[0])
1093 kwargs.setdefault("InvMassHigh", massWindow[1])
1094 kwargs.setdefault("AcceptAll", False)
1095
1096 tool = CompFactory.TrigMuonEFInvMassHypoTool(toolName, **kwargs)
1097 return tool
1098

◆ TrigMuonEFInvMassHypoToolFromDict()

TrigMuonEFInvMassHypoToolFromDict ( flags,
chainDict )

Definition at line 1069 of file TrigMuonHypoConfig.py.

1069def TrigMuonEFInvMassHypoToolFromDict( flags, chainDict ) :
1070 cparts = [i for i in chainDict['chainParts'] if i['signature']=='Muon']
1071 #The invariant mass is specified at end of chain, so only shows up in the last chainPart
1072 thresholds = cparts[-1]['invMassInfo']
1073 if "os" in cparts[-1]['addInfo']:
1074 osCut=True
1075 else:
1076 osCut = False
1077
1078 tool = TrigMuonEFInvMassHypoCfg( flags, chainDict['chainName'], thresholds, SelectOppositeSign=osCut )
1079
1080 if monitorAll:
1081 tool.MonTool = TrigMuonEFInvMassHypoMonitoring(flags, "TrigMuonEFInvMassHypoTool/"+chainDict['chainName'])
1082 else:
1083 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
1084 tool.MonTool = TrigMuonEFInvMassHypoMonitoring(flags, "TrigMuonEFInvMassHypoTool/"+chainDict['chainName'])
1085
1086 return tool
1087

◆ TrigMuonEFMSonlyHypoToolFromDict()

TrigMuonEFMSonlyHypoToolFromDict ( flags,
chainDict )

Definition at line 760 of file TrigMuonHypoConfig.py.

760def TrigMuonEFMSonlyHypoToolFromDict( flags, chainDict ) :
761 thresholds = getThresholdsFromDict( chainDict )
762 if chainDict['chainParts'][0]['multiplicity']=="0":
763 thresholds = [chainDict['chainParts'][0]['threshold']]
764 kwargs={}
765 kwargs.setdefault("RequireSAMuons",True)
766 if 'msonly' in chainDict['chainParts'][0]['msonlyInfo'] and 'noL1' not in chainDict['chainParts'][0]['extra']:
767 kwargs.setdefault("RemoveOverlaps",True)
768
769
770 if monitorAll:
771 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFMSonlyHypoTool/"+chainDict['chainName'])
772 kwargs.setdefault("MonTool", monTool)
773 else:
774 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
775 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFMSonlyHypoTool/"+chainDict['chainName'])
776 kwargs.setdefault("MonTool", monTool)
777 if '3layersEC' in chainDict['chainParts'][0]['addInfo']:
778 kwargs.setdefault("RequireThreeStations", True)
779
780 if 'nscan10' in chainDict['chainParts'][0]['addInfo']:
781 conesize = 0.1
782 narrowscan = True
783 elif 'nscan20' in chainDict['chainParts'][0]['addInfo']:
784 conesize = 0.2
785 narrowscan = True
786 elif 'nscan30' in chainDict['chainParts'][0]['addInfo']:
787 conesize = 0.3
788 narrowscan = True
789 elif 'nscan40' in chainDict['chainParts'][0]['addInfo']:
790 conesize = 0.4
791 narrowscan = True
792 elif 'nscan' in chainDict['chainParts'][0]['addInfo']:
793 conesize = 0.5
794 narrowscan = True
795 else:
796 narrowscan = False
797 conesize = 0.0
798
799 kwargs.setdefault("ConeSize", conesize)
800 kwargs.setdefault("NarrowScan", narrowscan)
801 kwargs.setdefault("IsPhII", flags.Trigger.Offline.SA.Muon.scheduleActsReco and
802 flags.Trigger.Offline.SA.Muon.usePhaseIIGeoSetup)
803
804 return TrigMuonEFHypoToolCfg( chainDict['chainName'], thresholds, doSA=True, **kwargs )
805

◆ TrigMuonEFMSonlyHypoToolFromName()

TrigMuonEFMSonlyHypoToolFromName ( flags,
chainDict )

Definition at line 806 of file TrigMuonHypoConfig.py.

806def TrigMuonEFMSonlyHypoToolFromName( flags, chainDict):
807 #For full scan chains, we need to configure the thresholds based on all muons
808 #in the chain to get the counting correct.
809 thresholds=[]
810 chainName = chainDict["chainName"]
811 hltChainName = chainName.rsplit("_L1",1)[0]
812 cparts = hltChainName.split("_")
813
814 if 'HLT' in hltChainName:
815 cparts.remove('HLT')
816 for part in cparts:
817 if 'mu' in part:
818 thrPart = part.split('mu')
819 if not thrPart[0] or thrPart[0] == "0":
820 mult = 1
821 else:
822 mult=thrPart[0]
823 thr = thrPart[1]
824 if 'noL1' in part:
825 thr =thr.replace('noL1','')
826 for i in range(1,int(mult)+1):
827 thresholds.append(thr)
828
829 monTool=None
830 if monitorAll:
831 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFMSonlyHypoTool/"+chainDict['chainName'])
832 else:
833 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
834 monTool = TrigMuonEFHypoMonitoring(flags, "TrigMuonEFMSonlyHypoTool/"+chainDict['chainName'])
835
836 if 'nscan10' in chainDict['chainParts'][0]['addInfo']:
837 conesize = 0.1
838 narrowscan = True
839 elif 'nscan20' in chainDict['chainParts'][0]['addInfo']:
840 conesize = 0.2
841 narrowscan = True
842 elif 'nscan30' in chainDict['chainParts'][0]['addInfo']:
843 conesize = 0.3
844 narrowscan = True
845 elif 'nscan40' in chainDict['chainParts'][0]['addInfo']:
846 conesize = 0.4
847 narrowscan = True
848 elif 'nscan' in chainDict['chainParts'][0]['addInfo']:
849 conesize = 0.5
850 narrowscan = True
851 else:
852 narrowscan = False
853 conesize = 0.0
854
855
856 return TrigMuonEFHypoToolCfg( chainDict['chainName'], thresholds, doSA=True, MonTool=monTool, RequireSAMuons=True, NarrowScan=narrowscan, ConeSize=conesize)
857

◆ TrigMuonEFTrackIsolationHypoAlgCfg()

TrigMuonEFTrackIsolationHypoAlgCfg ( flags,
name = "TrigMuonEFTrackIsolationHypoAlg",
** kwargs )

Definition at line 1066 of file TrigMuonHypoConfig.py.

1066def TrigMuonEFTrackIsolationHypoAlgCfg(flags, name="TrigMuonEFTrackIsolationHypoAlg", **kwargs):
1067 return CompFactory.TrigMuonEFTrackIsolationHypoAlg(name, **kwargs)
1068

◆ TrigMuonEFTrackIsolationHypoCfg()

TrigMuonEFTrackIsolationHypoCfg ( flags,
name,
isoCut,
** kwargs )

Definition at line 1037 of file TrigMuonHypoConfig.py.

1037def TrigMuonEFTrackIsolationHypoCfg(flags, name, isoCut, **kwargs) :
1038
1039
1040 if(isoCut=='passthrough') :
1041 kwargs.setdefault("AcceptAll", True)
1042
1043 else:
1044 ptcone03 = trigMuonEFTrkIsoThresholds[ isoCut ]
1045
1046 kwargs.setdefault("PtCone02Cut", 0.0)
1047 kwargs.setdefault("PtCone03Cut", ptcone03)
1048 kwargs.setdefault("AcceptAll", False)
1049
1050 if 'ms' in isoCut:
1051 kwargs.setdefault("RequireCombinedMuon", False)
1052 kwargs.setdefault("DoAbsCut", True)
1053 else:
1054 kwargs.setdefault("RequireCombinedMuon", True)
1055 kwargs.setdefault("DoAbsCut", False)
1056
1057
1058 if 'var' in isoCut :
1059 kwargs.setdefault("useVarIso", True)
1060 else :
1061 kwargs.setdefault("useVarIso", False)
1062
1063 tool = CompFactory.TrigMuonEFTrackIsolationHypoTool(name, **kwargs)
1064 return tool
1065
if(pathvar)

◆ TrigMuonEFTrackIsolationHypoToolFromDict()

TrigMuonEFTrackIsolationHypoToolFromDict ( flags,
chainDict )

Definition at line 1019 of file TrigMuonHypoConfig.py.

1019def TrigMuonEFTrackIsolationHypoToolFromDict( flags, chainDict ) :
1020 cparts = [i for i in chainDict['chainParts'] if i['signature']=='Muon']
1021 if 'ivarperf' in chainDict['chainParts'][0]['isoInfo']:
1022 thresholds = 'passthrough'
1023 else:
1024 thresholds = cparts[0]['isoInfo']
1025
1026 tool = TrigMuonEFTrackIsolationHypoCfg(flags, chainDict['chainName'], thresholds)
1027
1028
1029 if monitorAll:
1030 tool.MonTool = TrigMuonEFTrackIsolationMonitoring(flags, 'TrigMuonEFTrackIsolationHypoTool/'+chainDict['chainName'])
1031 else:
1032 if any(group in muonHypoMonGroups for group in chainDict['monGroups']):
1033 tool.MonTool = TrigMuonEFTrackIsolationMonitoring(flags, 'TrigMuonEFTrackIsolationHypoTool/'+chainDict['chainName'])
1034
1035 return tool
1036

◆ TrigMuonLateMuRoIHypoAlgCfg()

TrigMuonLateMuRoIHypoAlgCfg ( flags,
name = "TrigMuRoIHypoAlg",
** kwargs )

Definition at line 1171 of file TrigMuonHypoConfig.py.

1171def TrigMuonLateMuRoIHypoAlgCfg(flags, name="TrigMuRoIHypoAlg", **kwargs):
1172 return CompFactory.TrigMuonLateMuRoIHypoAlg(name, **kwargs)
1173

◆ TrigMuonLateMuRoIHypoCfg()

TrigMuonLateMuRoIHypoCfg ( flags,
name = "TrigMuRoIHypoTool" )

Definition at line 1178 of file TrigMuonHypoConfig.py.

1178def TrigMuonLateMuRoIHypoCfg(flags, name="TrigMuRoIHypoTool") :
1179
1180 tool = CompFactory.TrigMuonLateMuRoIHypoTool(name, AcceptAll=False)
1181 return tool

◆ TrigMuonLateMuRoIHypoToolFromDict()

TrigMuonLateMuRoIHypoToolFromDict ( flags,
chainDict )

Definition at line 1174 of file TrigMuonHypoConfig.py.

1174def TrigMuonLateMuRoIHypoToolFromDict(flags, chainDict ) :
1175 tool = TrigMuonLateMuRoIHypoCfg(flags, chainDict['chainName'])
1176 return tool
1177

Variable Documentation

◆ efCombinerThresholds

dict TrigMuonHypoConfig.efCombinerThresholds

Definition at line 164 of file TrigMuonHypoConfig.py.

◆ idHypoMonGroups

list TrigMuonHypoConfig.idHypoMonGroups = ['idMon:t0','idMon:shifter']

Definition at line 278 of file TrigMuonHypoConfig.py.

◆ log

TrigMuonHypoConfig.log = logging.getLogger('TrigMuonHypoConfig')

Definition at line 24 of file TrigMuonHypoConfig.py.

◆ monitorAll

bool TrigMuonHypoConfig.monitorAll = False

Definition at line 18 of file TrigMuonHypoConfig.py.

◆ muCombThresholds

dict TrigMuonHypoConfig.muCombThresholds

Definition at line 64 of file TrigMuonHypoConfig.py.

◆ muFastThresholds

dict TrigMuonHypoConfig.muFastThresholds

Definition at line 26 of file TrigMuonHypoConfig.py.

◆ muFastThresholdsForECWeakBRegion

dict TrigMuonHypoConfig.muFastThresholdsForECWeakBRegion

Definition at line 208 of file TrigMuonHypoConfig.py.

◆ muonHypoMonGroups

list TrigMuonHypoConfig.muonHypoMonGroups = ['muonMon:online']

Definition at line 277 of file TrigMuonHypoConfig.py.

◆ trigMuonEFInvMassThresholds

dict TrigMuonHypoConfig.trigMuonEFInvMassThresholds
Initial value:
= {
'invmJPsiOS' : [2.5, 4.3],
'invmDimu' : [1.5, 14.],
'idZmumu' : [50., 130.],
'idJpsimumu' : [1., 5.],
}

Definition at line 269 of file TrigMuonHypoConfig.py.

◆ trigMuonEFSAThresholds

dict TrigMuonHypoConfig.trigMuonEFSAThresholds

Definition at line 118 of file TrigMuonHypoConfig.py.

◆ trigMuonEFTrkIsoThresholds

dict TrigMuonHypoConfig.trigMuonEFTrkIsoThresholds
Initial value:
= {
'ivarloose' : 0.16, #ivarloose
'ivarmedium' : 0.07, #ivarmedium
'ivartight' : 0.06, #ivartight
'ivarverytight' : 0.04, #ivarverytight
'iloosems' : 3000.0 #ms-only iso
}

Definition at line 252 of file TrigMuonHypoConfig.py.

◆ trigMuonLrtd0Cut

dict TrigMuonHypoConfig.trigMuonLrtd0Cut
Initial value:
= {
'd0loose' : 2.0,
'd0medium' : 3.0,
'd0tight' : 5.0
}

Definition at line 260 of file TrigMuonHypoConfig.py.