2 from __future__
import print_function
3 from ROOT
import TFile, gStyle,gPad ,TObject, TCanvas, TH1, TH1F, TH2F, TLegend, TPaletteAxis, TList, TLine, TAttLine, TF1,TAxis
9 pos=filename.find(
"__")
10 runNumber=filename[pos-6:pos]
17 histo=fin.Get(histoname)
23 for i
in range(1,nx+1):
24 for j
in range(1,ny+1):
25 value=histo.GetBinContent(i,j)
35 path=
"DQMData/Run " + runNumber +
"/Pixel/Run summary/Clusters/OnTrack/" 37 labels=[
"BPix L1: ",
"BPix L2: ",
"BPix L3: ",
"FPix tot: "]
39 histonames=[path +
"pix_bar Occ_roc_ontracksiPixelDigis_layer_1",path +
"pix_bar Occ_roc_ontracksiPixelDigis_layer_2",path +
"pix_bar Occ_roc_ontracksiPixelDigis_layer_3",path +
"ROC_endcap_occupancy"]
41 TotROCs=[2560-256,4096-256,5632-256,4320]
49 outname=
"PixZeroOccROCs_run" + runNumber +
".txt" 50 out_file = open(outname,
"w")
52 out_file.write(
"Pixel Zero Occupancy ROCs \n\n")
57 if k==3: nrocs=nrocs/2
58 DeadROCs[k]=TotROCs[k]-nrocs
59 if k<3: bpixtot+=DeadROCs[k]
60 tmpstr=labels[k] +
str(DeadROCs[k])
61 if k==3: out_file.write(
"\nBPix tot: %i \n" %bpixtot)
62 out_file.write(
"%s \n" % tmpstr)
65 clusstr=path+
"charge_siPixelClusters" 66 nclust=fin.Get(clusstr)
67 nent=nclust.GetEntries()
69 out_file.write(
"\nNumber of clusters= %i \n" % nent)
S & print(S &os, JobReport::InputFile const &f)
def getRunNumber(filename)
def GetNonZeroOccNumber(histoname)