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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.TrigMuonEFCombinerHypoToolFromDict ( flags,
chainDict )

Definition at line 898 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFCombinerHypoToolFromName()

TrigMuonHypoConfig.TrigMuonEFCombinerHypoToolFromName ( flags,
chainDict )

Definition at line 956 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFFastRecoSAHypoToolFromDict()

TrigMuonHypoConfig.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()

TrigMuonHypoConfig.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()

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

Definition at line 856 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFIdtpHypoAlgCfg()

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

Definition at line 1166 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFIdtpHypoCfg()

TrigMuonHypoConfig.TrigMuonEFIdtpHypoCfg ( name,
thresholds,
** kwargs )

Definition at line 1106 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFIdtpHypoToolFromDict()

TrigMuonHypoConfig.TrigMuonEFIdtpHypoToolFromDict ( flags,
chainDict )

Definition at line 1097 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFIdtpInvMassHypoCfg()

TrigMuonHypoConfig.TrigMuonEFIdtpInvMassHypoCfg ( name,
thresholds,
** kwargs )

Definition at line 1156 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFIdtpInvMassHypoToolFromDict()

TrigMuonHypoConfig.TrigMuonEFIdtpInvMassHypoToolFromDict ( flags,
chainDict )

Definition at line 1139 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFInvMassHypoCfg()

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

Definition at line 1086 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFInvMassHypoToolFromDict()

TrigMuonHypoConfig.TrigMuonEFInvMassHypoToolFromDict ( flags,
chainDict )

Definition at line 1067 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFMSonlyHypoToolFromDict()

TrigMuonHypoConfig.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
802 return TrigMuonEFHypoToolCfg( chainDict['chainName'], thresholds, doSA=True, **kwargs )
803

◆ TrigMuonEFMSonlyHypoToolFromName()

TrigMuonHypoConfig.TrigMuonEFMSonlyHypoToolFromName ( flags,
chainDict )

Definition at line 804 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFTrackIsolationHypoAlgCfg()

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

Definition at line 1064 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFTrackIsolationHypoCfg()

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

Definition at line 1035 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonEFTrackIsolationHypoToolFromDict()

TrigMuonHypoConfig.TrigMuonEFTrackIsolationHypoToolFromDict ( flags,
chainDict )

Definition at line 1017 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonLateMuRoIHypoAlgCfg()

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

Definition at line 1169 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonLateMuRoIHypoCfg()

TrigMuonHypoConfig.TrigMuonLateMuRoIHypoCfg ( flags,
name = "TrigMuRoIHypoTool" )

Definition at line 1176 of file TrigMuonHypoConfig.py.

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

◆ TrigMuonLateMuRoIHypoToolFromDict()

TrigMuonHypoConfig.TrigMuonLateMuRoIHypoToolFromDict ( flags,
chainDict )

Definition at line 1172 of file TrigMuonHypoConfig.py.

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

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:
1= {
2 'invmJPsiOS' : [2.5, 4.3],
3 'invmDimu' : [1.5, 14.],
4 'idZmumu' : [50., 130.],
5 'idJpsimumu' : [1., 5.],
6}

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:
1= {
2 'ivarloose' : 0.16, #ivarloose
3 'ivarmedium' : 0.07, #ivarmedium
4 'ivartight' : 0.06, #ivartight
5 'ivarverytight' : 0.04, #ivarverytight
6 'iloosems' : 3000.0 #ms-only iso
7 }

Definition at line 252 of file TrigMuonHypoConfig.py.

◆ trigMuonLrtd0Cut

dict TrigMuonHypoConfig.trigMuonLrtd0Cut
Initial value:
1= {
2 'd0loose' : 2.0,
3 'd0medium' : 3.0,
4 'd0tight' : 5.0
5 }

Definition at line 260 of file TrigMuonHypoConfig.py.