CMS 3D CMS Logo

Functions
DeadROC_duringRun Namespace Reference

Functions

def BPIX_list (inputFile)
 
def FPIX_list (inputFile)
 
def getFileInPath (rfile)
 

Function Documentation

def DeadROC_duringRun.BPIX_list (   inputFile)

Definition at line 36 of file DeadROC_duringRun.py.

References funct.abs(), getFileInPath(), createfilelist.int, list(), str, and digitizers_cfi.strip.

Referenced by FPIX_list().

36 def BPIX_list(inputFile):
37  DQMfile=TFile(inputFile)
38  BPIXCounter = []
39  BPIXCounter_v0 = []
40  for l in range(1,5):
41  hname=hnameB + str(l)
42 
43  RocMap=DQMfile.FindObjectAny(hname)
44 
45  for j in range(1,RocMap.GetNbinsY()+1):
46 
47  lad=minlad[l-1] + int(j-1)/2
48  alad=abs(lad)
49 
50  for i in range(1,RocMap.GetNbinsX()+1):
51 
52  roc=0
53 
54  bin=RocMap.GetBin(i,j)
55  digi=RocMap.GetBinContent(bin)
56 
57  if (digi!=0): continue
58 
59  mod=-4 + int((i-1)/8)
60 
61  if (lad==0 or mod==0): continue
62 
63  if (lad < 0 and mod < 0) :
64 
65  shell="BmO"
66 
67  if (alad%2==1):
68  if (j%2==1): roc=(i-1)%8
69  if (j%2==0): roc= 15-(i-1)%8
70 
71  elif (alad%2==0):
72  if (j%2 ==0): roc=(i-1)%8
73  if (j%2 ==1): roc= 15-(i-1)%8
74 
75  if (lad > 0 and mod < 0):
76 
77  shell= "BmI";
78 
79  if (lad%2==1):
80  if (j%2 ==0): roc=(i-1)%8
81  if (j%2 ==1): roc= 15-(i-1)%8
82 
83  if (lad%2==0):
84  if (j%2 ==1): roc=(i-1)%8
85  if (j%2 ==0): roc= 15-(i-1)%8
86 
87  if (lad > 0 and mod > 0):
88 
89  shell= "BpI"
90 
91  if (lad%2==1):
92  if (j%2 ==1): roc=7-(i-1)%8
93  if (j%2 ==0): roc=8+(i-1)%8
94 
95  if (lad%2==0):
96  if (j%2 ==0): roc=7-(i-1)%8
97  if (j%2 ==1): roc=8+(i-1)%8
98 
99  if (lad < 0 and mod > 0):
100  shell= "BpO"
101 
102  if (alad%2==1):
103  if (j%2 ==0): roc=7-(i-1)%8
104  if (j%2 ==1): roc=8+(i-1)%8
105 
106  if (alad%2==0):
107  if (j%2 ==1): roc=7-(i-1)%8
108  if (j%2 ==0): roc=8+(i-1)%8
109 
110  f1=open(getFileInPath('DQM/SiStripMonitorClient/data/detids.dat'))
111  modwritten=False
112  Mod_check = "LYR"+str(l) + "_LDR" + str(abs(lad)) + "F_MOD" +str(abs(mod))
113  shell_check = "BPix_" + str(shell)
114 
115  for line in f1:
116  refName=line.split(" ")[1]
117  if modwritten: break
118  shell_ref = str(refName[:8]).strip()
119  module_ref = str(refName[14:]).strip()
120 
121  if (Mod_check == module_ref) and (shell_check == shell_ref):
122 
123  ModuleName_BPIX = refName.strip()+"_ROC "
124  BmLYR1_check = ModuleName_BPIX.split('_')
125  if ((BmLYR1_check[1] == "BmI" or BmLYR1_check[1] == "BmO") and (BmLYR1_check[3] == "LYR1")):
126  if int(roc) <= 7:
127  roc = str(int(roc)+8)
128  elif int(roc) >= 8:
129  roc =str(int(roc)-8)
130 
131  BPix_Name = ModuleName_BPIX + str(roc)
132  BPIXCounter_v0.append(BPix_Name)
133  BPIXCounter = list(set(BPIXCounter_v0))
134  modwritten=True
135  return BPIXCounter
136 
137 #End of Barrel
138 
139 #Doing FPix
140 
141 hnameF="digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_"
142 minbld=[-11,-17]
143 
def BPIX_list(inputFile)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def getFileInPath(rfile)
#define str(s)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def DeadROC_duringRun.FPIX_list (   inputFile)

