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 theDisTrkHypo = CompFactory.TrigDisappearingTrackHypoAlg(name)
17 from TrigEDMConfig.TriggerEDM
import recordable
18 theDisTrkHypo.DisTrkBDTSel =
recordable(
"HLT_DisTrkBDTSel")
22 monTool.defineHistogram(
'category', type=
'TH1F', path=
'EXPERT', title=
"DisTrk Category;DisTrk Category;Nevents", xbins=5, xmin=-0.5, xmax=4.5)
24 monTool.defineHistogram(
'pix4_sct0_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 p_{T};p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
25 monTool.defineHistogram(
'pix4_sct0_z0', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 z_{0} (wrt pVtx);z_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-50, xmax=50)
26 monTool.defineHistogram(
'pix4_sct0_d0', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 d_{0} (wrt pVtx);d_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-10, xmax=10)
27 monTool.defineHistogram(
'pix4_sct0_iso01', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 Trk Iso (#DeltaR < 0.1) [GeV];Trk Iso (#DeltaR < 0.1) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
28 monTool.defineHistogram(
'pix4_sct0_iso0201', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
29 monTool.defineHistogram(
'pix4_sct0_chi2ndof', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 #chi^{2}/ndof;#chi^{2}/ndof;Nevents", xbins=50, xmin=0, xmax=10)
30 monTool.defineHistogram(
'pix4_sct0_chi2ndof_pix', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 #chi^{2}/ndof (Pixel);#chi^{2}/ndof (Pixel);Nevents", xbins=50, xmin=0, xmax=10)
31 monTool.defineHistogram(
'pix4_sct0_refit_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 refit p_{T} [GeV];refit p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
32 monTool.defineHistogram(
'pix4_sct0_n_pix', type=
'TH1I', path=
'EXPERT', title=
"Pix4Sct0 N Pixel hits;N Pixel hits;Nevents", xbins=10, xmin=0, xmax=10)
33 monTool.defineHistogram(
'pix4_sct0_refit_ptratio', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 refit p_{T} / p_{T};refit p_{T} / p_{T};Nevents", xbins=50, xmin=0, xmax=10)
34 monTool.defineHistogram(
'pix4_sct0_refit_chi2ndof',type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 refit #chi^{2}/ndof;refit #chi^{2}/ndof;Nevents", xbins=50, xmin=0, xmax=10)
35 monTool.defineHistogram(
'pix4_sct0_n_bl', type=
'TH1I', path=
'EXPERT', title=
"Pix4Sct0 N B-layer hits;N B-layer hits;Nevents", xbins=10, xmin=0, xmax=10)
36 monTool.defineHistogram(
'pix4_sct0_bdtscore', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct0 BDT score;BDT score;Nevents", xbins=50, xmin=-1, xmax=1)
38 monTool.defineHistogram(
'pix4_sct1p_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p p_{T};p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
39 monTool.defineHistogram(
'pix4_sct1p_refit_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p refit p_{T};refit p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
40 monTool.defineHistogram(
'pix4_sct1p_refit_z0', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p refit z_{0} (wrt pVtx);z_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-50, xmax=50)
41 monTool.defineHistogram(
'pix4_sct1p_refit_d0', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p refit d_{0} (wrt pVtx);d_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-10, xmax=10)
42 monTool.defineHistogram(
'pix4_sct1p_n_sct', type=
'TH1I', path=
'EXPERT', title=
"Pix4Sct1p N SCT hits;N SCT hits;Nevents", xbins=20, xmin=0, xmax=20)
43 monTool.defineHistogram(
'pix4_sct1p_refit_ptratio', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p refit p_{T} / p_{T};refit p_{T} / p_{T};Nevents", xbins=50, xmin=0, xmax=10)
44 monTool.defineHistogram(
'pix4_sct1p_refit_chi2ndof_ratio',type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p refit #chi^{2}/ndof;refit #chi^{2}/ndof;Nevents", xbins=50, xmin=0, xmax=10)
45 monTool.defineHistogram(
'pix4_sct1p_iso01', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p Trk Iso (#DeltaR < 0.1) [GeV];Trk Iso (#DeltaR < 0.1) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
46 monTool.defineHistogram(
'pix4_sct1p_iso0201', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
47 monTool.defineHistogram(
'pix4_sct1p_chi2ndof_pix', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p #chi^{2}/ndof (Pixel);#chi^{2}/ndof (Pixel);Nevents", xbins=50, xmin=0, xmax=10)
48 monTool.defineHistogram(
'pix4_sct1p_n_pix', type=
'TH1I', path=
'EXPERT', title=
"Pix4Sct1p N Pixel hits;N Pixel hits;Nevents", xbins=10, xmin=0, xmax=10)
49 monTool.defineHistogram(
'pix4_sct1p_bdtscore', type=
'TH1F', path=
'EXPERT', title=
"Pix4Sct1p BDT score;BDT score;Nevents", xbins=50, xmin=-1, xmax=1)
51 monTool.defineHistogram(
'pix3_sct0_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 p_{T} [GeV];p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
52 monTool.defineHistogram(
'pix3_sct0_z0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 z_{0} (wrt pVtx) [mm];z_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-50, xmax=50)
53 monTool.defineHistogram(
'pix3_sct0_d0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 d_{0} (wrt pVtx) [mm];d_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-10, xmax=10)
54 monTool.defineHistogram(
'pix3_sct0_chi2ndof', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 #chi^{2}/ndof;#chi^{2}/ndof;Nevents", xbins=50, xmin=0, xmax=10)
55 monTool.defineHistogram(
'pix3_sct0_chi2ndof_pix', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 #chi^{2}/ndof (Pixel);#chi^{2}/ndof (Pixel);Nevents", xbins=50, xmin=0, xmax=10)
56 monTool.defineHistogram(
'pix3_sct0_iso01', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 Trk Iso (#DeltaR < 0.1) [GeV];Trk Iso (#DeltaR < 0.1) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
57 monTool.defineHistogram(
'pix3_sct0_iso0201', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
58 monTool.defineHistogram(
'pix3_sct0_refit_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 refit p_{T} [GeV];refit p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
59 monTool.defineHistogram(
'pix3_sct0_refit_z0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 refit z_{0} (wrt pVtx) [mm];refit z_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-50, xmax=50)
60 monTool.defineHistogram(
'pix3_sct0_refit_d0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct0 refit d_{0} (wrt pVtx) [mm];refit d_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-10, xmax=10)
61 monTool.defineHistogram(
'pix3_sct0_n_pix', type=
'TH1I', path=
'EXPERT', title=
"Pix3Sct0 N Pixel hits;N Pixel hits;Nevents", xbins=10, xmin=0, xmax=10)
62 monTool.defineHistogram(
'pix3_sct0_n_bl', type=
'TH1I', path=
'EXPERT', title=
"Pix3Sct0 N B-layer hits;N B-layer hits;Nevents", xbins=4, xmin=0, xmax=4)
63 monTool.defineHistogram(
'pix3_sct0_bdtscore', type=
'TH1F', path=
'EXPERT', title=
"Pix3lSct0 BDT score;BDT score;Nevents", xbins=50, xmin=-1, xmax=1)
65 monTool.defineHistogram(
'pix3_sct1p_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p p_{T} [GeV];p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
66 monTool.defineHistogram(
'pix3_sct1p_z0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p z_{0} (wrt pVtx) [mm];z_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-50, xmax=50)
67 monTool.defineHistogram(
'pix3_sct1p_d0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p d_{0} (wrt pVtx) [mm];d_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-10, xmax=10)
68 monTool.defineHistogram(
'pix3_sct1p_refit_pt', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p refit p_{T} [GeV];refit p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
69 monTool.defineHistogram(
'pix3_sct1p_refit_z0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p refit z_{0} (wrt pVtx) [mm];refit z_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-50, xmax=50)
70 monTool.defineHistogram(
'pix3_sct1p_refit_d0', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p refit d_{0} (wrt pVtx) [mm];refit d_{0} (wrt pVtx) [mm];Nevents", xbins=25, xmin=-10, xmax=10)
71 monTool.defineHistogram(
'pix3_sct1p_n_pix', type=
'TH1I', path=
'EXPERT', title=
"Pix3Sct1p N Pixel hits;N Pixel hits;Nevents", xbins=10, xmin=0, xmax=10)
72 monTool.defineHistogram(
'pix3_sct1p_n_sct', type=
'TH1I', path=
'EXPERT', title=
"Pix3Sct1p N SCT hits;N SCT hits;Nevents", xbins=10, xmin=0, xmax=10)
73 monTool.defineHistogram(
'pix3_sct1p_n_bl', type=
'TH1I', path=
'EXPERT', title=
"Pix3Sct1p N B-layer hits;N B-layer hits;Nevents", xbins=4, xmin=0, xmax=4)
74 monTool.defineHistogram(
'pix3_sct1p_chi2ndof', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p #chi^{2}/ndof;#chi^{2}/ndof;Nevents", xbins=50, xmin=0, xmax=10)
75 monTool.defineHistogram(
'pix3_sct1p_iso01', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p Trk Iso (#DeltaR < 0.1) [GeV];Trk Iso (#DeltaR < 0.1) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
76 monTool.defineHistogram(
'pix3_sct1p_iso0201', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Trk Iso (0.1 < #DeltaR < 0.2) [GeV];Nevents", xbins=20, xmin=0, xmax=20)
77 monTool.defineHistogram(
'pix3_sct1p_refit_ptratio', type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p refit p_{T} / p_{T};refit p_{T} / p_{T};Nevents", xbins=50, xmin=0, xmax=10)
78 monTool.defineHistogram(
'pix3_sct1p_refit_chi2ndof',type=
'TH1F', path=
'EXPERT', title=
"Pix3Sct1p refit #chi^{2}/ndof;refit #chi^{2}/ndof;Nevents", xbins=50, xmin=0, xmax=10)
79 monTool.defineHistogram(
'pix3_sct1p_bdtscore', type=
'TH1F', path=
'EXPERT', title=
"Pix3lSct1p BDT score;BDT score;Nevents", xbins=50, xmin=-1, xmax=1)
81 monTool.HistPath =
'disappearingTrackHypoAlg'
82 theDisTrkHypo.MonTool = monTool
84 acc.addEventAlgo(theDisTrkHypo)
91 log = logging.getLogger(
'TrigDisappearingTrackHypoTool')
93 """ Use menu decoded chain dictionary to configure the tool """
94 cparts = [i
for i
in chainDict[
'chainParts']
if i[
'signature']==
'UnconventionalTracking']
96 name = chainDict[
'chainName']
97 from AthenaConfiguration.ComponentFactory
import CompFactory
98 tool = CompFactory.TrigDisappearingTrackHypoTool(name)
101 thresholds =
sum([ [cpart[
'threshold']]*
int(cpart[
'multiplicity'])
for cpart
in cparts], [])
102 thresholds = [
float(THR)
for THR
in thresholds ]
104 for THR
in thresholds:
105 strThr +=
str(THR)+
", "
107 log.debug(
"Threshold Values are: %s",strThr)
109 tool.cutTrackPtGeV = thresholds
112 if cpart[
'IDinfo'] ==
"loose":
113 bdt4l0 = [-0.100] * len(thresholds)
114 bdt4l1p = [-0.080] * len(thresholds)
115 bdt3l0 = [ 0.010] * len(thresholds)
116 bdt3l1p = [ 0.110] * len(thresholds)
117 log.debug(
"Loose BDT WP is set")
118 elif cpart[
'IDinfo'] ==
"tight":
119 bdt4l0 = [-0.100] * len(thresholds)
120 bdt4l1p = [ 0.040] * len(thresholds)
121 bdt3l0 = [ 0.040] * len(thresholds)
122 bdt3l1p = [ 0.155] * len(thresholds)
123 log.debug(
"Tight BDT WP is set")
124 elif cpart[
'IDinfo'] ==
"vloose":
125 bdt4l0 = [-0.100] * len(thresholds)
126 bdt4l1p = [-0.180] * len(thresholds)
127 bdt3l0 = [ 0.010] * len(thresholds)
128 bdt3l1p = [ 0.040] * len(thresholds)
129 log.debug(
"VeryLoose BDT WP is set")
131 bdt4l0 = [-0.100] * len(thresholds)
132 bdt4l1p = [-0.080] * len(thresholds)
133 bdt3l0 = [ 0.040] * len(thresholds)
134 bdt3l1p = [ 0.145] * len(thresholds)
135 if cpart[
'IDinfo'] ==
"medium":
136 log.debug(
"Medium BDT WP is set")
138 log.info(
"IDinfo not provided, setting medium BDT WP")
140 tool.cutBDTPix4Sct0 = bdt4l0
141 tool.cutBDTPix4Sct1p = bdt4l1p
142 tool.cutBDTPix3Sct0 = bdt3l0
143 tool.cutBDTPix3Sct1p = bdt3l1p