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 35 of file DeadROC_duringRun.py.

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

Referenced by FPIX_list().

35 def BPIX_list(inputFile):
36  DQMfile=TFile(inputFile)
37  BPIXCounter = []
38  BPIXCounter_v0 = []
39  for l in range(1,5):
40  hname=hnameB + str(l)
41 
42  RocMap=DQMfile.FindObjectAny(hname)
43 
44  for j in range(1,RocMap.GetNbinsY()+1):
45 
46  lad=minlad[l-1] + int(j-1)/2
47  alad=abs(lad)
48 
49  for i in range(1,RocMap.GetNbinsX()+1):
50 
51  roc=0
52 
53  bin=RocMap.GetBin(i,j)
54  digi=RocMap.GetBinContent(bin)
55 
56  if (digi!=0): continue
57 
58  mod=-4 + int((i-1)/8)
59 
60  if (lad==0 or mod==0): continue
61 
62  if (lad < 0 and mod < 0) :
63 
64  shell="BmO"
65 
66  if (alad%2==1):
67  if (j%2==1): roc=(i-1)%8
68  if (j%2==0): roc= 15-(i-1)%8
69 
70  elif (alad%2==0):
71  if (j%2 ==0): roc=(i-1)%8
72  if (j%2 ==1): roc= 15-(i-1)%8
73 
74  if (lad > 0 and mod < 0):
75 
76  shell= "BmI";
77 
78  if (lad%2==1):
79  if (j%2 ==0): roc=(i-1)%8
80  if (j%2 ==1): roc= 15-(i-1)%8
81 
82  if (lad%2==0):
83  if (j%2 ==1): roc=(i-1)%8
84  if (j%2 ==0): roc= 15-(i-1)%8
85 
86  if (lad > 0 and mod > 0):
87 
88  shell= "BpI"
89 
90  if (lad%2==1):
91  if (j%2 ==1): roc=7-(i-1)%8
92  if (j%2 ==0): roc=8+(i-1)%8
93 
94  if (lad%2==0):
95  if (j%2 ==0): roc=7-(i-1)%8
96  if (j%2 ==1): roc=8+(i-1)%8
97 
98  if (lad < 0 and mod > 0):
99  shell= "BpO"
100 
101  if (alad%2==1):
102  if (j%2 ==0): roc=7-(i-1)%8
103  if (j%2 ==1): roc=8+(i-1)%8
104 
105  if (alad%2==0):
106  if (j%2 ==1): roc=7-(i-1)%8
107  if (j%2 ==0): roc=8+(i-1)%8
108 
109  f1=open(getFileInPath('DQM/SiStripMonitorClient/data/detids.dat'))
110  modwritten=False
111  Mod_check = "LYR"+str(l) + "_LDR" + str(abs(lad)) + "F_MOD" +str(abs(mod))
112  shell_check = "BPix_" + str(shell)
113 
114  for line in f1:
115  refName=line.split(" ")[1]
116  if modwritten: break
117  shell_ref = str(refName[:8]).strip()
118  module_ref = str(refName[14:]).strip()
119 
120  if (Mod_check == module_ref) and (shell_check == shell_ref):
121 
122  ModuleName_BPIX = refName.strip()+"_ROC "
123  BmLYR1_check = ModuleName_BPIX.split('_')
124  if ((BmLYR1_check[1] == "BmI" or BmLYR1_check[1] == "BmO") and (BmLYR1_check[3] == "LYR1")):
125  if int(roc) <= 7:
126  roc = str(int(roc)+8)
127  elif int(roc) >= 8:
128  roc =str(int(roc)-8)
129 
130  BPix_Name = ModuleName_BPIX + str(roc)
131  BPIXCounter_v0.append(BPix_Name)
132  BPIXCounter = list(set(BPIXCounter_v0))
133  modwritten=True
134  return BPIXCounter
135 
136 #End of Barrel
137 
138 #Doing FPix
139 
140 hnameF="digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_"
141 minbld=[-11,-17]
142 
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 143 of file DeadROC_duringRun.py.

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

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

References split.

Referenced by BPIX_list().

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