20 from collections
import OrderedDict
22 from Validation.RecoTrack.plotting.validation
import Sample, Validation
23 from Validation.HGCalValidation.hgcalHtml
import _sampleName,_pageNameMap,_summary,_summobj,_MatBudSections,_geoPageNameMap,_individualmaterials,_matPageNameMap,_individualmatplots,_individualMatPlotsDesc,_hideShowFun,_allmaterialsplots,_allmaterialsPlotsDesc, _fromvertexplots, _fromVertexPlotsDesc
25 from Validation.HGCalValidation.PostProcessorHGCAL_cfi
import tracksterLabels
as trackstersIters
31 usage = (
'usage: %prog [options]\n' 32 +
'%prog -h for help')
33 parser = optparse.OptionParser(usage)
35 parser.add_option(
'',
'--Obj', dest=
'OBJ', type=
'string', default=
None, help=
'Object to run. Options are: Geometry, SimHits, Digis, RecHits, Calibrations, CaloParticles, hgcalLayerClusters')
36 parser.add_option(
'',
'--html-validation-name', dest=
'HTMLVALNAME', type=
'string', default=
'', help=
'Could be either be hgcalLayerClusters or hgcalMultiClusters')
37 parser.add_option(
'-d',
'--download', action=
'store_true', dest=
'DOWNLOAD', default=
False, help=
'Download DQM files from RelVals')
38 parser.add_option(
'-g',
'--gather', dest=
'GATHER', type=
'string', default=
None, help=
'Objects to gather: hitValidation, hitCalibration, hgcalLayerClusters, hgcalMultiClusters, ticlMultiClustersFromTrackstersEM, ticlMultiClustersFromTrackstersHAD')
39 parser.add_option(
'-w',
'--wwwarea', dest=
'WWWAREA', type=
'string', default=
'/eos/project/h/hgcaldpg/www', help=
'Objects to gather: hitValidation, hitCalibration, hgcalLayerClusters, hgcalMultiClusters, ticlMultiClustersFromTrackstersEM, ticlMultiClustersFromTrackstersHAD')
40 parser.add_option(
'-y',
'--dry-run', action=
'store_true', dest=
'DRYRUN', default=
False, help=
'perform a dry run (nothing is lauched).')
41 parser.add_option(
'-i',
'--inputeosarea', dest=
'INPUT', type=
'string', default=
'/eos/cms/store/group/dpg_hgcal/comm_hgcal/apsallid/RelVals', help=
'Eos area where we will place all DQM files of the new and reference release campaign')
42 parser.add_option(
'',
'--geometry', action=
'store_true', dest=
'GEOMETRY', default=
False, help=
'Geometry validation section')
43 parser.add_option(
'',
'--copyhtml', action=
'store_true', dest=
'COPYHTML', default=
False, help=
'If used the main index.html file will be copied to the www area. Useful in case of experimenting to avoid surprises.')
47 (opt, args) = parser.parse_args()
56 status, output = subprocess.getstatusoutput(cmd)
57 if (status !=0
and not quite):
58 print(
'Error in processing command:\n ['+cmd+
']')
59 print(
'Output:\n ['+output+
'] \n')
64 if "_pmx" in NewRelease:
65 if "_pmx" in RefRelease:
66 return {
"default":
"pmx"+t}
67 return {
"default": t, NewRelease:
"pmx"+t}
87 thereleases = OrderedDict()
88 thereleases = {
"CMSSW 12_4_X" : [
89 "CMSSW_12_4_0_pre3_DD4HEP_vs_CMSSW_12_4_0_pre3_DDD",
90 "CMSSW_12_4_0_pre3_vs_CMSSW_12_4_0_pre2",
91 "CMSSW_12_4_0_pre2_vs_CMSSW_12_3_0_pre6" 94 "CMSSW_12_3_1_vs_CMSSW_12_3_0_pre6",
95 "CMSSW_12_3_0_pre6_vs_CMSSW_12_3_0_pre5",
96 "CMSSW_12_3_0_pre5_D88_vs_CMSSW_12_3_0_pre5_D77",
97 "CMSSW_12_3_0_pre5_D77_vs_CMSSW_12_3_0_pre3_D77",
98 "CMSSW_12_3_0_pre4_vs_CMSSW_12_3_0_pre3",
99 "CMSSW_12_3_0_pre3_vs_CMSSW_12_3_0_pre2" 102 "CMSSW_12_2_0_vs_CMSSW_12_2_0_pre3",
103 "CMSSW_12_2_0_pre3_D88_vs_CMSSW_12_2_0_pre3_D77",
104 "CMSSW_12_2_0_pre3_vs_CMSSW_12_2_0_pre2",
105 "CMSSW_12_2_0_pre2_vs_CMSSW_12_1_0_pre5" 108 "CMSSW_12_1_0_pre5_vs_CMSSW_12_1_0_pre4",
109 "CMSSW_12_1_0_pre5_D77_vs_CMSSW_12_1_0_pre4_D76",
110 "CMSSW_12_1_0_pre4_ROOT624_vs_CMSSW_12_1_0_pre4",
111 "CMSSW_12_1_0_pre4_vs_CMSSW_12_1_0_pre3",
112 "CMSSW_12_1_0_pre3_vs_CMSSW_12_1_0_pre2",
113 "CMSSW_12_1_0_pre2_vs_CMSSW_12_0_0_pre6",
114 "CMSSW_12_1_0_pre2_D77_vs_CMSSW_12_1_0_pre2_D76" 117 "CMSSW_12_0_1_vs_CMSSW_12_0_0_pre4",
118 "CMSSW_12_0_0_pre6_vs_CMSSW_12_0_0_pre4",
119 "CMSSW_12_0_0_pre4_vs_CMSSW_12_0_0_pre3",
120 "CMSSW_12_0_0_pre3_vs_CMSSW_12_0_0_pre2",
121 "CMSSW_12_0_0_pre2_vs_CMSSW_12_0_0_pre1",
122 "CMSSW_12_0_0_pre1_vs_CMSSW_11_3_0_pre6" 125 "CMSSW_11_3_0_vs_CMSSW_11_3_0_pre6",
126 "CMSSW_11_3_0_pre6_vs_CMSSW_11_3_0_pre5",
127 "CMSSW_11_3_0_pre5_vs_CMSSW_11_3_0_pre4",
128 "CMSSW_11_3_0_pre4_vs_CMSSW_11_3_0_pre3",
129 "CMSSW_11_3_0_pre3_G4VECGEOM_vs_CMSSW_11_3_0_pre3",
130 "CMSSW_11_3_0_pre3_D76_vs_CMSSW_11_3_0_pre3",
131 "CMSSW_11_3_0_pre3_vs_CMSSW_11_3_0_pre2",
132 "CMSSW_11_3_0_pre2_vs_CMSSW_11_3_0_pre1",
133 "CMSSW_11_3_0_pre1_vs_CMSSW_11_2_0_pre10",
136 "CMSSW_11_2_0_vs_CMSSW_11_2_0_pre10",
137 "CMSSW_11_2_0_pre10_vs_CMSSW_11_2_0_pre9",
138 "CMSSW_11_2_0_pre9_vs_CMSSW_11_2_0_pre8",
139 "CMSSW_11_2_0_pre8_vs_CMSSW_11_2_0_pre7",
140 "CMSSW_11_2_0_pre7_vs_CMSSW_11_2_0_pre6",
141 "CMSSW_11_2_0_pre6_ROOT622_vs_CMSSW_11_2_0_pre6",
142 "CMSSW_11_2_0_pre6_vs_CMSSW_11_2_0_pre5",
143 "CMSSW_11_2_0_pre5_GEANT106_vs_CMSSW_11_2_0_pre5",
144 "CMSSW_11_2_0_pre5_vs_CMSSW_11_2_0_pre3",
145 "CMSSW_11_2_0_pre3_vs_CMSSW_11_2_0_pre1",
146 "CMSSW_11_2_0_pre1_vs_CMSSW_11_1_0_pre8" 149 "CMSSW_11_1_0_pre8_raw1100_vs_CMSSW_11_1_0_pre8",
150 "CMSSW_11_1_0_pre8_raw1100_vs_CMSSW_11_1_0_pre7_raw1100",
151 "CMSSW_11_1_0_pre8_vs_CMSSW_11_1_0_pre7",
152 "CMSSW_11_1_0_pre7_raw1100_vs_CMSSW_11_1_0_pre7",
153 "CMSSW_11_1_0_pre7_raw1100_vs_CMSSW_11_1_0_pre6_raw1100",
154 "CMSSW_11_1_0_pre7_vs_CMSSW_11_1_0_pre6",
155 "CMSSW_11_1_0_pre6_raw1100_vs_CMSSW_11_1_0_pre6",
156 "CMSSW_11_1_0_pre6_raw1100_vs_CMSSW_11_1_0_pre5_raw1100",
157 "CMSSW_11_1_0_pre6_vs_CMSSW_11_1_0_pre5",
158 "CMSSW_11_1_0_pre5_vs_CMSSW_11_1_0_pre4",
159 "CMSSW_11_1_0_pre5_raw1100_vs_CMSSW_11_1_0_pre5",
160 "CMSSW_11_1_0_pre5_raw1100_vs_CMSSW_11_1_0_pre4_raw1100",
161 "CMSSW_11_1_0_pre4_raw1100_vs_CMSSW_11_1_0_pre4",
162 "CMSSW_11_1_0_pre4_raw1100_vs_CMSSW_11_1_0_pre3_raw1100",
163 "CMSSW_11_1_0_pre4_GEANT4",
"CMSSW_11_1_0_pre4" 167 geometryTests = OrderedDict()
168 geometryTests = {
"Material budget" : [
170 "Extended2026D49_vs_Extended2026D76",
171 "Extended2026D76_vs_Extended2026D83",
172 "Extended2026D83_vs_Extended2026D86",
173 "Extended2026D77_vs_Extended2026D88" 177 GeoScenario =
"Extended2026D77_vs_Extended2026D88" 179 RefRelease=
'CMSSW_12_3_0_pre6' 181 NewRelease=
'CMSSW_12_3_1' 183 NotNormalRelease =
"normal" 184 NotNormalRefRelease =
"normal" 187 if ( os.path.isdir(
'%s/%s' %(opt.WWWAREA, NewRelease))) :
188 print(
"The campaign you are trying to validate has already an existing validation folder in the official www area.")
189 print(
"Make sure you are not overwriting anything and try again.")
192 if "raw" in NotNormalRelease:
197 appendglobaltag =
"_2026D88noPU" 204 appendglobaltag =
"_2026D88noPU" 210 phase2samples_noPU_oldnaming = [ 211 # Sample("RelValCloseByParticleGun_CE_H_Fine_300um", dqmVersion="0002", scenario="2026D49", appendGlobalTag=appendglobaltag ), 212 Sample("RelValCloseByParticleGun_CE_H_Fine_300um", scenario="2026D49", appendGlobalTag=appendglobaltag ), 213 Sample("RelValCloseByParticleGun_CE_H_Fine_200um", scenario="2026D49", appendGlobalTag=appendglobaltag ), 214 Sample("RelValCloseByParticleGun_CE_H_Fine_120um", scenario="2026D49", appendGlobalTag=appendglobaltag ), 215 Sample("RelValCloseByParticleGun_CE_H_Coarse_Scint", scenario="2026D49", appendGlobalTag=appendglobaltag ), 216 Sample("RelValCloseByParticleGun_CE_H_Coarse_300um", scenario="2026D49", appendGlobalTag=appendglobaltag ), 217 Sample("RelValCloseByParticleGun_CE_E_Front_300um", scenario="2026D49", appendGlobalTag=appendglobaltag ), 218 Sample("RelValCloseByParticleGun_CE_E_Front_200um", scenario="2026D49", appendGlobalTag=appendglobaltag ), 219 Sample("RelValCloseByParticleGun_CE_E_Front_120um", scenario="2026D49", appendGlobalTag=appendglobaltag ), 220 #Sample("RelValCloseByParticleGun_CE_E_Front_120um", scenario="2026D49", appendGlobalTag=appendglobaltag , version="v2"), 221 Sample("RelValTTbar", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 222 Sample("RelValZMM", midfix="14", scenario="2026D49", appendGlobalTag=appendglobaltag ), 223 Sample("RelValSingleGammaFlatPt8To150", scenario="2026D49", appendGlobalTag=appendglobaltag ), 224 Sample("RelValSingleMuPt10", scenario="2026D49", appendGlobalTag=appendglobaltag ), 225 Sample("RelValSingleMuPt100", scenario="2026D49", appendGlobalTag=appendglobaltag ), 226 Sample("RelValSingleMuPt1000", scenario="2026D49", appendGlobalTag=appendglobaltag ), 227 Sample("RelValSingleMuFlatPt2To100", scenario="2026D49", appendGlobalTag=appendglobaltag ), 228 Sample("RelValSingleMuFlatPt0p7To10", scenario="2026D49", appendGlobalTag=appendglobaltag ), 229 Sample("RelValSingleEFlatPt2To100", scenario="2026D49", appendGlobalTag=appendglobaltag ), 230 Sample("RelValSingleTauFlatPt2To150", scenario="2026D49", appendGlobalTag=appendglobaltag ), 231 Sample("RelValSinglePiFlatPt0p7To10", scenario="2026D49", appendGlobalTag=appendglobaltag ), 232 Sample("RelValQCD_Pt20toInfMuEnrichPt15", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 233 Sample("RelValQCD_Pt15To7000_Flat", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 234 Sample("RelValZTT", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 235 Sample("RelValZMM", midfix="14", scenario="2026D49", appendGlobalTag=appendglobaltag ), 236 Sample("RelValZEE", midfix="14", scenario="2026D49", appendGlobalTag=appendglobaltag ), 237 Sample("RelValB0ToKstarMuMu", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 238 Sample("RelValBsToEleEle", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 239 Sample("RelValBsToMuMu", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 240 Sample("RelValBsToJpsiGamma", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 241 Sample("RelValBsToJpsiPhi_mumuKK", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 242 Sample("RelValBsToPhiPhi_KKKK", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 243 Sample("RelValDisplacedMuPt30To100", scenario="2026D49", appendGlobalTag=appendglobaltag ), 244 Sample("RelValDisplacedMuPt2To10", scenario="2026D49", appendGlobalTag=appendglobaltag ), 245 Sample("RelValDisplacedMuPt10To30", scenario="2026D49", appendGlobalTag=appendglobaltag ), 246 Sample("RelValTauToMuMuMu", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 247 #Sample("RelValMinBias", midfix="14TeV", scenario="2026D49", appendGlobalTag=appendglobaltag ), 248 Sample("RelValH125GGgluonfusion", midfix="14", scenario="2026D49", appendGlobalTag=appendglobaltag ), 249 Sample("RelValNuGun", scenario="2026D49", appendGlobalTag=appendglobaltag ) 254 phase2samples_noPU = [
275 Sample(
"RelValZpTT_1500", midfix=
"14", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
277 Sample(
"RelValZTT", midfix=
"14TeV", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
278 Sample(
"RelValZMM", midfix=
"14", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
280 Sample(
"RelValZEE", midfix=
"14", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
281 Sample(
"RelValTenTau_15_500_Eta3p1", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
283 Sample(
"RelValTTbar", midfix=
"14TeV", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
284 Sample(
"RelValQCD_Pt15To7000_Flat", midfix=
"14", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
286 Sample(
"RelValNuGun", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
288 Sample(
"RelValMinBias", midfix=
"14TeV", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
289 Sample(
"RelValH125GGgluonfusion", midfix=
"14", scenario=
"2026D49", appendGlobalTag=appendglobaltag )
297 phase2samples_noPU_extend = [
303 Sample(
"RelValSingleMuPt10", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
304 Sample(
"RelValSingleMuPt100", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
305 Sample(
"RelValSingleMuPt1000", scenario=
"2026D49", appendGlobalTag=appendglobaltag )
312 phase2samples_noPU_extend_more = [
346 Sample(
"RelValCloseByPGun_CE_H_Fine_300um", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
347 Sample(
"RelValCloseByPGun_CE_H_Fine_200um", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
348 Sample(
"RelValCloseByPGun_CE_H_Fine_120um", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
349 Sample(
"RelValCloseByPGun_CE_H_Coarse_Scint", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
350 Sample(
"RelValCloseByPGun_CE_H_Coarse_300um", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
351 Sample(
"RelValCloseByPGun_CE_E_Front_300um", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
352 Sample(
"RelValCloseByPGun_CE_E_Front_200um", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
353 Sample(
"RelValCloseByPGun_CE_E_Front_120um", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
354 Sample(
"RelValSingleGammaFlatPt8To150", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
355 Sample(
"RelValSingleEFlatPt2To100", scenario=
"2026D49", appendGlobalTag=appendglobaltag ),
356 Sample(
"RelValSinglePiFlatPt0p7To10", scenario=
"2026D49", appendGlobalTag=appendglobaltag )
388 phase2samples_noPU.extend(phase2samples_noPU_extend)
389 phase2samples_noPU.extend(phase2samples_noPU_extend_more)
400 Sample(
"RelValTTbar", midfix=
"14TeV", scenario=
"2026D49", putype=
putype(
"25ns"), punum=200, appendGlobalTag=
"_2026D49PU200", version=
"v2"),
404 RefRepository =
'%s' %(opt.INPUT)
405 NewRepository =
'%s' %(opt.INPUT)
414 fullsimSamples = phase2samples_noPU,
416 refRelease=RefRelease, refRepository=RefRepository,
417 newRelease=NewRelease, newRepository=NewRepository
426 if (
not os.path.isdir(RefRepository+
'/'+NewRelease)) :
427 processCmd(
'mkdir -p '+RefRepository+
'/'+NewRelease)
429 for infi
in phase2samples_noPU:
430 if "_HGCal" in infi.filename(NewRelease):
431 processCmd(
'mv ' + infi.filename(NewRelease) +
' ' + infi.filename(NewRelease).
replace(
"_HGCal",
""))
432 processCmd(
'mv ' + infi.filename(NewRelease).
replace(
"_HGCal",
"") +
' ' + RefRepository+
'/'+NewRelease)
436 processCmd(
'mv ' + infi.filename(NewRelease) +
' ' + RefRepository+
'/'+NewRelease)
441 if (opt.OBJ ==
'layerClusters' or opt.OBJ ==
'hitCalibration' or opt.OBJ ==
'hitValidation' or opt.OBJ ==
'tracksters' or opt.OBJ ==
'simulation'):
444 if opt.OBJ ==
'simulation':
processCmd(
'mkdir HGCValid_SimClusters_Plots HGCValid_CaloParticles_Plots')
446 for infi
in phase2samples_noPU:
447 samplename = infi.filename(NewRelease).
replace(
"DQM_V0001_R000000001__",
"").
replace(
"__DQMIO.root",
"")
450 if infi.pileup() ==
"PU":
451 samplename = samplename +
str(infi.pileupNumber())
454 print(_sampleName[infi.name()])
460 if opt.OBJ ==
'tracksters':
461 for tracksterCollection
in trackstersIters:
462 processCmd(
'mkdir -p HGCValid_Tracksters_Plots/plots_%s_%s HGCValid_Test-TICL_Plots/plots_%s_%s HGCValid_TICL-patternRecognition_Plots/plots_%s_%s' %(samplename,tracksterCollection,samplename,tracksterCollection,samplename,tracksterCollection) )
465 if RefRelease !=
None: inputpathRef = RefRepository +
'/' + RefRelease +
'/' 466 inputpathNew = NewRepository +
'/' + NewRelease+
'/' 468 if RefRelease ==
None:
469 cmd =
'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathNew + infi.filename(NewRelease) +
' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) +
' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) +
' plots_%s' % (samplename)+
' --collection %s' %(opt.HTMLVALNAME)
470 elif "raw" in NotNormalRelease
and "normal" in NotNormalRefRelease:
471 cmd =
'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).
replace(
"mcRun4_realistic_v3_2026D76noPU-v1",
"mcRun4_realistic_v3_2026D49noPU-v1") +
' ' + inputpathNew + infi.filename(NewRelease) +
' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) +
' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) +
' plots_%s' % (samplename) +
' --collection %s' %(opt.HTMLVALNAME)
473 elif "normal" in NotNormalRelease
and "raw" in NotNormalRefRelease:
474 cmd =
'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).
replace(
"mcRun4_realistic_v7_2026D77noPU-v1",
"mcRun4_realistic_v7_2026D76noPU-v1") +
' ' + inputpathNew + infi.filename(NewRelease) +
' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) +
' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) +
' plots_%s' % (samplename) +
' --collection %s' %(opt.HTMLVALNAME)
476 elif "raw" in NotNormalRelease
and "raw" in NotNormalRefRelease:
478 cmd =
'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).
replace(
"_raw1100",
"_raw1100_rsb") +
' ' + inputpathNew + infi.filename(NewRelease) +
' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) +
' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) +
' plots_%s' % (samplename) +
' --collection %s' %(opt.HTMLVALNAME)
479 elif "normal" in NotNormalRelease
and "normal" in NotNormalRefRelease:
480 cmd =
'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease) +
' ' + inputpathNew + infi.filename(NewRelease) +
' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) +
' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) +
' plots_%s' % (samplename) +
' --collection %s' %(opt.HTMLVALNAME)
486 cmd =
'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).
replace(
"mcRun4_realistic_v2-v1",
"mcRun4_realistic_v2_2026D49noPU-v1") +
' ' + inputpathNew + infi.filename(NewRelease) +
' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) +
' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) +
' plots_%s' % (samplename) +
' --collection %s' %(opt.HTMLVALNAME)
490 print(
'Dry-run: ['+cmd+
']')
493 if opt.OBJ ==
'layerClusters':
494 processCmd(
'mv HGCValid_%s_Plots/plots_%s_Layer\ Clusters.html HGCValid_%s_Plots/index.html'%(opt.HTMLVALNAME,samplename,opt.HTMLVALNAME))
495 processCmd(
'awk \'NR>=6&&NR<=396\' HGCValid_%s_Plots/index.html > HGCValid_%s_Plots/index_%s.html '% (opt.HTMLVALNAME,opt.HTMLVALNAME, samplename))
496 processCmd(
'echo " <br/>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) )
497 processCmd(
'echo " <hr>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) )
499 if opt.OBJ ==
'hitCalibration':
501 processCmd(
'mv HGCValid_%s_Plots/plots_%s_Calibrated\ RecHits.html HGCValid_%s_Plots/index.html'%(opt.HTMLVALNAME,samplename,opt.HTMLVALNAME))
502 processCmd(
'sed -i \'s/Calibrated\ RecHits//g\' HGCValid_%s_Plots/index.html'%(opt.HTMLVALNAME) )
503 processCmd(
'awk \'NR>=6&&NR<=27\' HGCValid_%s_Plots/index.html > HGCValid_%s_Plots/index_%s.html '% (opt.HTMLVALNAME,opt.HTMLVALNAME, samplename))
504 processCmd(
'echo " <br/>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) )
505 processCmd(
'echo " <hr>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) )
507 if opt.OBJ ==
'hitValidation':
508 processCmd(
'mv HGCValid_%s_Plots/plots_%s_Hits.html HGCValid_%s_Plots/index.html'%(opt.HTMLVALNAME,samplename,opt.HTMLVALNAME))
509 processCmd(
'awk \'NR>=6&&NR<=184\' HGCValid_%s_Plots/index.html > HGCValid_%s_Plots/index_%s.html '% (opt.HTMLVALNAME,opt.HTMLVALNAME, samplename))
510 processCmd(
'echo " <br/>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) )
511 processCmd(
'echo " <hr>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) )
513 if opt.OBJ ==
'tracksters':
514 processCmd(
'mv HGCValid_%s_Plots/plots_%s_Tracksters.html HGCValid_Tracksters_Plots/index.html'%(opt.HTMLVALNAME,samplename))
515 processCmd(
'mv HGCValid_%s_Plots/plots_%s_Test-TICL.html HGCValid_Test-TICL_Plots/index.html'%(opt.HTMLVALNAME,samplename))
516 processCmd(
'mv HGCValid_%s_Plots/plots_%s_TICL-patternRecognition.html HGCValid_TICL-patternRecognition_Plots/index.html'%(opt.HTMLVALNAME,samplename))
517 processCmd(
'awk \'NR>=6&&NR<=135\' HGCValid_Tracksters_Plots/index.html > HGCValid_Tracksters_Plots/index_%s.html ' %(samplename))
518 processCmd(
'awk \'NR>=6&&NR<=117\' HGCValid_Test-TICL_Plots/index.html > HGCValid_Test-TICL_Plots/index_%s.html '% (samplename))
519 processCmd(
'awk \'NR>=6&&NR<=117\' HGCValid_TICL-patternRecognition_Plots/index.html > HGCValid_TICL-patternRecognition_Plots/index_%s.html '% (samplename))
520 processCmd(
'echo " <br/>" >> HGCValid_Tracksters_Plots/index_%s.html '%(samplename) )
521 processCmd(
'echo " <br/>" >> HGCValid_Test-TICL_Plots/index_%s.html '%(samplename) )
522 processCmd(
'echo " <br/>" >> HGCValid_TICL-patternRecognition_Plots/index_%s.html '%(samplename) )
523 processCmd(
'echo " <hr>" >> HGCValid_Tracksters_Plots/index_%s.html '%(samplename) )
524 processCmd(
'echo " <hr>" >> HGCValid_Test-TICL_Plots/index_%s.html '%(samplename) )
525 processCmd(
'echo " <hr>" >> HGCValid_TICL-patternRecognition_Plots/index_%s.html '%(samplename) )
527 for tracksterCollection
in trackstersIters:
529 processCmd(
'mv HGCValid_%s_Plots/plots_%s_%s/*_Link HGCValid_Test-TICL_Plots/plots_%s_%s/.'%(opt.HTMLVALNAME,samplename,tracksterCollection,samplename,tracksterCollection))
530 processCmd(
'mv HGCValid_%s_Plots/plots_%s_%s/*CaloParticle*Trackster* HGCValid_Test-TICL_Plots/plots_%s_%s/.'%(opt.HTMLVALNAME,samplename,tracksterCollection,samplename,tracksterCollection))
531 processCmd(
'mv HGCValid_%s_Plots/plots_%s_%s/*Trackster*CaloParticle* HGCValid_Test-TICL_Plots/plots_%s_%s/.'%(opt.HTMLVALNAME,samplename,tracksterCollection,samplename,tracksterCollection))
533 processCmd(
'mv HGCValid_%s_Plots/plots_%s_%s/*_PR HGCValid_TICL-patternRecognition_Plots/plots_%s_%s/.'%(opt.HTMLVALNAME,samplename,tracksterCollection,samplename,tracksterCollection))
534 processCmd(
'mv HGCValid_%s_Plots/plots_%s_%s/*SimTrackster*Trackster* HGCValid_TICL-patternRecognition_Plots/plots_%s_%s/.'%(opt.HTMLVALNAME,samplename,tracksterCollection,samplename,tracksterCollection))
535 processCmd(
'mv HGCValid_%s_Plots/plots_%s_%s/*Trackster*SimTrackster* HGCValid_TICL-patternRecognition_Plots/plots_%s_%s/.'%(opt.HTMLVALNAME,samplename,tracksterCollection,samplename,tracksterCollection))
537 for gr
in [
'EtaPhiPtEnergy',
'XYZ',
'TotalNumberofTracksters',
'NumberofLayerClustersinTrackster',
'NumberofLayerClustersinTracksterPerLayer',
'NumberofLayerClustersinTracksterPerLayer_zminus_EE',
'NumberofLayerClustersinTracksterPerLayer_zminus_FH',
'NumberofLayerClustersinTracksterPerLayer_zminus_BH',
'NumberofLayerClustersinTracksterPerLayer_zplus_EE',
'NumberofLayerClustersinTracksterPerLayer_zplus_FH',
'NumberofLayerClustersinTracksterPerLayer_zplus_BH',
'LayerNumbersOfTrackster',
'MultiplicityofLCinTST']:
538 processCmd(
'mv HGCValid_%s_Plots/plots_%s_%s/%s HGCValid_Tracksters_Plots/plots_%s_%s/.'%(opt.HTMLVALNAME,samplename,tracksterCollection,gr,samplename,tracksterCollection))
541 if opt.OBJ ==
'simulation':
543 processCmd(
'mv HGCValid_%s_Plots/plots_%s_SimClusters.html HGCValid_SimClusters_Plots/index.html'%(opt.HTMLVALNAME,samplename))
544 processCmd(
'mv HGCValid_%s_Plots/plots_%s_CaloParticles.html HGCValid_CaloParticles_Plots/index.html'%(opt.HTMLVALNAME,samplename))
545 processCmd(
'awk \'NR>=6&&NR<=157\' HGCValid_SimClusters_Plots/index.html > HGCValid_SimClusters_Plots/index_%s.html '% (samplename))
546 processCmd(
'awk \'NR>=6&&NR<=331\' HGCValid_CaloParticles_Plots/index.html > HGCValid_CaloParticles_Plots/index_%s.html '% (samplename))
547 processCmd(
'echo " <br/>" >> HGCValid_SimClusters_Plots/index_%s.html '%(samplename) )
548 processCmd(
'echo " <br/>" >> HGCValid_CaloParticles_Plots/index_%s.html '%(samplename) )
549 processCmd(
'echo " <hr>" >> HGCValid_SimClusters_Plots/index_%s.html '%(samplename) )
550 processCmd(
'echo " <hr>" >> HGCValid_CaloParticles_Plots/index_%s.html '%(samplename) )
552 processCmd(
'mv HGCValid_%s_Plots/plots_%s_ClusterLevel HGCValid_SimClusters_Plots/.'%(opt.HTMLVALNAME,samplename))
553 processCmd(
'mv HGCValid_%s_Plots/plots_%s_ticlSimTracksters HGCValid_SimClusters_Plots/.'%(opt.HTMLVALNAME,samplename))
554 processCmd(
'mv HGCValid_%s_Plots/plots_%s_CaloParticles_* HGCValid_CaloParticles_Plots/.'%(opt.HTMLVALNAME,samplename))
557 if opt.OBJ ==
'simulation':
558 fragments.append(
'HGCValid_SimClusters_Plots/index_%s.html'% (samplename) )
559 fragments.append(
'HGCValid_CaloParticles_Plots/index_%s.html'% (samplename) )
560 elif opt.OBJ ==
'tracksters':
561 fragments.append(
'HGCValid_Tracksters_Plots/index_%s.html'% (samplename) )
562 fragments.append(
'HGCValid_Test-TICL_Plots/index_%s.html'% (samplename) )
563 fragments.append(
'HGCValid_TICL-patternRecognition_Plots/index_%s.html'% (samplename) )
565 fragments.append(
'HGCValid_%s_Plots/index_%s.html'% (opt.HTMLVALNAME, samplename) )
570 if opt.OBJ ==
'simulation':
571 indexfiles = [
"SimClusters",
"CaloParticles"]
572 elif opt.OBJ ==
'tracksters':
573 indexfiles = [
"Tracksters",
"Test-TICL",
"TICL-patternRecognition"]
575 indexfiles = [opt.HTMLVALNAME]
577 for ind
in indexfiles:
578 processCmd(
'mv HGCValid_%s_Plots/index.html HGCValid_%s_Plots/test.html' %(ind,ind) )
579 index_file = open(
'HGCValid_%s_Plots/index.html'%(ind),
'w')
581 index_file.write(
'<html>\n')
582 index_file.write(
' <head>\n')
583 index_file.write(
' <title>HGCAL validation %s </title>\n' %(ind) )
584 index_file.write(
' </head>\n')
585 index_file.write(
' <body>\n')
587 for frag
in fragments:
588 if ind
not in frag:
continue 589 with open(frag,
'r') as f: 590 lines = f.read().splitlines() 593 index_file.write(line +
'\n')
598 index_file.write(
' </body>\n')
599 index_file.write(
'</html>\n')
604 if (opt.OBJ ==
'SimHits'):
606 if (
not os.path.isdir(
"hgcalSimHitStudy")) :
609 processCmd(
'cp %s/../public/index.php hgcalSimHitStudy/.'%(opt.WWWAREA) )
613 cmd =
'root.exe -b -q Validation/HGCalValidation/macros/validationplots.C\(\\"hgcSimHit.root' +
'\\",\\"'+ opt.OBJ +
'\\"\)' 615 print(
'Dry-run: ['+cmd+
']')
621 if (opt.OBJ == 'hitValidation'): 623 #Now that we have them in eos lets produce plots 624 #Let's loop through RelVals 625 for infi in phase2samples_noPU: 626 samplename = infi.filename(NewRelease).replace("DQM_V0001_R000000001__","").replace("__DQMIO.root","") 627 #samplename = infi.filename(NewRelease).replace("DQM_V0001_R000000001__","").split("__CMSSW_10_6_0_pre4",1)[0] 628 #samplename = samplename + infi.pileup() 629 if infi.pileup() == "PU": 630 samplename = samplename + str(infi.pileupNumber()) 637 if RefRelease != None: inputpathRef = RefRepository +'/' + RefRelease +'/' 638 inputpathNew = NewRepository +'/' + NewRelease+ '/' 640 if RefRelease == None: 641 cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename)+ ' --collection %s' %(opt.HTMLVALNAME) 642 elif "raw" in NotNormalRelease and "normal" in NotNormalRefRelease: 643 cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).replace("mcRun4_realistic_v3_2026D76noPU-v1","mcRun4_realistic_v3_2026D49noPU-v1") + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 644 #cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).replace("mcRun4_realistic_v3_2026D49noPU_raw1100_rsb-v1","mcRun4_realistic_v3_2026D49noPU-v1") + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 645 elif "raw" in NotNormalRelease and "raw" in NotNormalRefRelease: 646 #cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease) + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 647 cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).replace("_raw1100","_raw1100_rsb") + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 648 elif "normal" in NotNormalRelease and "normal" in NotNormalRefRelease: 649 cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease) + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 650 #cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).replace("2026D49noPU-v2","2026D49noPU-v1") + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 652 #cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).replace("D49","D41").replace("200-v2","200-v1") + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 653 cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease).replace("mcRun4_realistic_v2-v1", "mcRun4_realistic_v2_2026D49noPU-v1") + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 654 #cmd = 'python3 Validation/HGCalValidation/scripts/makeHGCalValidationPlots.py ' + inputpathRef + infi.filename(RefRelease) + ' ' + inputpathNew + infi.filename(NewRelease) + ' --outputDir HGCValid_%s_Plots --no-ratio --png --separate --html-sample "%s" ' %(opt.HTMLVALNAME, _sampleName[infi.name()] ) + ' --html-validation-name %s --subdirprefix ' %(opt.HTMLVALNAME) + ' plots_%s' % (samplename) + ' --collection %s' %(opt.HTMLVALNAME) 658 print('Dry-run: ['+cmd+']') 660 output = processCmd(cmd) 661 processCmd('mv HGCValid_%s_Plots/plots_%s_Hits.html HGCValid_%s_Plots/index.html'%(opt.HTMLVALNAME,samplename,opt.HTMLVALNAME)) 662 processCmd('awk \'NR>=6&&NR<=184\' HGCValid_%s_Plots/index.html > HGCValid_%s_Plots/index_%s.html '% (opt.HTMLVALNAME,opt.HTMLVALNAME, samplename)) 663 processCmd('echo " <br/>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) ) 664 processCmd('echo " <hr>" >> HGCValid_%s_Plots/index_%s.html '%(opt.HTMLVALNAME, samplename) ) 666 fragments.append( 'HGCValid_%s_Plots/index_%s.html'% (opt.HTMLVALNAME, samplename) ) 669 #Let's also create the final index xml file. 670 processCmd('mv HGCValid_%s_Plots/index.html HGCValid_%s_Plots/test.html' %(opt.HTMLVALNAME,opt.HTMLVALNAME) ) 671 index_file = open('HGCValid_%s_Plots/index.html'%(opt.HTMLVALNAME),'w') 673 index_file.write('<html>\n') 674 index_file.write(' <head>\n') 675 index_file.write(' <title>HGCal validation %s </title>\n' %(opt.HTMLVALNAME) ) 676 index_file.write(' </head>\n') 677 index_file.write(' <body>\n') 679 for frag in fragments: 680 with open(frag,'r') as f: 681 lines = f.read().splitlines() 684 index_file.write(line +
'\n')
690 index_file.write(
' </body>\n')
691 index_file.write(
'</html>\n')
695 #------------------------------------------------------------------------------------------- 696 #This is the Digis part 697 if (opt.OBJ == 'Digis'): 698 #This is where we will save the final output pngs: 699 if (not os.path.isdir("hgcalDigiStudy")) : 700 processCmd('mkdir -p hgcalDigiStudy') 701 processCmd('mkdir -p hgcalDigiStudyEE') 702 processCmd('mkdir -p hgcalDigiStudyHEF') 703 processCmd('mkdir -p hgcalDigiStudyHEB') 705 processCmd('cp %s/../public/index.php hgcalDigiStudy/.'%(opt.WWWAREA) ) 706 processCmd('cp %s/../public/index.php hgcalDigiStudyEE/.'%(opt.WWWAREA) ) 707 processCmd('cp %s/../public/index.php hgcalDigiStudyHEF/.'%(opt.WWWAREA) ) 708 processCmd('cp %s/../public/index.php hgcalDigiStudyHEB/.'%(opt.WWWAREA) ) 709 #The input here is from running cmsRun runHGCalDigiStudy_cfg.py, to which 710 #we usually give ttbar noPU as input 712 cmd = 'root.exe -b -q Validation/HGCalValidation/macros/validationplots.C\(\\"hgcDigi.root' + '\\",\\"'+ opt.OBJ + '\\"\)' 714 print('Dry-run: ['+cmd+']') 716 output = processCmd(cmd) 717 #mv the output under the main directory 718 processCmd('mv hgcalDigiStudyEE hgcalDigiStudy/.') 719 processCmd('mv hgcalDigiStudyHEF hgcalDigiStudy/.') 720 processCmd('mv hgcalDigiStudyHEB hgcalDigiStudy/.') 722 #------------------------------------------------------------------------------------------- 723 #This is the RecHits part 724 if (opt.OBJ == 'RecHits'): 725 #This is where we will save the final output pngs: 726 if (not os.path.isdir("hgcalRecHitStudy")) : 727 processCmd('mkdir -p hgcalRecHitStudy') 728 processCmd('mkdir -p hgcalRecHitStudyEE') 729 processCmd('mkdir -p hgcalRecHitStudyHEF') 730 processCmd('mkdir -p hgcalRecHitStudyHEB') 732 processCmd('cp %s/../public/index.php hgcalRecHitStudy/.'%(opt.WWWAREA) ) 733 processCmd('cp %s/../public/index.php hgcalRecHitStudyEE/.'%(opt.WWWAREA) ) 734 processCmd('cp %s/../public/index.php hgcalRecHitStudyHEF/.'%(opt.WWWAREA) ) 735 processCmd('cp %s/../public/index.php hgcalRecHitStudyHEB/.'%(opt.WWWAREA) ) 736 #The input here is from running cmsRun runHGCalRecHitStudy_cfg.py, to which 737 #we usually give ttbar noPU as input 738 #Input: hgcRecHit.root 739 cmd = 'root.exe -b -q Validation/HGCalValidation/macros/validationplots.C\(\\"hgcRecHit.root' + '\\",\\"'+ opt.OBJ + '\\"\)' 741 print('Dry-run: ['+cmd+']') 743 output = processCmd(cmd) 744 #mv the output under the main directory 745 processCmd('mv hgcalRecHitStudyEE hgcalRecHitStudy/.') 746 processCmd('mv hgcalRecHitStudyHEF hgcalRecHitStudy/.') 747 processCmd('mv hgcalRecHitStudyHEB hgcalRecHitStudy/.') 749 #------------------------------------------------------------------------------------------- 750 ## TODO #This is the CaloParticles part 751 if (opt.OBJ == 'CaloParticles'): 752 particletypes = ["-11","-13","-211","-321","11","111","13","211","22","321"] 753 #This is where we will save the final output pngs: 754 if (not os.path.isdir("CaloParticles")) : 755 processCmd('mkdir -p CaloParticles') 757 processCmd('cp %s/../public/index.php CaloParticles/.'%(opt.WWWAREA) ) 759 #Let's loop through RelVals 760 for infi in phase2samples_noPU: 761 #samplename = infi.filename(NewRelease).replace("DQM_V0001_R000000001__","").replace("__DQMIO.root","") 762 samplename = infi.filename(NewRelease).replace("DQM_V0001_R000000001__","").split("__"+NewRelease,1)[0] 763 samplename = samplename + infi.pileup() 764 if infi.pileup() == "PU": 765 samplename = samplename + str(infi.pileupNumber()) 770 if (not os.path.isdir(samplename)) : 771 processCmd('mkdir -p ' + samplename ) 772 processCmd('cp %s/RelVals/index.php '%(opt.WWWAREA) + samplename + '/.') 773 for part in particletypes: 774 processCmd('mkdir -p ' + samplename + '/' +part ) 776 processCmd('cp %s/RelVals/index.php '%(opt.WWWAREA) + samplename + '/' +part + '/.') 779 if RefRelease != None: inputpathRef = RefRepository +'/' + RefRelease +'/' 780 inputpathNew = NewRepository +'/' + NewRelease+ '/' 781 cmd = 'root.exe -b -q Validation/HGCalValidation/macros/validationplots.C\(\\"'+ inputpathNew + infi.filename(NewRelease) + '\\",\\"'+ opt.OBJ + '\\",\\"'+ samplename + '\\"\\)' 783 print('Dry-run: ['+cmd+']') 785 output = processCmd(cmd) 786 processCmd('mv ' +samplename+ ' CaloParticles/.' ) 788 #------------------------------------------------------------------------------------------ 789 #Summary section: After processing all the objects the results are gathered, webpages are 790 # created and a summary page is added. 791 #------------------------------------------------------------------------------------------- 792 #Here we will gather all results. 793 if (opt.GATHER != None) : 795 #First we need the top folder to contain all validation releases. 796 index_file = open('index.html','w') 798 index_file.write('<html>\n') 799 index_file.write(' <head>\n') 800 index_file.write(' <title>HGCAL validation results </title>\n' ) 801 index_file.write(' </head>\n') 802 index_file.write(' <body>\n') 803 index_file.write(' <h1>\n') 804 index_file.write(' HGCAL Validation Results \n' ) 805 index_file.write(' </h1>\n') 806 index_file.write(' <hr/>\n' ) 807 index_file.write(' <h2>\n') 808 index_file.write(' Release Validation Campaigns \n' ) 809 index_file.write(' </h2>\n') 810 index_file.write(' <ul>\n' ) 812 for trel in thereleases.keys(): 813 index_file.write(' <li>\n' ) 814 index_file.write(' %s\n' %(trel) ) 815 for rel in thereleases[trel]: 816 index_file.write(' <ul>\n' ) 817 index_file.write(' <li><a href="%s/index.html">%s</a></li>\n' %(rel, rel ) ) 818 index_file.write(' </ul>\n' ) 819 index_file.write(' </li>\n' ) 820 index_file.write(' <br>\n' ) 821 index_file.write(' <br>\n' ) 822 index_file.write(' <br>\n' ) 824 index_file.write(' </ul>\n' ) 825 index_file.write(' <hr/>\n' ) 827 #New section : Geometry Validation 828 #Regardless of the release validation, the top html menu should contain the geometry section. 829 #we put this in the "gather" step. 830 index_file.write(' <h2>\n') 831 index_file.write(' Geometry Validation \n' ) 832 index_file.write(' </h2>\n') 833 index_file.write(' <ul>\n' ) 835 for tgeo in geometryTests.keys(): 836 index_file.write(' <li>\n' ) 837 index_file.write(' %s\n' %(tgeo) ) 838 for geo in geometryTests[tgeo]: 839 #We need the directory for the geometry related results 840 if (not os.path.isdir(geo)): 841 processCmd('mkdir -p %s/%s' %(opt.WWWAREA,geo) ) 842 processCmd('mkdir -p %s' %(geo) ) 843 for mats in _individualmaterials: 844 processCmd('mkdir -p %s/%s/indimat/%s' %(opt.WWWAREA,geo,mats) ) 845 processCmd('mkdir -p %s/indimat/%s' %(geo,mats) ) 847 index_file.write(' <ul>\n' ) 848 index_file.write(' <li><a href="%s/index.html">%s</a></li>\n' %(geo, geo ) ) 849 index_file.write(' </ul>\n' ) 850 index_file.write(' </li>\n' ) 851 index_file.write(' <br>\n' ) 852 index_file.write(' <br>\n' ) 853 index_file.write(' <br>\n' ) 856 index_file.write(' </body>\n') 857 index_file.write('</html>\n') 860 #This is the main html file for the validation webpage. In order to avoid 861 #surprises when experimenting, in order to copy it automatically to the 862 #www area you should have activated the relevant flag: 863 if (opt.COPYHTML) : processCmd('cp index.html %s/.' %(opt.WWWAREA) ) 865 #Let's make also the summary folder 866 if (not os.path.isdir("HGCValid_summary_Plots")): 867 processCmd('mkdir -p HGCValid_summary_Plots') 869 #To avoid the nans transpose later 870 df = pd.DataFrame.from_dict(_summary, orient = 'index').transpose() 871 #Make a specific order in columns 874 index_file = open('HGCValid_summary_Plots/index.html','w') 876 index_file.write('<html>\n') 877 index_file.write(' <body>\n') 879 #Let's loop through RelVals 880 for infi in phase2samples_noPU: 881 samplename = infi.filename(NewRelease).replace("DQM_V0001_R000000001__","").replace("__DQMIO.root","") 882 index_file.write( '<h2> %s </h2> \n' %(_sampleName[infi.name()]) ) 883 #table here with summary objects 884 index_file.write('<table> \n') 885 index_file.write(' <tr>\n') 886 #This is the row with the headers. So, the objects for us. 888 index_file.write(' <th>%s</th>\n' %(_pageNameMap[obj]) ) 889 index_file.write(' </tr>\n') 891 for i, row in df.iterrows(): 892 index_file.write(' <tr>\n') 893 for j, column in row.iteritems(): 895 index_file.write(' <td>\n') 896 index_file.write(' <ul>\n') 898 # if df[obj][ind] == None: 900 index_file.write(' </ul>\n') 901 index_file.write(' </td>\n') 903 #index_file.write(' \n') 907 #index_file.write(' <li><a href="plots_%s_%s">%s</a></li> \n' %(samplename, df[obj][ind], df[obj][ind].partition("/")[2] )) 908 if "Tracksters" in j or "Test-TICL" in j or "TICL-patternRecognition" in j: 909 index_file.write(' <li><a href="../HGCValid_%s_Plots/plots_%s_%s">%s</a></li> \n' %(j, samplename, column, column.replace("ticlTracksters","") )) 911 index_file.write(' <li><a href="../HGCValid_%s_Plots/plots_%s_%s">%s</a></li> \n' %(j, samplename, column, column.partition("/")[2] )) 913 index_file.write(' </ul>\n') 914 index_file.write(' </td>\n') 916 index_file.write(' </tr>\n') 918 index_file.write(' </table>\n') 919 index_file.write(' <br/>\n' ) 920 index_file.write(' <br/>\n' ) 921 index_file.write(' <br/>\n' ) 924 index_file.write(' </body>\n') 925 index_file.write('</html>\n') 928 objects = opt.GATHER.split(",") 931 if "raw" in NotNormalRelease and "raw" in NotNormalRefRelease: 932 localoutputdir = NewRelease + "_raw1100" + "_vs_" + RefRelease + "_raw1100" 933 elif "raw" in NotNormalRelease and "normal" in NotNormalRefRelease: 934 #localoutputdir = NewRelease + "_raw1100" + "_vs_" + RefRelease 935 localoutputdir = NewRelease + "_D76" + "_vs_" + RefRelease 936 elif "normal" in NotNormalRelease and "normal" in NotNormalRefRelease: 937 localoutputdir = NewRelease + "_vs_" + RefRelease 939 localoutputdir = NewRelease 941 #make the structure to hold the objects 943 #This is where we will save the final output per campaing: 944 if (not os.path.isdir('%s/standalone' %(localoutputdir))) : 945 processCmd('mkdir -p %s/standalone' %(localoutputdir)) 946 if (obj!="standalone"): processCmd('mv HGCValid_%s_Plots %s'%(obj, localoutputdir) ) 948 processCmd('mv hgcalSimHitStudy %s/standalone/.'%(localoutputdir) ) 949 processCmd('mv hgcalDigiStudy %s/standalone/.'%(localoutputdir) ) 950 processCmd('mv hgcalRecHitStudy %s/standalone/.'%(localoutputdir) ) 951 processCmd('cp %s/../public/index.php %s/standalone/.'%(opt.WWWAREA, localoutputdir) ) 955 for infi
in phase2samples_noPU:
956 samplename = infi.filename(NewRelease).
replace(
"DQM_V0001_R000000001__",
"").
replace(
"__DQMIO.root",
"")
962 if df[obj][ind] ==
None:
continue 963 else:
processCmd(
'cp -r %s/HGCValid_%s_Plots/plots_%s_%s %s/HGCValid_summary_Plots ' %(NewRelease, obj, samplename, df[obj][ind].
partition(
"/")[0], NewRelease ) )
966 #html file of the relval campaign we are validating 967 index_file = open('%s/index.html'%(localoutputdir),'w') 969 index_file.write('<html>\n') 970 index_file.write(' <head>\n') 971 index_file.write(' <title> <h2> HGCAL validation results for %s </h2> </title>\n' %(localoutputdir) ) 972 index_file.write(' </head>\n') 973 index_file.write(' <body>\n') 974 index_file.write(' <h2> HGCAL validation results for %s </h2> \n' %(localoutputdir) ) 978 if (obj!="standalone"): 979 index_file.write(' <br/>\n' ) 980 index_file.write(' <ul>\n' ) 981 index_file.write(' <li><a href="HGCValid_%s_Plots/index.html">%s</a></li>\n' %(obj, _pageNameMap[obj] ) ) 982 index_file.write(' </ul>\n' ) 983 index_file.write(' <br/>\n' ) 985 index_file.write(' <br/>\n' ) 986 index_file.write(' <ul>\n' ) 987 index_file.write(' <li><a href="%s/index.php">%s</a></li>\n' %(obj, _pageNameMap[obj] ) ) 988 index_file.write(' </ul>\n' ) 989 index_file.write(' <br/>\n' ) 993 index_file.write(' </body>\n') 994 index_file.write('</html>\n') 997 #We choose to zip in uncompressed form all the files for two reasons: 998 #1. Copying to eos so many files is really slow. It is faster to 999 # create one uncompressed file, copy that and unzip there. 1000 #2. Inevitably, we will have to do some cleanup of the older campaigns, 1001 # since we will reach the number of files limit quite easily. 1002 # It will be easier to have already save the zip file and just delete 1003 # the directory content, leaving inside only the zip file. 1005 # This will take some time. 1006 # processCmd('zip -0 -r %s.zip %s' %(localoutputdir,localoutputdir) ) 1007 # processCmd('cp %s.zip %s/.' %(localoutputdir,opt.WWWAREA) ) 1008 # processCmd('cd %s' %(opt.WWWAREA) ) 1009 # processCmd('unzip -q %s.zip' %(localoutputdir) ) 1010 # processCmd('mv %s.zip %s/.' %(localoutputdir,localoutputdir) ) 1011 # processCmd('cd -') 1014 #------------------------------------------------------------------------------------------ 1015 #Geometry section: Here we gather results from geometry related validation packages. 1016 #------------------------------------------------------------------------------------------- 1017 #Keep in mind that the gne 1019 #html file of the geometry scenario we are estimating the material budget 1020 index_file = open('%s/index.html'%(GeoScenario),'w') 1022 index_file.write('<html>\n') 1023 index_file.write(' <head>\n') 1024 index_file.write(' <title> <h2> HGCAL material budget results for %s </h2> </title>\n' %(GeoScenario) ) 1025 index_file.write(' </head>\n') 1026 index_file.write(' <body>\n') 1027 index_file.write(' <h2> HGCAL material budget results for %s </h2> \n' %(GeoScenario) ) 1029 for obj in _MatBudSections: 1031 #We need the directory for the geometry related results 1032 if (not os.path.isdir('%s/%s/%s' %(opt.WWWAREA,GeoScenario,obj))): 1033 processCmd('mkdir -p %s/%s/%s' %(opt.WWWAREA,GeoScenario,obj) ) 1034 processCmd('mkdir -p %s/%s' %(GeoScenario,obj) ) 1036 index_file.write(' <br/>\n' ) 1037 index_file.write(' <ul>\n' ) 1038 index_file.write(' <li><a href="%s/index.html">%s</a></li>\n' %(obj, _geoPageNameMap[obj] ) ) 1039 index_file.write(' </ul>\n' ) 1040 index_file.write(' <br/>\n' ) 1043 index_file.write(' </body>\n') 1044 index_file.write('</html>\n') 1047 #Copy the material budget menu file in the current geometry scenario 1048 processCmd('cp %s/index.html %s/%s/.' %(GeoScenario, opt.WWWAREA,GeoScenario) ) 1050 #html file for the menu of the individual materials 1051 index_file = open('%s/indimat/index.html'%(GeoScenario),'w') 1053 index_file.write('<html>\n') 1054 index_file.write(' <head>\n') 1055 index_file.write(' <title> <h2> HGCAL material budget results for individual materials for %s </h2> </title>\n' %(GeoScenario) ) 1056 index_file.write(' </head>\n') 1057 index_file.write(' <body>\n') 1058 index_file.write(' <h2> HGCAL material budget results for individual materials for %s </h2> \n' %(GeoScenario) ) 1059 for mats in _individualmaterials: 1061 #index_file.write(' <br/>\n' ) 1062 index_file.write(' <ul>\n' ) 1063 index_file.write(' <li><a href="%s/index.html">%s</a></li>\n' %(mats, _matPageNameMap[mats] ) ) 1064 index_file.write(' </ul>\n' ) 1065 #index_file.write(' <br/>\n' ) 1068 index_file.write(' </body>\n') 1069 index_file.write('</html>\n') 1072 #Copy the menu html file for the individual materials 1073 processCmd('cp %s/indimat/index.html %s/%s/indimat/.' %(GeoScenario, opt.WWWAREA,GeoScenario) ) 1075 #html file for all HGCal stack plots materials 1076 index_file = open('%s/allhgcal/index.html'%(GeoScenario),'w') 1078 index_file.write('<html>\n') 1079 index_file.write(' <head>\n') 1081 index_file.write(' <style>img.Reference{margin: 20px auto 20px auto; border: 10px solid green; border-radius: 10px;}img.New{margin: 20px auto 20px auto; border: 10px solid red; border-radius: 10px;} </style> \n') 1083 index_file.write(_hideShowFun["thestyle"]) 1085 index_file.write(' <title> <h2> HGCAL material budget results for all materials for %s </h2> </title>\n' %(GeoScenario) ) 1086 index_file.write(' </head>\n') 1087 index_file.write(' <body>\n') 1089 index_file.write(' <h2> HGCAL material budget results for : <span style="color:red;font-size:120%%" >All Materials </span></h2> \n' ) 1091 index_file.write('<p> %s plots have a green border followed by the %s plots which features a red border. </p>\n' % (GeoScenario.split("_")[0], GeoScenario.split("_")[2]) ) 1093 index_file.write('<h2> Geometry: <span style="color:green;" > %s</span>_vs_<span style="color:red;" >%s </span> </h2>\n' % (GeoScenario.split("_")[0], GeoScenario.split("_")[2]) ) 1095 index_file.write('<hr/>\n') 1097 index_file.write(_hideShowFun["divTabs"]) 1099 for region in ["_AllHGCAL", "_ZminusZoom", "_ZplusZoom"]: 1101 index_file.write('<div id="%s" class="tabcontent"> \n' %(region)) 1103 if region == "_AllHGCAL": pngnamestring = "" 1104 else: pngnamestring = region 1106 for allmatplot in _allmaterialsplots: 1107 if region == "_AllHGCAL": 1108 index_file.write('<p> %s <a href="../%s/%s%s.pdf" class="TMLlink">Click to enlarge %s plot</a></p>\n' %(_allmaterialsPlotsDesc[allmatplot], GeoScenario.split("_")[2],allmatplot,pngnamestring,GeoScenario.split("_")[2])) 1109 index_file.write('<img class="Reference" src="../%s/%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[0],allmatplot,pngnamestring) ) 1110 index_file.write('<img class="New" src="../%s/%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[2],allmatplot,pngnamestring)) 1111 index_file.write('<hr/>\n') 1112 elif region != "_AllHGCAL" and "HGCal_l_vs_z_vs_R" in allmatplot: 1113 index_file.write('<p> %s <a href="../%s/%s/%s%s.pdf" class="TMLlink">Click to enlarge %s plot</a></p>\n' %(_allmaterialsPlotsDesc[allmatplot], GeoScenario.split("_")[2],region.replace("_Zminus","ZMinus").replace("_Zplus","ZPlus"),allmatplot,pngnamestring,GeoScenario.split("_")[2])) 1114 index_file.write('<img class="Reference" src="../%s/%s/%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[0],region.replace("_Zminus","ZMinus").replace("_Zplus","ZPlus"),allmatplot,pngnamestring) ) 1115 index_file.write('<img class="New" src="../%s/%s/%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[2],region.replace("_Zminus","ZMinus").replace("_Zplus","ZPlus"),allmatplot,pngnamestring)) 1116 index_file.write('<hr/>\n') 1119 index_file.write('</div>\n') 1121 index_file.write(_hideShowFun["buttonandFunction"]) 1122 index_file.write(' </body>\n') 1123 index_file.write('</html>\n') 1126 #Copy all materials budget file 1127 processCmd('cp %s/allhgcal/index.html %s/%s/allhgcal/.' %(GeoScenario, opt.WWWAREA,GeoScenario) ) 1129 #html file of the individual materials for the material budget analysis 1130 for mats in _individualmaterials: 1131 index_file = open('%s/indimat/%s/index.html'%(GeoScenario,mats),'w') 1133 index_file.write('<html>\n') 1134 index_file.write(' <head>\n') 1136 index_file.write(' <style>img.Reference{margin: 20px auto 20px auto; border: 10px solid green; border-radius: 10px;}img.New{margin: 20px auto 20px auto; border: 10px solid red; border-radius: 10px;} </style> \n') 1138 index_file.write(_hideShowFun["thestyle"]) 1140 index_file.write(' <title> <h2> HGCAL material budget results for individual materials for %s </h2> </title>\n' %(GeoScenario) ) 1141 index_file.write(' </head>\n') 1142 index_file.write(' <body>\n') 1143 index_file.write(' <h2> HGCAL material budget results for : <span style="color:red;font-size:120%%" >%s </span></h2> \n' %(_matPageNameMap[mats]) ) 1145 index_file.write('<p> %s plots have a green border followed by the %s plots which features a red border. </p>\n' % (GeoScenario.split("_")[0], GeoScenario.split("_")[2]) ) 1147 index_file.write('<h2> Geometry: <span style="color:green;" > %s</span>_vs_<span style="color:red;" >%s </span> </h2>\n' % (GeoScenario.split("_")[0], GeoScenario.split("_")[2]) ) 1149 index_file.write('<hr/>\n') 1151 #-------------------------------------------------------------- 1152 #This one below is a solution using a table with 3 columns: 1153 #Two for the plots and the third for the text. 1155 #index_file.write('<table style=\'font-size:120%%\' border="1" cellspacing="1" cellpadding="0">\n') 1156 #index_file.write('<tbody>\n') 1158 #for indiplots in _individualmatplots: 1159 # index_file.write('<tr>\n') 1160 # index_file.write('<td> <img class="Reference" src="../../%s/%s/%s%s.png" width="375"/> </td>\n' %(GeoScenario.split("_")[0],mats,indiplots,mats) ) 1161 # index_file.write('<td> <img class="New" src="../../%s/%s/%s%s.png" width="375"/> </td>\n' %(GeoScenario.split("_")[2],mats,indiplots,mats)) 1162 # index_file.write('<td> %s <a href="../../%s/%s/%s%s.pdf" class="TMLlink">Click to enlarge %s plot</a></td>\n' %(_individualMatPlotsDesc[indiplots].replace("THEMAT",_matPageNameMap[mats]), GeoScenario.split("_")[2],mats,indiplots,mats,GeoScenario.split("_")[2])) 1163 # index_file.write('</tr>\n') 1166 #index_file.write('</tbody>\n') 1167 #index_file.write('</table>\n') 1168 #-------------------------------------------------------------- 1169 index_file.write(_hideShowFun["divTabs"]) 1171 #Individual material here for: All HGCAL, Zminus, Zplus 1172 for region in ["_AllHGCAL", "_ZminusZoom", "_ZplusZoom"]: 1173 #The hide/show button 1174 #index_file.write(_hideShowFun["buttonandFunction%s"%(region)]) 1176 index_file.write('<div id="%s" class="tabcontent"> \n' %(region)) 1178 if region == "_AllHGCAL": pngnamestring = "" 1179 else: pngnamestring = region 1180 for indiplots in _individualmatplots: 1181 if region == "_AllHGCAL": 1182 index_file.write('<p> %s <a href="../../%s/%s/%s%s%s.pdf" class="TMLlink">Click to enlarge %s plot</a></p>\n' %(_individualMatPlotsDesc[indiplots].replace("THEMAT",_matPageNameMap[mats]), GeoScenario.split("_")[2],mats,indiplots,mats,pngnamestring,GeoScenario.split("_")[2])) 1183 index_file.write('<img class="Reference" src="../../%s/%s/%s%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[0],mats,indiplots,mats,pngnamestring) ) 1184 index_file.write('<img class="New" src="../../%s/%s/%s%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[2],mats,indiplots,mats,pngnamestring)) 1185 index_file.write('<hr/>\n') 1187 index_file.write('<p> %s <a href="../../%s/%s/%s/%s%s%s.pdf" class="TMLlink">Click to enlarge %s plot</a></p>\n' %(_individualMatPlotsDesc[indiplots].replace("THEMAT",_matPageNameMap[mats]), GeoScenario.split("_")[2],mats,region.replace("_Zminus","ZMinus").replace("_Zplus","ZPlus"),indiplots,mats,pngnamestring,GeoScenario.split("_")[2])) 1188 index_file.write('<img class="Reference" src="../../%s/%s/%s/%s%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[0],mats,region.replace("_Zminus","ZMinus").replace("_Zplus","ZPlus"),indiplots,mats,pngnamestring) ) 1189 index_file.write('<img class="New" src="../../%s/%s/%s/%s%s%s.png" width="375"/> \n' %(GeoScenario.split("_")[2],mats,region.replace("_Zminus","ZMinus").replace("_Zplus","ZPlus"),indiplots,mats,pngnamestring)) 1190 index_file.write('<hr/>\n') 1193 index_file.write('</div>\n') 1195 index_file.write(_hideShowFun["buttonandFunction"]) 1196 index_file.write(' </body>\n') 1197 index_file.write('</html>\n') 1200 #Copy the individual materials budget file 1201 processCmd('cp %s/indimat/%s/index.html %s/%s/indimat/%s/.' %(GeoScenario, mats, opt.WWWAREA,GeoScenario,mats) ) 1203 #html file for from vertex up to muon stations 1204 index_file = open('%s/fromvertex/index.html'%(GeoScenario),'w') 1206 index_file.write('<html>\n') 1207 index_file.write(' <head>\n') 1209 index_file.write(' <style>img.Reference{margin: 20px auto 20px auto; border: 10px solid green; border-radius: 10px;}img.New{margin: 20px auto 20px auto; border: 10px solid red; border-radius: 10px;} </style> \n') 1211 index_file.write(_hideShowFun["thestyle"]) 1213 index_file.write(' <title> <h2> HGCAL material budget results from vertex up to in front of muon stations for %s </h2> </title>\n' %(GeoScenario) ) 1214 index_file.write(' </head>\n') 1215 index_file.write(' <body>\n') 1217 index_file.write(' <h2> HGCAL material budget results from vertex up to in front of muon stations: <span style="color:red;font-size:120%%" >All detectors </span></h2> \n' ) 1219 index_file.write('<p> %s plots have a green border followed by the %s plots which features a red border. </p>\n' % (GeoScenario.split("_")[0], GeoScenario.split("_")[2]) ) 1221 index_file.write('<h2> Geometry: <span style="color:green;" > %s</span>_vs_<span style="color:red;" >%s </span> </h2>\n' % (GeoScenario.split("_")[0], GeoScenario.split("_")[2]) ) 1223 index_file.write('<hr/>\n') 1225 #index_file.write(_hideShowFun["divTabs"]) 1227 for vertexplots in _fromvertexplots: 1228 index_file.write('<p> %s </p>\n' %(_fromVertexPlotsDesc[vertexplots])) 1229 index_file.write('<img class="Reference" src="%s/Figures/MaterialBdg_FromVertexToBackOf%s.png" width="375"/> \n' %(GeoScenario.split("_")[0],vertexplots) ) 1230 index_file.write('<img class="New" src="%s/Figures/MaterialBdg_FromVertexToBackOf%s.png" width="375"/> \n' %(GeoScenario.split("_")[2],vertexplots) ) 1231 index_file.write('<hr/>\n') 1233 #index_file.write(_hideShowFun["buttonandFunction"]) 1234 index_file.write(' </body>\n') 1235 index_file.write('</html>\n') 1238 #Copy all materials budget file 1239 processCmd('cp %s/fromvertex/index.html %s/%s/fromvertex/.' %(GeoScenario, opt.WWWAREA,GeoScenario) )
def replace(string, replacements)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
if(threadIdxLocalY==0 &&threadIdxLocalX==0)