CMS 3D CMS Logo

Functions | Variables
DeadROCCounter_Phase1 Namespace Reference

Functions

def countBadROCBarrel (fin, layerNo, os)
 barrel######################################################## More...
 
def countBadROCForward (fin, ringNo, os)
 endacp######################################### More...
 
def getRunNumber (filename)
 

Variables

 bpix_tot_deadROC
 
 bpix_tot_ineffROC
 
 bpix_tot_Nrocspopulated
 
 bpix_tot_totalentries
 
 commonPath
 
 file
 
 fin
 
 fname
 main####################################### More...
 
 fpix_tot_deadROC
 
 fpix_tot_ineffROC
 
 fpix_tot_Nrocspopulated
 
 fpix_tot_totalentries
 
 hnpixclus_bpix
 
 hnpixclus_fpix
 
 out_file
 
 outname
 

Function Documentation

◆ countBadROCBarrel()

def DeadROCCounter_Phase1.countBadROCBarrel (   fin,
  layerNo,
  os 
)

barrel########################################################

Definition at line 14 of file DeadROCCounter_Phase1.py.

14 def countBadROCBarrel(fin, layerNo, os):
15  global bpix_tot_deadROC
16  global bpix_tot_ineffROC
17  global bpix_tot_Nrocspopulated
18  global bpix_tot_totalentries
19 
20  barrelPath = commonPath + "PXBarrel/";
21  histoname = ["digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_1", "digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_2",
22  "digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_3", "digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_4"]
23  digi2D = fin.Get(barrelPath + histoname[layerNo-1])
24  #return status flag is histogram is empty!
25  if digi2D.GetEntries() == 0 :
26  return 1;
27  Nrocspopulated = 0
28  totalEntries = 0
29  NexpectedROC = [1536, 3584, 5632, 8192]
30  nLadders_bpx = [6, 14, 22, 32]
31  nx = digi2D.GetNbinsX()
32  ny = digi2D.GetNbinsY()
33  for xbin in range(1,nx+1):
34  if xbin >= 33 and xbin <= 40: continue;#region of cross on x-axis
35  for ybin in range(1,ny+1):
36  if (ybin == 2*nLadders_bpx[layerNo-1] + 1) or (ybin == 2*nLadders_bpx[layerNo-1] + 2): continue;#region of cross on y-axis
37  bentries = digi2D.GetBinContent(xbin,ybin)
38  if(bentries > 0):
39  Nrocspopulated+=1
40  totalEntries += bentries
41  meanEntries = float(totalEntries)/Nrocspopulated
42  NineffROC = 0
43  #Loop to chek inefficient ROC per layer
44  for xbin in range(1,nx+1):
45  if xbin >= 33 and xbin <= 40:
46  continue;#region of cross on x-axis
47  for ybin in range(1,ny+1):
48  if (ybin == 2*nLadders_bpx[layerNo-1] + 1) or (ybin == 2*nLadders_bpx[layerNo-1] + 2): continue;#region of cross on y-axis
49  bentries = digi2D.GetBinContent(xbin,ybin);
50  if(bentries > 0 and bentries < meanEntries/4. ):#Assume < 25% of MEAN = inefficient
51  NineffROC+=1;
52 
53  tmpstr = "BPix L" + str(layerNo)
54  print(tmpstr, '{0:4d} {1:4d} {2:4.1f}'.format(NexpectedROC[layerNo-1] - Nrocspopulated, NineffROC, round(meanEntries,1)), file=os)
55  bpix_tot_deadROC += NexpectedROC[layerNo-1] - Nrocspopulated
56  bpix_tot_ineffROC += NineffROC
57  bpix_tot_Nrocspopulated += Nrocspopulated
58  bpix_tot_totalentries += float(totalEntries)
59  return 0;

References dqmMemoryStats.float, edm.print(), FastTimerService_cff.range, and str.

◆ countBadROCForward()

def DeadROCCounter_Phase1.countBadROCForward (   fin,
  ringNo,
  os 
)

endacp#########################################

Definition at line 61 of file DeadROCCounter_Phase1.py.

