Commit a5369926 authored by Savanna Shaw's avatar Savanna Shaw
Browse files

Fix configuration for full scan muon trigger hypo tool

Fixing the configuration of the full scan muon trigger ypo tool to get the correct multiplicity and thresholds for multi-muon noL1 triggers (ATR-23813). This affects the counts for any triggers containing NmuXnoL1 where N is greater than one, so the chain count references have been updated accordingly.
Also improved slightly the switching on of the nscan trigger configuration (what was there worked only because we specify the nscan part of the trigger on the last chain part. Have switched to something more correct/robust).
parent 3ac47c59
......@@ -553,21 +553,26 @@ def TrigMuonEFMSonlyHypoToolFromDict( chainDict ) :
def TrigMuonEFMSonlyHypoToolFromName(chainDict):
#For full scan chains, we need to configure the thresholds based on all muons
#in the chain to get the counting correct. Currently a bit convoluted as
#the chain dict is (improperly) overwritten when merging for FS chains.
#Can probably improve this once serial merging is officially implemented
#in the chain to get the counting correct.
thresholds=[]
chainName = chainDict["chainName"]
hltChainName = chainName[:chainName.index("_L1")]
cparts = hltChainName.split("_")
if 'HLT' in hltChainName:
cparts.remove('HLT')
for part in cparts:
if 'mu' in part:
thr=part.replace('mu','')
thrPart = part.split('mu')
if not thrPart[0]:
mult = 1
else:
mult=thrPart[0]
thr = thrPart[1]
if 'noL1' in part:
thr =thr.replace('noL1','')
thresholds.append(thr)
for i in range(1,int(mult)+1):
thresholds.append(thr)
config = TrigMuonEFMSonlyHypoConfig()
tool = config.ConfigurationHypoTool(chainDict['chainName'], thresholds)
addMonitoring( tool, TrigMuonEFHypoMonitoring, "TrigMuonEFMSonlyHypoTool", chainDict['chainName'] )
......@@ -656,14 +661,21 @@ def TrigMuonEFCombinerHypoToolFromName(chainDict):
cparts.remove('HLT')
for part in cparts:
if 'mu' in part:
thr=part.replace('mu','')
thrPart = part.split('mu')
if not thrPart[0]:
mult = 1
else:
mult=thrPart[0]
thr = thrPart[1]
if 'noL1' in part:
thr =thr.replace('noL1','')
thresholds.append(thr)
if 'nscan' in cparts:
narrowscan=True
else:
narrowscan=False
for i in range(1,int(mult)+1):
thresholds.append(thr)
if 'nscan' in chainDict['chainParts'][0]['addInfo']:
narrowscan=True
else:
narrowscan=False
if 'muonqual' in chainDict['chainParts'][0]['addInfo']:
muonquality = True
......
......@@ -6305,21 +6305,19 @@ HLT_mu14_tau25_mediumRNN_tracktwoMVA_xe50_cell_03dRAB_L1MU10_TAU12IM_XE35:
7: 6
8: 1
HLT_mu20_2mu4noL1_L1MU20:
eventCount: 1
eventCount: 0
stepCounts:
0: 8
1: 6
2: 6
3: 6
4: 1
5: 1
stepFeatures:
0: 10
1: 7
2: 7
3: 7
4: 2
5: 2
4: 3
HLT_mu20_L1MU6:
eventCount: 6
stepCounts:
......@@ -6506,21 +6504,19 @@ HLT_mu20_mu2noL1_invmJPsi_os_L1MU20:
4: 7
5: 7
HLT_mu22_2mu4noL1_L1MU20:
eventCount: 1
eventCount: 0
stepCounts:
0: 8
1: 6
2: 6
3: 6
4: 1
5: 1
stepFeatures:
0: 10
1: 7
2: 7
3: 7
4: 2
5: 2
4: 3
HLT_mu22_mu10noL1_L1MU20:
eventCount: 2
stepCounts:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment