9 def plot(fileName,sl,option="HISTOP",draw=True):
12 slStr =
"SL%d" % slType
15 ROOT.TH1.AddDirectory(
False)
17 file = ROOT.TFile(fileName,
'read')
19 wheels = (-2,-1,0,1,2)
24 histoName =
'Wheel%d_%s_VDrift' % (wh,slStr)
25 print "Accessing",histoName
26 histosWheel[wh] = file.Get(histoName)
31 if slType == 2: nBins = 180
32 histo = ROOT.TH1F(
"h_VDriftAll",
"VDrift",nBins,0,nBins)
35 if st == 4: nSectors = 14
36 if st == 4
and slType == 2:
continue
37 if verbose:
print "Station",st
39 if verbose:
print "Wheel",wh
40 for sec
in range(1,nSectors+1):
41 if verbose:
print "Sector",sec
43 if verbose:
print "Bin from histos:",binHisto
44 value = histosWheel[wh].GetBinContent(binHisto)
48 binHistoNew = (st - 1)*60 + (wh + 2)*nSectors + sec
49 if verbose:
print "Bin final",binHistoNew
50 histo.SetBinContent(binHistoNew,value)
53 label =
"Wheel %d" % wh
54 if wh == -2: label +=
" MB%d" % st
55 histo.GetXaxis().SetBinLabel(binHistoNew,label)
58 title=
"v_{drift} (#mum/ns)",
59 ymin=53,ymax=57,option=option,draw=draw)