CMS 3D CMS Logo

Functions | Variables
DeadROCCounter Namespace Reference

Functions

def GetNonZeroOccNumber (histoname)
 
def getRunNumber (filename)
 

Variables

 bpixtot
 
 clusstr
 
 nclust
 
 nent
 
 nrocs
 
 out_file
 
 tmpstr
 

Function Documentation

◆ GetNonZeroOccNumber()

def DeadROCCounter.GetNonZeroOccNumber (   histoname)

Definition at line 13 of file DeadROCCounter.py.

13 def GetNonZeroOccNumber(histoname):
14  global nrocs
15  global fin
16  nrocs=0
17  histo=fin.Get(histoname)
18  if not histo:
19  print("null histo")
20  return
21  nx=histo.GetNbinsX()
22  ny=histo.GetNbinsY()
23  for i in range(1,nx+1):
24  for j in range(1,ny+1):
25  value=histo.GetBinContent(i,j)
26  if value>0:
27  nrocs += 1
28 
29 nrocs=0
30 fname=sys.argv[1]
31 
32 runNumber="0"
33 getRunNumber(fname)
34 
35 path="DQMData/Run " + runNumber +"/Pixel/Run summary/Clusters/OnTrack/"
36 
37 labels=["BPix L1: ", "BPix L2: ", "BPix L3: ", "FPix tot: "]
38 
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"]
40 
41 TotROCs=[2560-256,4096-256,5632-256,4320] #total number of ROCs in the Pixel detector layers and the FPix, the factor 256 for BPix Layer derive by half modules, left there as a reminder
42 
43 DeadROCs=[0,0,0,0]
44 
45 fin= TFile(fname)
46 
47 #print type(fname)
48 
49 outname="PixZeroOccROCs_run" + runNumber + ".txt"

References getRunNumber(), edm.print(), and FastTimerService_cff.range.

◆ getRunNumber()

def DeadROCCounter.getRunNumber (   filename)

Variable Documentation

◆ bpixtot

DeadROCCounter.bpixtot

Definition at line 53 of file DeadROCCounter.py.

◆ clusstr

DeadROCCounter.clusstr

Definition at line 65 of file DeadROCCounter.py.

◆ nclust

DeadROCCounter.nclust

◆ nent

DeadROCCounter.nent

◆ nrocs

DeadROCCounter.nrocs

◆ out_file

DeadROCCounter.out_file

◆ tmpstr

DeadROCCounter.tmpstr

Definition at line 60 of file DeadROCCounter.py.

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
DeadROCCounter.getRunNumber
def getRunNumber(filename)
Definition: DeadROCCounter.py:7
DeadROCCounter.GetNonZeroOccNumber
def GetNonZeroOccNumber(histoname)
Definition: DeadROCCounter.py:13
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66