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)