ATLAS Offline Software
Loading...
Searching...
No Matches
python.IDCalibHypoConfig Namespace Reference

Functions

 createIDCalibHypoAlg (flags, name)
 IDCalibHypoToolFromDict (flags, chainDict)

Function Documentation

◆ createIDCalibHypoAlg()

python.IDCalibHypoConfig.createIDCalibHypoAlg ( flags,
name )

Definition at line 9 of file IDCalibHypoConfig.py.

9def createIDCalibHypoAlg(flags, name):
10 # Monitoring
11 monTool = GenericMonitoringTool(flags, "IM_MonTool"+name,
12 HistPath = 'IDCalibHypoAlg')
13 monTool.defineHistogram('pt', type='TH1F', path='EXPERT', title="p_{T};p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
14
15 # Setup the hypothesis algorithm
16 theHypo = CompFactory.IDCalibHypoAlg(name,
17 MonTool = monTool)
18 return theHypo
19
20

◆ IDCalibHypoToolFromDict()

python.IDCalibHypoConfig.IDCalibHypoToolFromDict ( flags,
chainDict )

Definition at line 21 of file IDCalibHypoConfig.py.

21def IDCalibHypoToolFromDict(flags, chainDict):
22
23 log = logging.getLogger('IDCalibHypoTool')
24
25 """ Use menu decoded chain dictionary to configure the tool """
26 cparts = [i for i in chainDict['chainParts'] if i['signature']=='Calib']
27
28 name = "default_chain_name"
29 if 'chainName' in chainDict:
30 name = chainDict['chainName']
31 else:
32 log.error("chainName not in chain dictionary")
33
34 # set thresholds
35 m = re.search(r'trk(\d+)',[ cpart['hypo'] for cpart in cparts ][0])
36 threshold = m.group(1)
37
38 mult = [ cpart['multiplicity'] for cpart in cparts ][0]
39 thresholds = [ float(threshold) for x in range(0,int(mult)) ]
40 log.debug("Threshold values are: %s", ", ".join(str(THR) for THR in thresholds))
41
42 tool = CompFactory.IDCalibHypoTool(name,
43 cutTrackPtGeV = thresholds)
44 return tool