43 def __init__(self, fname='output.root'):
45 call constructor of base class, required.
48 super(DQM, self).__init__()
55 self.histADC = [self.f.Get(
'h' + str(100000 + i))
56 for i
in range(14336)]
58 self.histTDC = [self.f.Get(
'h' + str(200000 + i))
59 for i
in range(14336)]
61 self.histHit = [self.f.Get(
'h' + str(400000 + i))
65 for h
in self.histTDC:
67 line = TLine(refT0, 0, refT0, y)
69 self.lines.append(line)
73 for h
in self.histADC:
75 line = TLine(refMPV, 0, refMPV, y)
77 self.lineMPVs.append(line)
82 self.sig = TF1(
"sig",
"landau", 0, 200)
86 self.ft0 = TF1(
"ft0",
"[0]+[1]*(exp([2]*([3]-x))/(1+exp(-([4]-x)/[5])))", 2000, 4000)
87 self.ft0.SetParameters(0, 10, 0, 0, 3800, 3.)
88 self.ft0.FixParameter(0, 0.)
90 self.m_fitStatus =
False
92 self.canvas = TCanvas(
"canvas",
"canvas", 800, 800)
98 self.par = [-1.0
for i
in range(14336)]
100 self.parADCinLayer = [-1.0
for i
in range(56)]
102 self.parT0 = [0.0
for i
in range(14336)]
104 self.h2 = TH2D(
"h2d",
"MPV of all ADCs", 15000,
105 -500, 14500, 100, 0, 200)
109 self.h2.GetXaxis().SetTitle(
'Cell ID')
111 self.h2.GetYaxis().SetTitle(
'MPV')
113 self.h2ADCvsLayer = TH2D(
"h2dl",
"MPV for every Layer", 56,
116 self.h2ADCvsLayer.SetStats(0)
118 self.h2ADCvsLayer.GetXaxis().SetTitle(
'Layer')
120 self.h2ADCvsLayer.GetYaxis().SetTitle(
'MPV (adc count)')
122 self.x = array(
"d", [i
for i
in range(14336)])
124 self.l = array(
"d", [i
for i
in range(56)])
126 self.graph = TGraph(len(self.x))
128 self.graph.SetMarkerStyle(kFullCircle)
130 self.graph.SetMarkerSize(0.3)
133 self.graph2 = TGraph(len(self.l))
135 self.graph2.SetMarkerStyle(kFullCircle)
137 self.graph2.SetMarkerSize(1.0)
139 self.line = [TLine(0, 0, 0, 200)]
143 x0 = x0 + nWiresSL[i]
144 line = TLine(x0, 0, x0, 200)
145 self.line.append(line)
147 l.SetLineColorAlpha(8, 0.5)