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

Functions

ComponentAccumulator createTrigDisappearingTrackHypoAlgCfg (AthConfigFlags flags, str name)
 TrigDisappearingTrackHypoToolFromDict (flags, chainDict)

Function Documentation

◆ createTrigDisappearingTrackHypoAlgCfg()

ComponentAccumulator python.TrigDisappearingTrackHypoConfig.createTrigDisappearingTrackHypoAlgCfg ( AthConfigFlags flags,
str name )

Definition at line 10 of file TrigDisappearingTrackHypoConfig.py.

10def createTrigDisappearingTrackHypoAlgCfg(flags: AthConfigFlags, name : str) -> ComponentAccumulator:
11
12 acc = ComponentAccumulator()
13
14 # Setup the hypothesis algorithm
15 theDisTrkHypo = CompFactory.TrigDisappearingTrackHypoAlg(name)
16
17 from TrigEDMConfig.TriggerEDM import recordable
18 theDisTrkHypo.DisTrkBDTSel = recordable("HLT_DisTrkBDTSel")
19
20 # monioring
21 monTool = GenericMonitoringTool(flags, "IM_MonTool"+name)
22 monTool.defineHistogram('category', type='TH1F', path='EXPERT', title="DisTrk Category;DisTrk Category;Nevents", xbins=5, xmin=-0.5, xmax=4.5)
23 #
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)
37 #
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)
50 #
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)
64 #
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)
80 #
81 monTool.HistPath = 'disappearingTrackHypoAlg'
82 theDisTrkHypo.MonTool = monTool
83
84 acc.addEventAlgo(theDisTrkHypo)
85 return acc
86
87
88

◆ TrigDisappearingTrackHypoToolFromDict()

python.TrigDisappearingTrackHypoConfig.TrigDisappearingTrackHypoToolFromDict ( flags,
chainDict )

Definition at line 89 of file TrigDisappearingTrackHypoConfig.py.

89def TrigDisappearingTrackHypoToolFromDict( flags, chainDict ):
90
91 log = logging.getLogger('TrigDisappearingTrackHypoTool')
92
93 """ Use menu decoded chain dictionary to configure the tool """
94 cparts = [i for i in chainDict['chainParts'] if i['signature']=='UnconventionalTracking']
95
96 name = chainDict['chainName']
97 from AthenaConfiguration.ComponentFactory import CompFactory
98 tool = CompFactory.TrigDisappearingTrackHypoTool(name)
99
100 # set thresholds
101 thresholds = sum([ [cpart['threshold']]*int(cpart['multiplicity']) for cpart in cparts], [])
102 thresholds = [ float(THR) for THR in thresholds ]
103 strThr = ""
104 for THR in thresholds:
105 strThr += str(THR)+", "
106
107 log.debug("Threshold Values are: %s",strThr)
108
109 tool.cutTrackPtGeV = thresholds
110
111 for cpart in cparts:
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")
130 else:
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")
137 else:
138 log.info("IDinfo not provided, setting medium BDT WP")
139
140 tool.cutBDTPix4Sct0 = bdt4l0
141 tool.cutBDTPix4Sct1p = bdt4l1p
142 tool.cutBDTPix3Sct0 = bdt3l0
143 tool.cutBDTPix3Sct1p = bdt3l1p
144
145 return tool