61 def countBadROCForward(fin, ringNo, os):
62  global fpix_tot_deadROC
63  global fpix_tot_ineffROC
64  global fpix_tot_Nrocspopulated
65  global fpix_tot_totalentries
66 
67  forwardPath = commonPath + "PXForward/";
68  histoname = ["digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_1",
69 "digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_2"]
70  digi2D = fin.Get(forwardPath + histoname[ringNo-1])
71  #return status flag is histogram is empty!
72  if digi2D.GetEntries() == 0 :
73  return 1;
74  nblades_perRing_fpx = [22, 34]
75  NexpectedROC_perRing = [704, 1088]
76  Nrocspopulated = [0] * 6
77  totalEntries = [0] * 6
78  dcounter = 0
79  nx = digi2D.GetNbinsX()
80  ny = digi2D.GetNbinsY()
81  for xbin in range(1,nx+1):
82  if xbin >= 25 and xbin <= 32: continue;#region of cross on x-axis
83  if xbin > 1 and (xbin-1)%8 == 0: dcounter += 1;
84  for ybin in range(1,ny+1):
85  if (ybin >= 2*nblades_perRing_fpx[ringNo-1] + 1) and (ybin <= 2*nblades_perRing_fpx[ringNo-1] + 4):
86  continue;#region of cross on y-axis
87  bentries = digi2D.GetBinContent(xbin,ybin)
88  if(bentries > 0):
89  Nrocspopulated[dcounter] += 1
90  totalEntries[dcounter] += bentries
91  #Loop to find inefficient modules
92  meanEntries = [6] * 6
93  for d in range(0,6):
94  meanEntries[d] = float(totalEntries[d])/Nrocspopulated[d]
95  NineffROC = [6] * 6
96  #set disc counter to 0 since it is now 5
97  dcounter = 0;
98  for xbin in range(1,nx+1):
99  if xbin >= 25 and xbin <= 32: continue;#region of cross on x-axis
100  if xbin > 1 and (xbin-1)%8 == 0: dcounter += 1
101  for ybin in range(1,ny+1):
102  if (ybin >= 2*nblades_perRing_fpx[ringNo-1] + 1) and (ybin <= 2*nblades_perRing_fpx[ringNo-1] + 4):
103  continue;#region of cross on y-axis
104  bentries = digi2D.GetBinContent(xbin,ybin)
105  if(bentries > 0):#//Assume < 25% of MEAN = inefficient
106  if bentries > 0 and bentries < meanEntries[dcounter]/4.:
107  NineffROC[dcounter] += 1
108 
109  print("#Summary for FPix Ring", ringNo, file=os)
110  for d in range(0,6):
111  disc = 0
112  if d < 3: disc = "M" + str(3 - d)
113  else: disc = "P" + str(d - 2)
114 
115  tmpstr = "FPix R" + str(ringNo) + "D" + str(disc)
116  print('{0:10s} {1:4d} {2:4d} {3:4.1f}'.format(tmpstr, NexpectedROC_perRing[ringNo-1] - Nrocspopulated[d], NineffROC[d], round(meanEntries[d],1)), file=os)
117  fpix_tot_deadROC += NexpectedROC_perRing[ringNo-1] - Nrocspopulated[d]
118  fpix_tot_ineffROC += NineffROC[d]
119  fpix_tot_Nrocspopulated += Nrocspopulated[d]
120  fpix_tot_totalentries += float(totalEntries[d])
121 
122  return 0;

References dqmMemoryStats.float, edm.print(), FastTimerService_cff.range, and str.

◆ getRunNumber()

def DeadROCCounter_Phase1.getRunNumber (   filename)

Definition at line 7 of file DeadROCCounter_Phase1.py.

7 def getRunNumber(filename):
8  global runNumber
9  pos=filename.find("__")
10  runNumber=int(filename[pos-6:pos])
11  #print runNumber
12 

References createfilelist.int.

Variable Documentation

◆ bpix_tot_deadROC

DeadROCCounter_Phase1.bpix_tot_deadROC

Definition at line 128 of file DeadROCCounter_Phase1.py.

◆ bpix_tot_ineffROC

DeadROCCounter_Phase1.bpix_tot_ineffROC

Definition at line 129 of file DeadROCCounter_Phase1.py.

◆ bpix_tot_Nrocspopulated

DeadROCCounter_Phase1.bpix_tot_Nrocspopulated

Definition at line 130 of file DeadROCCounter_Phase1.py.

◆ bpix_tot_totalentries

DeadROCCounter_Phase1.bpix_tot_totalentries

Definition at line 131 of file DeadROCCounter_Phase1.py.

◆ commonPath

DeadROCCounter_Phase1.commonPath

Definition at line 139 of file DeadROCCounter_Phase1.py.

◆ file

DeadROCCounter_Phase1.file

Definition at line 145 of file DeadROCCounter_Phase1.py.

◆ fin

DeadROCCounter_Phase1.fin

Definition at line 126 of file DeadROCCounter_Phase1.py.

◆ fname

DeadROCCounter_Phase1.fname

main#######################################

Definition at line 124 of file DeadROCCounter_Phase1.py.

◆ fpix_tot_deadROC

DeadROCCounter_Phase1.fpix_tot_deadROC

Definition at line 133 of file DeadROCCounter_Phase1.py.

◆ fpix_tot_ineffROC

DeadROCCounter_Phase1.fpix_tot_ineffROC

Definition at line 134 of file DeadROCCounter_Phase1.py.

◆ fpix_tot_Nrocspopulated

DeadROCCounter_Phase1.fpix_tot_Nrocspopulated

Definition at line 135 of file DeadROCCounter_Phase1.py.

◆ fpix_tot_totalentries

DeadROCCounter_Phase1.fpix_tot_totalentries

Definition at line 136 of file DeadROCCounter_Phase1.py.

◆ hnpixclus_bpix

DeadROCCounter_Phase1.hnpixclus_bpix

Definition at line 141 of file DeadROCCounter_Phase1.py.

◆ hnpixclus_fpix

DeadROCCounter_Phase1.hnpixclus_fpix

Definition at line 142 of file DeadROCCounter_Phase1.py.

◆ out_file

DeadROCCounter_Phase1.out_file

Definition at line 144 of file DeadROCCounter_Phase1.py.

◆ outname

DeadROCCounter_Phase1.outname
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
DeadROCCounter_Phase1.countBadROCBarrel
def countBadROCBarrel(fin, layerNo, os)
barrel########################################################
Definition: DeadROCCounter_Phase1.py:14
DeadROCCounter_Phase1.countBadROCForward
def countBadROCForward(fin, ringNo, os)
endacp#########################################
Definition: DeadROCCounter_Phase1.py:61
str
#define str(s)
Definition: TestProcessor.cc:48
createfilelist.int
int
Definition: createfilelist.py:10
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
DeadROCCounter_Phase1.getRunNumber
def getRunNumber(filename)
Definition: DeadROCCounter_Phase1.py:7
format