10 def plot(fileName,sl,option="HISTOP",draw=True):
13 slStr =
"SL%d" % slType
16 ROOT.TH1.AddDirectory(
False)
18 file = ROOT.TFile(fileName,
'read')
20 wheels = (-2,-1,0,1,2)
25 histoName =
'Wheel%d_%s_VDrift' % (wh,slStr)
26 print(
"Accessing",histoName)
27 histosWheel[wh] = file.Get(histoName)
32 if slType == 2: nBins = 180
33 histo = ROOT.TH1F(
"h_VDriftAll",
"VDrift",nBins,0,nBins)
36 if st == 4: nSectors = 14
37 if st == 4
and slType == 2:
continue 38 if verbose:
print(
"Station",st)
40 if verbose:
print(
"Wheel",wh)
41 for sec
in range(1,nSectors+1):
42 if verbose:
print(
"Sector",sec)
44 if verbose:
print(
"Bin from histos:",binHisto)
45 value = histosWheel[wh].GetBinContent(binHisto)
49 binHistoNew = (st - 1)*60 + (wh + 2)*nSectors + sec
50 if verbose:
print(
"Bin final",binHistoNew)
51 histo.SetBinContent(binHistoNew,value)
54 label =
"Wheel %d" % wh
55 if wh == -2: label +=
" MB%d" % st
56 histo.GetXaxis().SetBinLabel(binHistoNew,label)
59 title=
"v_{drift} (#mum/ns)",
60 ymin=53,ymax=57,option=option,draw=draw)
def plot(fileName, sl, option="HISTOP", draw=True)
def binNumber(station, sector)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def drawHisto(histo, title, ymin, ymax, option="HISTOP", draw=True)