5 from AthenaCommon.Logging
import logging
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
12 HistPath =
'IDCalibHypoAlg')
13 monTool.defineHistogram(
'pt', type=
'TH1F', path=
'EXPERT', title=
"p_{T};p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
16 theHypo = CompFactory.IDCalibHypoAlg(name,
23 log = logging.getLogger(
'IDCalibHypoTool')
25 """ Use menu decoded chain dictionary to configure the tool """
26 cparts = [i
for i
in chainDict[
'chainParts']
if i[
'signature']==
'Calib']
28 name =
"default_chain_name"
29 if 'chainName' in chainDict:
30 name = chainDict[
'chainName']
32 log.error(
"chainName not in chain dictionary")
35 m = re.search(
r'trk(\d+)',[ cpart[
'hypo']
for cpart
in cparts ][0])
36 threshold = m.group(1)
38 mult = [ cpart[
'multiplicity']
for cpart
in cparts ][0]
40 log.debug(
"Threshold values are: %s",
", ".
join(
str(THR)
for THR
in thresholds))
42 tool = CompFactory.IDCalibHypoTool(name,
43 cutTrackPtGeV = thresholds)