6 element = inputs[0][0][
'element']
7 name =
'hOccupancy' + element
8 if element ==
'C': title =
'Chip'
9 if element ==
'S': title =
'Straw'
10 rh = ROOT.TH1F(name, title +
' Occupancy Distribution', 201, 0, 1.005)
11 rh.GetXaxis().SetTitle(
'Occupancy')
12 rh.GetYaxis().SetTitle(
'Number of ' + title +
's')
13 plots = [_[1][0]
for _
in inputs]
15 nBins = plot.GetNbinsX()
16 for j
in range(nBins):
17 rh.Fill(plot.GetBinContent(j + 1))
22 hist = inputs[1][0][
'histogram'][9:]
23 element = inputs[1][0][
'element']
26 titleElement =
'Straws'
29 titleElement =
'Chips'
30 if hist ==
'hHitHWonTMap': title =
'HL Hit(In time Window) on Track: '
31 if hist ==
'hHitWonTMap': title =
'Leading Edge on Track in Time Window: '
32 if hist ==
'hHitAonTMap': title =
'Any LL Bit on Track: '
33 if hist ==
'hHitAWonTMap': title =
'Any LL Bit on Track in Time Window: '
34 if hist ==
'hHitHonTMap': title =
'HL Hit on Track: '
35 rh = ROOT.TH1F(name, title + titleElement, 1, 0, 1)
36 rh.GetXaxis().SetTitle(titleElement[:-1] +
' Number in Stack')
37 rh.GetYaxis().SetTitle(
'Probability')
38 for i
in range(len(inputs[0][1])):
39 plots = [_[1][i]
for _
in inputs]
43 plot1 = plots[2*m + 1]
44 nBins = plots[0].GetNbinsX()
45 rh.SetBins(nBins, 0, nBins)
46 for j
in range(nBins):
47 if plot0.GetBinEntries(j + 1) > 0:
48 rh.SetBinContent(j + 1, plot1.GetBinContent(j + 1)*1./plot0.GetBinEntries(j + 1))
50 rh.SetBinContent(j + 1, 0)
56 hist = inputs[0][0][
'histogram']
57 element = inputs[0][0][
'element']
60 titleElement =
'Straws'
63 titleElement =
'Chips'
64 if hist ==
'hHitHWonTMap': title =
'HL Hit(In time Window) on Track: '
65 if hist ==
'hHitWonTMap': title =
'Leading Edge on Track in Time Window: '
66 if hist ==
'hHitAonTMap': title =
'Any LL Bit on Track: '
67 if hist ==
'hHitAWonTMap': title =
'Any LL Bit on Track in Time Window: '
68 if hist ==
'hHitHonTMap': title =
'HL Hit on Track: '
69 rh = ROOT.TProfile(name, title + titleElement, 1, 0, 1)
70 rh.GetXaxis().SetTitle(titleElement[:-1] +
' Number in Stack')
71 rh.GetYaxis().SetTitle(
'Probability')
73 plot0 = inputs[0][1][1]
74 plot1 = inputs[0][1][0]
75 nBins = plot1.GetNbinsX()
76 rh.SetBins(nBins, 0, nBins)
77 for j
in range(1,nBins+2):
78 if plot0.GetBinEntries(j) > 0:
79 rh.Fill(j, plot1.GetBinContent(j)*1./plot0.GetBinEntries(j))
86 element = inputs[0][0][
'element']
89 titleElement =
'Straws'
92 titleElement =
'Chips'
93 rh = ROOT.TH1F(
'hHitonTrackVsAll' + name,
'(Hit on Track) / (Any LL Bit): ' + titleElement, 1, 0, 1)
94 rh.GetXaxis().SetTitle(titleElement[:-1] +
' Number in Stack')
95 rh.GetYaxis().SetTitle(
'Ratio')
96 for i
in range(len(inputs[0][1])):
97 plots = [_[1][i]
for _
in inputs]
101 plot1 = plots[3*m + 1]
102 plot2 = plots[3*m + 2]
103 nBins = plots[0].GetNbinsX()
104 rh.SetBins(nBins, 0, nBins)
105 for j
in range(nBins):
106 if (plot0.GetBinContent(j + 1)*plot1.GetBinContent(j + 1)) > 0:
107 rh.SetBinContent(j + 1, plot2.GetBinContent(j + 1)/(plot0.GetBinContent(j + 1)*plot1.GetBinContent(j + 1)))
109 rh.SetBinContent(j + 1, 0)
114 region = inputs[0][0][
'region']
115 side = inputs[0][0][
'side']
116 if region ==
'Barrel':
117 name =
'hEfficiencyBarrel' +
str(side)
118 if region ==
'Endcap':
119 name =
'hEfficiencyEndCap' +
str(side)
120 rh = ROOT.TH1F(name,
'Straw Efficiency (' + name[11:] +
')', 500, -0.01, 1.01)
121 rh.GetXaxis().SetTitle(
'Efficiency')
122 rh.GetYaxis().SetTitle(
'Number of Straws')
123 for i
in range(len(inputs[0][1])):
124 plots = [_[1][i]
for _
in inputs]
126 for nStraw
in range(plot.GetXaxis().GetNbins()):
127 rh.Fill(plot.GetBinContent(nStraw + 1))
132 region = inputs[0][0][
'region']
133 side = inputs[0][0][
'side']
134 if region ==
'Barrel':
135 name =
'hEfficiencyBarrel' +
str(side)
136 if region ==
'Endcap':
137 name =
'hEfficiencyEndCap' +
str(side)
138 rh = ROOT.TH1F(name,
'Straw Efficiency (' + name[11:] +
')', 500, -0.01, 1.01)
139 rh.GetXaxis().SetTitle(
'Efficiency')
140 rh.GetYaxis().SetTitle(
'Fraction of Straws')
141 for i
in range(len(inputs[0][1])):
142 plots = [_[1][i]
for _
in inputs]
144 for nStraw
in range(plot.GetXaxis().GetNbins()):
145 rh.Fill(plot.GetBinContent(nStraw + 1))
147 entries = rh.GetEntries()
148 for nStraw
in range(rh.GetXaxis().GetNbins()):
149 totalEntries += rh.GetBinContent(nStraw + 1)
150 rh.SetBinContent(nStraw + 1, totalEntries/
float(entries))