5def TrigHIFwdGapHypoToolFromDict(flags, chainDict):
6 """Configure the FCal-based forward gap hypo tool"""
7
8 tool = CompFactory.TrigHIFwdGapHypoTool(chainDict['chainName'])
9
10 FgapInfo = chainDict['chainParts'][0]['hypoFgapInfo'][0]
11 if 'AC' in FgapInfo:
12 tool.maxFCalEt = int(FgapInfo.strip('FgapAC'))
13 tool.useDoubleSidedGap = True
14 elif 'A' in FgapInfo:
15 tool.maxFCalEt = int(FgapInfo.strip('FgapA'))
16 tool.useSideA = True
17 elif 'C' in FgapInfo:
18 tool.maxFCalEt = int(FgapInfo.strip('FgapC'))
19 tool.useSideA = False
20
21 return tool
22