14def SiHitPlot_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 + "/SiHits"
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
55
56 defineHisto( monTool, "NInnerMostPixelHits", namespace=dir,path=mpath, type="TH1F", title="NInnerMostPixelHits", xbins=21, xmin=-0.5, xmax=20.5 )
57 defineHisto( monTool, "NInnerMostPixelEndcapHits", namespace=dir,path=mpath, type="TH1F", title="NInnerMostPixelEndcapHits", xbins=21, xmin=-0.5, xmax=20.5 )
58
59
60 defineHisto( monTool, "NInnerMostPixelSharedHits", namespace=dir, path=mpath, type="TH1F", title="NInnerMostPixelSharedHits", xbins=21, xmin=-0.5, xmax=20.5 )
61 defineHisto( monTool, "NInnerMostPixelSharedEndcapHits", namespace=dir, path=mpath, type="TH1F", title="NInnerMostPixelSharedEndcapHits", xbins=21, xmin=-0.5, xmax=20.5 )
62 defineHisto( monTool, "NPixelHits", namespace=dir, path=mpath, type="TH1F", title="NPixelHits", xbins=21, xmin=-0.5, xmax=20.5 )
63 defineHisto( monTool, "NPixelHoles", namespace=dir, path=mpath, type="TH1F", title="NPixelHoles", xbins=11, xmin=-0.5, xmax=10.5 )
64 defineHisto( monTool, "NPixelSharedHits", namespace=dir, path=mpath, type="TH1F", title="NPixelSharedHits", xbins=21, xmin=-0.5, xmax=20.5 )
65
66 defineHisto( monTool, "NSCTHits", namespace=dir, path=mpath, type="TH1F", title="NSCTHits", xbins=21, xmin=-0.5, xmax=20.5 )
67 defineHisto( monTool, "NSCTHoles", namespace=dir, path=mpath, type="TH1F", title="NSCTHoles", xbins=11, xmin=-0.5, xmax=10.5 )
68 defineHisto( monTool, "NSCTSharedHits", namespace=dir, path=mpath, type="TH1F", title="NSCTSharedHits", xbins=21, xmin=-0.5, xmax=20.5 )
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85 for var, bins in varConfig.items():
86
87 stub = "_vs_"+var
88
89 defineHisto( monTool, "NInnerMostPixelHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NInnerMostPixelHits", **bins )
90 defineHisto( monTool, "NInnerMostPixelEndcapHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NInnerMostPixelEndcapHits", **bins )
91
92
93 defineHisto( monTool, "NInnerMostPixelSharedHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NInnerMostPixelSharedHits", **bins )
94 defineHisto( monTool, "NInnerMostPixelSharedEndcapHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NInnerMostPixelSharedEndcapHits", **bins )
95 defineHisto( monTool, "NPixelHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NPixelHits", **bins )
96 defineHisto( monTool, "NPixelHoles"+stub, namespace=dir, path=mpath, type="TProfile", title="NPixelHoles", **bins )
97 defineHisto( monTool, "NPixelSharedHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NPixelSharedHits", **bins )
98
99 defineHisto( monTool, "NSCTHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NSCTHits", **bins )
100 defineHisto( monTool, "NSCTHoles"+stub, namespace=dir, path=mpath, type="TProfile", title="NSCTHoles", **bins )
101 defineHisto( monTool, "NSCTSharedHits"+stub, namespace=dir, path=mpath, type="TProfile", title="NSCTSharedHits", **bins )
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118 return monTool
119