6 from array
import array
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)
15 detIDsFileName =
getFileInPath(
'DQM/SiStripMonitorClient/data/detids.dat')
17 filename_online=sys.argv[1]
18 filename_offline=sys.argv[2]
22 runNum=filename_offline[19:25]
24 dir=
"DQMData/Run " + runNum +
"/PixelPhase1/Run summary/Pahse1_MechanicalView/" 27 dirBPix=dir +
"PXBarrel/" 28 dirFPix=dir +
"PXForward/" 30 hnameB=
"digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" 32 minlad=[-6,-14,-22,-32]
40 DQMfile=TFile(inputFile)
47 RocMap=DQMfile.FindObjectAny(hname)
49 for j
in range(1,RocMap.GetNbinsY()+1):
51 lad=minlad[l-1] +
int(j-1)/2
54 for i
in range(1,RocMap.GetNbinsX()+1):
58 bin=RocMap.GetBin(i,j)
59 digi=RocMap.GetBinContent(bin)
61 if (digi!=0):
continue 65 if (lad==0
or mod==0):
continue 67 if (lad < 0
and mod < 0) :
72 if (j%2==1): roc=(i-1)%8
73 if (j%2==0): roc= 15-(i-1)%8
76 if (j%2 ==0): roc=(i-1)%8
77 if (j%2 ==1): roc= 15-(i-1)%8
79 if (lad > 0
and mod < 0):
84 if (j%2 ==0): roc=(i-1)%8
85 if (j%2 ==1): roc= 15-(i-1)%8
88 if (j%2 ==1): roc=(i-1)%8
89 if (j%2 ==0): roc= 15-(i-1)%8
91 if (lad > 0
and mod > 0):
96 if (j%2 ==1): roc=7-(i-1)%8
97 if (j%2 ==0): roc=8+(i-1)%8
100 if (j%2 ==0): roc=7-(i-1)%8
101 if (j%2 ==1): roc=8+(i-1)%8
103 if (lad < 0
and mod > 0):
108 if (j%2 ==0): roc=7-(i-1)%8
109 if (j%2 ==1): roc=8+(i-1)%8
112 if (j%2 ==1): roc=7-(i-1)%8
113 if (j%2 ==0): roc=8+(i-1)%8
115 f1=open(
getFileInPath(
'DQM/SiStripMonitorClient/data/detids.dat'))
119 refName.append(line.split(
" ")[1])
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(
'_')
130 if BmLYR1_check[1] ==
'BmI' or BmLYR1_check[1] ==
'BmO' and BmLYR1_check[3] ==
'LYR1':
137 BPix_Name = ModuleName_BPIX +
str(roc)
139 BPIXCounter_v0.append(BPix_Name)
140 BPIXCounter =
list(set(BPIXCounter_v0))
150 hnameF=
"digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" 156 DQMfile=TFile(inputFile)
157 for r
in range (1,3):
159 hname=hnameF +
str(r)
160 RocMap=DQMfile.FindObjectAny(hname)
162 for j
in range(1,RocMap.GetNbinsY()+1):
164 bld=minbld[r-1] +
int(j-1)/4
167 for i
in range(1,RocMap.GetNbinsX()+1):
171 bin=RocMap.GetBin(i,j)
172 digi=RocMap.GetBinContent(bin)
174 if (digi!=0):
continue 178 if (bld==0
or disk==0):
continue 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
185 if (disk < 0
and bld <0):
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
192 if (disk < 0
and bld >0):
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
199 if (disk > 0
and bld >0):
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
206 if (disk > 0
and bld <0):
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;
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)
222 MaskedROC_DuringRun =
list(set(deadROCList_online) - set(deadROCList_offline))
223 print 'Number of New Dead ROC: '+
str(len(MaskedROC_DuringRun))
225 outFileName =
'DeadROC_Diff.txt' 226 outFileName_online =
'DeadROC_online.txt' 227 outFileName_offline =
'DeadROC_offline.txt' 228 f = open(outFileName,
"w")
229 f1 = open(outFileName_online,
"w")
230 f2 = open(outFileName_offline,
"w")
232 for i
in range(len(MaskedROC_DuringRun)):
234 f.write(MaskedROC_DuringRun[i]+
"\n")
237 for i
in range(len(deadROCList_online)):
239 f1.write(deadROCList_online[i]+
"\n")
242 for i
in range(len(deadROCList_offline)):
244 f2.write(deadROCList_offline[i]+
"\n")
Abs< T >::type abs(const T &t)
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