3 from AthenaCommon.Logging
import logging
4 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
15 thedEdxTrackHypo = CompFactory.TrigdEdxTrackHypoAlg(name)
17 from TrigEDMConfig.TriggerEDM
import recordable
18 thedEdxTrackHypo.HPtdEdxTrk =
recordable(
"HLT_HPtdEdxTrk")
22 monTool.defineHistogram(
'trackPtGeV', type=
'TH1F', path=
'EXPERT', title=
"Hypo p_{T}^{track};p_{T}^{track} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
23 monTool.defineHistogram(
'trackEta', type=
'TH1F', path=
'EXPERT', title=
"Hypo p_{T}^{track} (after p_{T} cut);eta;Nevents", xbins=60, xmin=-3.0, xmax=3.0)
24 monTool.defineHistogram(
'tracka0beam',type=
'TH1F', path=
'EXPERT', title=
"Hypo a0beam (after eta cut);a0beam [mm];Nevents", xbins=50, xmin=-5.0, xmax=5.0)
25 monTool.defineHistogram(
'trackdEdx', type=
'TH1F', path=
'EXPERT', title=
"Hypo dE/dx (after a0beam cut);dE/dx;Nevents", xbins=50, xmin=0, xmax=10)
26 monTool.defineHistogram(
'trackNhighdEdxHits', type=
'TH1F', path=
'EXPERT', title=
"Hypo Nr high dE/dx hits (after dEdx cut);N high dE/dx hits;Nevents", xbins=10, xmin=0, xmax=10)
28 monTool.HistPath =
'dEdxTrackHypoAlg'
29 thedEdxTrackHypo.MonTool = monTool
31 acc.addEventAlgo(thedEdxTrackHypo)
37 log = logging.getLogger(
'TrigdEdxTrackHypoTool')
39 """ Use menu decoded chain dictionary to configure the tool """
40 cparts = [i
for i
in chainDict[
'chainParts']
if i[
'signature']==
'UnconventionalTracking']
41 thresholds =
sum([ [cpart[
'threshold']]*
int(cpart[
'multiplicity'])
for cpart
in cparts], [])
43 name = chainDict[
'chainName']
44 from AthenaConfiguration.ComponentFactory
import CompFactory
45 tool = CompFactory.TrigdEdxTrackHypoTool(name)
51 thresholds = [
float(THR)
for THR
in thresholds]
53 for THR
in thresholds:
54 strThr +=
str(THR)+
", "
56 log.debug(
"Threshold Values are: %s",strThr)
58 tool.cutTrackPtGeV = thresholds
67 if cpart[
'IDinfo'] ==
"loose":
68 log.debug(
"UTT: Loose ID working point is set")
71 tracka0beam.append(5.0)
72 trackNhighdEdxHits.append(1)
73 trackHighdEdxDef.append(
"1p50")
74 elif cpart[
'IDinfo'] ==
"tight":
75 log.debug(
"UTT: Tight ID working point is set")
78 tracka0beam.append(1.5)
79 trackNhighdEdxHits.append(2)
80 trackHighdEdxDef.append(
"1p80")
82 log.debug(
"UTT: Medium ID working point is set")
85 tracka0beam.append(2.5)
86 trackNhighdEdxHits.append(2)
87 trackHighdEdxDef.append(
"1p70")
89 tool.cutTrackEta = trackEta
90 tool.cutTrackdEdx = trackdEdx
91 tool.cutTracka0beam = tracka0beam
92 tool.cutTrackNhighdEdxHits = trackNhighdEdxHits
93 tool.cutTrackHighdEdxDef = trackHighdEdxDef