Definition at line 144 of file DeadROC_duringRun.py.

References funct.abs(), BPIX_list(), createfilelist.int, list(), edm.print(), and str.

144 def FPIX_list(inputFile):
145  FPIXCounter = []
146  DQMfile=TFile(inputFile)
147  for r in range (1,3):
148 
149  hname=hnameF + str(r)
150  RocMap=DQMfile.FindObjectAny(hname)
151 
152  for j in range(1,RocMap.GetNbinsY()+1):
153 
154  bld=minbld[r-1] + int(j-1)/4
155  abld=abs(bld)
156 
157  for i in range(1,RocMap.GetNbinsX()+1):
158 
159  roc=0
160 
161  bin=RocMap.GetBin(i,j)
162  digi=RocMap.GetBinContent(bin)
163 
164  if (digi!=0): continue
165 
166  disk=-3 + int(i-1)/8
167 
168  if (bld==0 or disk==0): continue
169 
170  pnl=0
171 
172  if ((j-1)%4==0 or (j-1)%4==1): pnl=2
173  if ((j-1)%4==2 or (j-1)%4==3): pnl=1
174 
175  if (disk < 0 and bld <0):
176 
177  shell= "BmO"
178 
179  if ((j-1)%4==0 or (j-1)%4==3): roc= 15-(i-1)%8
180  if ((j-1)%4==1 or (j-1)%4==2): roc= (i-1)%8
181 
182  if (disk < 0 and bld >0):
183 
184  shell= "BmI";
185 
186  if ((j-1)%4==0 or (j-1)%4==3): roc= 15-(i-1)%8
187  if ((j-1)%4==1 or (j-1)%4==2): roc= (i-1)%8
188 
189  if (disk > 0 and bld >0):
190 
191  shell= "BpI"
192 
193  if ((j-1)%4==0 or (j-1)%4==3): roc=7-(i-1)%8
194  if ((j-1)%4==1 or (j-1)%4==2): roc=8+(i-1)%8
195 
196  if (disk > 0 and bld <0):
197 
198  shell= "BpO"
199 
200  if ((j-1)%4==0 or (j-1)%4==3): roc=7-(i-1)%8;
201  if ((j-1)%4==1 or (j-1)%4==2): roc=8+(i-1)%8;
202 
203 
204  FPix_Name = "FPix_" + str(shell) + "_D" + str(abs(disk)) + '_BLD'+ str(abs(bld)) + '_PNL' + str(abs(pnl)) + '_RNG'+ str(abs(r)) + "_ROC " + str(roc) +""
205  FPIXCounter.append(FPix_Name)
206  return FPIXCounter
207 
208 
def FPIX_list(inputFile)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define str(s)
def DeadROC_duringRun.getFileInPath (   rfile)

Definition at line 9 of file DeadROC_duringRun.py.

References split.

Referenced by BPIX_list().

9 def getFileInPath(rfile):
10  import os
11  for dir in os.environ['CMSSW_SEARCH_PATH'].split(":"):
12  if os.path.exists(os.path.join(dir,rfile)): return os.path.join(dir,rfile)
13  return None
14 
15 
def getFileInPath(rfile)
double split
Definition: MVATrainer.cc:139