14def TRTPlot_builder( monTool, mypath, chain, cs ) :
15
16 from TrigIDR4Monitoring.HistUtils import ptbins_mb
17 from TrigIDR4Monitoring.HistUtils import ptbins_default
18
19 if "mb" in chain : ptbins = ptbins_mb
20 else: ptbins = ptbins_default
21
22
23
24
25
26
27
28 from TrigIDR4Monitoring.HistUtils import d0bins_default
29 from TrigIDR4Monitoring.HistUtils import d0bins_lrt
30
31 if "LRT" in chain : d0bins = d0bins_lrt
32 else: d0bins = d0bins_default
33
34
35 npath = mypath + "/TRTHits"
36
37 varConfig = {
38 "pt": {"xbins": ptbins},
39 "eta": {"xbins": 40, "xmin": -4, "xmax": 4},
40 "phi": {"xbins": 20, "xmin": -3.142, "xmax": 3.142},
41 "d0": {"xbins": d0bins}
42 }
43
44 for dir in [ "reference", "test" ]:
45
46 mpath = npath+"/"+dir
47
48
49
50
51
52
53
54 defineHisto( monTool, "NTRTHits", namespace=dir,path=mpath, type="TH1F", title="NInnerMostPixelHits", xbins=61, xmin=-0.5, xmax=60.5 )
55 defineHisto( monTool, "NTRTHighThresholdHits", namespace=dir,path=mpath, type="TH1F", title="NInnerMostPixelEndcapHits", xbins=61, xmin=-0.5, xmax=60.5 )
56
57 for var, bins in varConfig.items():
58
59 stub = "_vs_"+var
60
61 defineHisto( monTool, f"NTRTHits{stub}", namespace=dir, path=mpath, type="TProfile", title="NTRTHits", **bins )
62 defineHisto( monTool, f"NTRTHighThresholdHits{stub}", namespace=dir, path=mpath, type="TProfile", title="NTRTHighThresholdHits", **bins )
63
64
65 return monTool
66