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

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

Referenced by FPIX_list().

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

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

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