47 def __init__(self, fname='output.root'):
49 call constructor of base class, required.
52 super(DQM, self).__init__()
59 self.histADC = [self.f.Get(
'h' + str(100000 + i))
60 for i
in range(14336)]
62 self.histTDC = [self.f.Get(
'h' + str(200000 + i))
63 for i
in range(14336)]
65 self.histHit = [self.f.Get(
'h' + str(400000 + i))
69 for h
in self.histTDC:
71 line = TLine(refT0, 0, refT0, y)
73 self.lines.append(line)
77 for h
in self.histADC:
79 line = TLine(refMPV, 0, refMPV, y)
81 self.lineMPVs.append(line)
86 self.sig = TF1(
"sig",
"landau", 0, 200)
90 self.ft0 = TF1(
"ft0",
"[0]+[1]*(exp([2]*([3]-x))/(1+exp(-([4]-x)/[5])))", 2000, 4000)
91 self.ft0.SetParameters(0, 10, 0, 0, 3800, 3.)
92 self.ft0.FixParameter(0, 0.)
94 self.m_fitStatus =
False
96 self.canvas = TCanvas(
"canvas",
"canvas", 800, 800)
102 self.par = [-1.0
for i
in range(14336)]
104 self.parADCinLayer = [-1.0
for i
in range(56)]
106 self.parT0 = [0.0
for i
in range(14336)]
108 self.h2 = TH2D(
"h2d",
"MPV of all ADCs", 15000,
109 -500, 14500, 100, 0, 200)
113 self.h2.GetXaxis().SetTitle(
'Cell ID')
115 self.h2.GetYaxis().SetTitle(
'MPV')
117 self.h2ADCvsLayer = TH2D(
"h2dl",
"MPV for every Layer", 56,
120 self.h2ADCvsLayer.SetStats(0)
122 self.h2ADCvsLayer.GetXaxis().SetTitle(
'Layer')
124 self.h2ADCvsLayer.GetYaxis().SetTitle(
'MPV (adc count)')
126 self.x = array(
"d", [i
for i
in range(14336)])
128 self.l_array = array(
"d", [i
for i
in range(56)])
130 self.graph = TGraph(len(self.x))
132 self.graph.SetMarkerStyle(kFullCircle)
134 self.graph.SetMarkerSize(0.3)
137 self.graph2 = TGraph(len(self.l_array))
139 self.graph2.SetMarkerStyle(kFullCircle)
141 self.graph2.SetMarkerSize(1.0)
143 self.line = [TLine(0, 0, 0, 200)]
147 x0 = x0 + nWiresSL[i]
148 line = TLine(x0, 0, x0, 200)
149 self.line.append(line)
150 for l_i
in self.line:
151 l_i.SetLineColorAlpha(8, 0.5)