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]
20 runNum=filename_offline[19:25]
22 dir=
"DQMData/Run " + runNum +
"/PixelPhase1/Run summary/Pahse1_MechanicalView/" 25 dirBPix=dir +
"PXBarrel/" 26 dirFPix=dir +
"PXForward/" 28 hnameB=
"digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" 30 minlad=[-6,-14,-22,-32]
36 DQMfile=TFile(inputFile)
42 RocMap=DQMfile.FindObjectAny(hname)
44 for j
in range(1,RocMap.GetNbinsY()+1):
46 lad=minlad[l-1] +
int(j-1)/2
49 for i
in range(1,RocMap.GetNbinsX()+1):
53 bin=RocMap.GetBin(i,j)
54 digi=RocMap.GetBinContent(bin)
56 if (digi!=0):
continue 60 if (lad==0
or mod==0):
continue 62 if (lad < 0
and mod < 0) :
67 if (j%2==1): roc=(i-1)%8
68 if (j%2==0): roc= 15-(i-1)%8
71 if (j%2 ==0): roc=(i-1)%8
72 if (j%2 ==1): roc= 15-(i-1)%8
74 if (lad > 0
and mod < 0):
79 if (j%2 ==0): roc=(i-1)%8
80 if (j%2 ==1): roc= 15-(i-1)%8
83 if (j%2 ==1): roc=(i-1)%8
84 if (j%2 ==0): roc= 15-(i-1)%8
86 if (lad > 0
and mod > 0):
91 if (j%2 ==1): roc=7-(i-1)%8
92 if (j%2 ==0): roc=8+(i-1)%8
95 if (j%2 ==0): roc=7-(i-1)%8
96 if (j%2 ==1): roc=8+(i-1)%8
98 if (lad < 0
and mod > 0):
102 if (j%2 ==0): roc=7-(i-1)%8
103 if (j%2 ==1): roc=8+(i-1)%8
106 if (j%2 ==1): roc=7-(i-1)%8
107 if (j%2 ==0): roc=8+(i-1)%8
109 f1=open(
getFileInPath(
'DQM/SiStripMonitorClient/data/detids.dat'))
111 Mod_check =
"LYR"+
str(l) +
"_LDR" +
str(
abs(lad)) +
"F_MOD" +
str(
abs(mod))
112 shell_check =
"BPix_" +
str(shell)
115 refName=line.split(
" ")[1]
117 shell_ref =
str(refName[:8]).
strip()
118 module_ref =
str(refName[14:]).
strip()
120 if (Mod_check == module_ref)
and (shell_check == shell_ref):
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")):
130 BPix_Name = ModuleName_BPIX +
str(roc)
131 BPIXCounter_v0.append(BPix_Name)
132 BPIXCounter =
list(set(BPIXCounter_v0))
140 hnameF=
"digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" 145 DQMfile=TFile(inputFile)
146 for r
in range (1,3):
148 hname=hnameF +
str(r)
149 RocMap=DQMfile.FindObjectAny(hname)
151 for j
in range(1,RocMap.GetNbinsY()+1):
153 bld=minbld[r-1] +
int(j-1)/4
156 for i
in range(1,RocMap.GetNbinsX()+1):
160 bin=RocMap.GetBin(i,j)
161 digi=RocMap.GetBinContent(bin)
163 if (digi!=0):
continue 167 if (bld==0
or disk==0):
continue 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
174 if (disk < 0
and bld <0):
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
181 if (disk < 0
and bld >0):
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
188 if (disk > 0
and bld >0):
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
195 if (disk > 0
and bld <0):
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;
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)
211 MaskedROC_DuringRun =
list(set(deadROCList_online) - set(deadROCList_offline))
212 print 'Number of New Dead ROC: '+
str(len(MaskedROC_DuringRun))
214 outFileName =
'DeadROC_Diff.txt' 215 outFileName_online =
'DeadROC_online.txt' 216 outFileName_offline =
'DeadROC_offline.txt' 217 f = open(outFileName,
"w")
218 f1 = open(outFileName_online,
"w")
219 f2 = open(outFileName_offline,
"w")
221 for i
in range(len(MaskedROC_DuringRun)):
223 f.write(MaskedROC_DuringRun[i]+
"\n")
226 for i
in range(len(deadROCList_online)):
228 f1.write(deadROCList_online[i]+
"\n")
231 for i
in range(len(deadROCList_offline)):
233 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