1 import FWCore.ParameterSet.Config
as cms
2 from DQMServices.Core.DQMEDHarvester
import DQMEDHarvester
6 prefix =
'HGCAL/HGCalValidator/'
11 eff_layers = [
"effic_eta_layer{:02d} 'LayerCluster Efficiency vs #eta Layer{:02d} in z-' Num_CaloParticle_Eta_perlayer{:02d} Denom_CaloParticle_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "effic_eta_layer{:02d} 'LayerCluster Efficiency vs #eta Layer{:02d} in z+' Num_CaloParticle_Eta_perlayer{:02d} Denom_CaloParticle_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ]
12 eff_layers.extend([
"effic_phi_layer{:02d} 'LayerCluster Efficiency vs #phi Layer{:02d} in z-' Num_CaloParticle_Phi_perlayer{:02d} Denom_CaloParticle_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "effic_phi_layer{:02d} 'LayerCluster Efficiency vs #phi Layer{:02d} in z+' Num_CaloParticle_Phi_perlayer{:02d} Denom_CaloParticle_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
13 eff_layers.extend([
"duplicate_eta_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #eta Layer{:02d} in z-' NumDup_CaloParticle_Eta_perlayer{:02d} Denom_CaloParticle_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "duplicate_eta_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #eta Layer{:02d} in z+' NumDup_CaloParticle_Eta_perlayer{:02d} Denom_CaloParticle_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
14 eff_layers.extend([
"duplicate_phi_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #phi Layer{:02d} in z-' NumDup_CaloParticle_Phi_perlayer{:02d} Denom_CaloParticle_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "duplicate_phi_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #phi Layer{:02d} in z+' NumDup_CaloParticle_Phi_perlayer{:02d} Denom_CaloParticle_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
15 eff_layers.extend([
"fake_eta_layer{:02d} 'LayerCluster Fake Rate vs #eta Layer{:02d} in z-' Num_LayerCluster_Eta_perlayer{:02d} Denom_LayerCluster_Eta_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "fake_eta_layer{:02d} 'LayerCluster Fake Rate vs #eta Layer{:02d} in z+' Num_LayerCluster_Eta_perlayer{:02d} Denom_LayerCluster_Eta_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
16 eff_layers.extend([
"fake_phi_layer{:02d} 'LayerCluster Fake Rate vs #phi Layer{:02d} in z-' Num_LayerCluster_Phi_perlayer{:02d} Denom_LayerCluster_Phi_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "fake_phi_layer{:02d} 'LayerCluster Fake Rate vs #phi Layer{:02d} in z+' Num_LayerCluster_Phi_perlayer{:02d} Denom_LayerCluster_Phi_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
17 eff_layers.extend([
"merge_eta_layer{:02d} 'LayerCluster Merge Rate vs #eta Layer{:02d} in z-' NumMerge_LayerCluster_Eta_perlayer{:02d} Denom_LayerCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "merge_eta_layer{:02d} 'LayerCluster Merge Rate vs #eta Layer{:02d} in z+' NumMerge_LayerCluster_Eta_perlayer{:02d} Denom_LayerCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
18 eff_layers.extend([
"merge_phi_layer{:02d} 'LayerCluster Merge Rate vs #phi Layer{:02d} in z-' NumMerge_LayerCluster_Phi_perlayer{:02d} Denom_LayerCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "merge_phi_layer{:02d} 'LayerCluster Merge Rate vs #phi Layer{:02d} in z+' NumMerge_LayerCluster_Phi_perlayer{:02d} Denom_LayerCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
20 lcToCP_linking = hgcalValidator.label_LCToCPLinking._InputTag__moduleLabel
22 subDirs = cms.untracked.vstring(prefix + hgcalValidator.label_layerClusterPlots._InputTag__moduleLabel +
'/' + lcToCP_linking),
23 efficiency = cms.vstring(eff_layers),
24 resolution = cms.vstring(),
25 cumulativeDists = cms.untracked.vstring(),
26 noFlowDists = cms.untracked.vstring(),
27 outputFileName = cms.untracked.string(
""),
28 verbose = cms.untracked.uint32(4))
31 eff_simclusters = [
"effic_eta_layer{:02d} 'LayerCluster Efficiency vs #eta Layer{:02d} in z-' Num_SimCluster_Eta_perlayer{:02d} Denom_SimCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "effic_eta_layer{:02d} 'LayerCluster Efficiency vs #eta Layer{:02d} in z+' Num_SimCluster_Eta_perlayer{:02d} Denom_SimCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ]
32 eff_simclusters.extend([
"effic_phi_layer{:02d} 'LayerCluster Efficiency vs #phi Layer{:02d} in z-' Num_SimCluster_Phi_perlayer{:02d} Denom_SimCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "effic_phi_layer{:02d} 'LayerCluster Efficiency vs #phi Layer{:02d} in z+' Num_SimCluster_Phi_perlayer{:02d} Denom_SimCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
33 eff_simclusters.extend([
"duplicate_eta_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #eta Layer{:02d} in z-' NumDup_SimCluster_Eta_perlayer{:02d} Denom_SimCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "duplicate_eta_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #eta Layer{:02d} in z+' NumDup_SimCluster_Eta_perlayer{:02d} Denom_SimCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
34 eff_simclusters.extend([
"duplicate_phi_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #phi Layer{:02d} in z-' NumDup_SimCluster_Phi_perlayer{:02d} Denom_SimCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "duplicate_phi_layer{:02d} 'LayerCluster Duplicate(Split) Rate vs #phi Layer{:02d} in z+' NumDup_SimCluster_Phi_perlayer{:02d} Denom_SimCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
35 eff_simclusters.extend([
"fake_eta_layer{:02d} 'LayerCluster Fake Rate vs #eta Layer{:02d} in z-' Num_LayerCluster_in_SimCluster_Eta_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Eta_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "fake_eta_layer{:02d} 'LayerCluster Fake Rate vs #eta Layer{:02d} in z+' Num_LayerCluster_in_SimCluster_Eta_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Eta_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
36 eff_simclusters.extend([
"fake_phi_layer{:02d} 'LayerCluster Fake Rate vs #phi Layer{:02d} in z-' Num_LayerCluster_in_SimCluster_Phi_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Phi_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "fake_phi_layer{:02d} 'LayerCluster Fake Rate vs #phi Layer{:02d} in z+' Num_LayerCluster_in_SimCluster_Phi_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Phi_perlayer{:02d} fake".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
37 eff_simclusters.extend([
"merge_eta_layer{:02d} 'LayerCluster Merge Rate vs #eta Layer{:02d} in z-' NumMerge_LayerCluster_in_SimCluster_Eta_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "merge_eta_layer{:02d} 'LayerCluster Merge Rate vs #eta Layer{:02d} in z+' NumMerge_LayerCluster_in_SimCluster_Eta_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Eta_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
38 eff_simclusters.extend([
"merge_phi_layer{:02d} 'LayerCluster Merge Rate vs #phi Layer{:02d} in z-' NumMerge_LayerCluster_in_SimCluster_Phi_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
if (i<maxlayerzm)
else "merge_phi_layer{:02d} 'LayerCluster Merge Rate vs #phi Layer{:02d} in z+' NumMerge_LayerCluster_in_SimCluster_Phi_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Phi_perlayer{:02d}".
format(i, i%maxlayerzm+1, i, i)
for i
in range(maxlayerzp) ])
40 subdirsSim = [prefix + hgcalValidator.label_SimClusters._InputTag__moduleLabel +
'/ticlTracksters'+iteration+
'/' for iteration
in ticlIterLabelsMerge]
41 subdirsSim.extend([prefix + hgcalValidator.label_SimClusters._InputTag__moduleLabel +
'/ticlSimTracksters'])
43 subDirs = cms.untracked.vstring(subdirsSim),
44 efficiency = cms.vstring(eff_simclusters),
45 resolution = cms.vstring(),
46 cumulativeDists = cms.untracked.vstring(),
47 noFlowDists = cms.untracked.vstring(),
48 outputFileName = cms.untracked.string(
""),
49 verbose = cms.untracked.uint32(4))
54 simDict = {
"CaloParticle":
"_Link",
"SimTrackster":
"_PR"}
55 metrics = {
"purity":[
"Purity",
"_"],
"effic":[
"Efficiency",
"Eff_"],
"fake":[
"Fake Rate",
"_"],
"duplicate":[
"Duplicate(Split)",
"Dup_"],
"merge":[
"Merge Rate",
"Merge_"]}
56 variables = {
"eta":[
"#eta",
""],
"phi":[
"#phi",
""],
"energy":[
"energy",
" [GeV]"],
"pt":[
"p_{T}",
" [GeV]"]}
58 for m
in list(metrics.keys())[:2]:
61 eff_tracksters.extend([m+
"_"+v+simDict[elem]+
" 'Trackster "+metrics[m][0]+
" vs "+variables[v][0]+
"' Num"+metrics[m][1]+elem+
"_"+V+
" Denom_"+elem+
"_"+V])
62 for m
in list(metrics.keys())[2:]:
63 fakerate =
" fake" if (m ==
"fake")
else ""
66 eff_tracksters.extend([m+
"_"+v+simDict[elem]+
" 'Trackster "+metrics[m][0]+
" vs "+variables[v][0]+
"' Num"+metrics[m][1]+
"Trackster_"+V+simDict[elem]+
" Denom_Trackster_"+V+simDict[elem]+fakerate])
68 tsToCP_linking = hgcalValidator.label_TSToCPLinking.value()
69 subdirsTracksters = [prefix+
'ticlSimTracksters/'+tsToCP_linking, prefix+
'ticlSimTracksters_fromCPs/'+tsToCP_linking]
70 subdirsTracksters.extend(prefix+
'ticlTracksters'+iteration+
'/'+tsToCP_linking
for iteration
in ticlIterLabelsMerge)
72 tsToSTS_patternRec = hgcalValidator.label_TSToSTSPR.value()
73 subdirsTracksters.extend([prefix+
'ticlSimTracksters/'+tsToSTS_patternRec, prefix+
'ticlSimTracksters_fromCPs/'+tsToSTS_patternRec])
74 subdirsTracksters.extend(prefix+
'ticlTracksters'+iteration+
'/'+tsToSTS_patternRec
for iteration
in ticlIterLabelsMerge)
77 subDirs = cms.untracked.vstring(subdirsTracksters),
78 efficiency = cms.vstring(eff_tracksters),
79 resolution = cms.vstring(),
80 cumulativeDists = cms.untracked.vstring(),
81 noFlowDists = cms.untracked.vstring(),
82 outputFileName = cms.untracked.string(
""),
83 verbose = cms.untracked.uint32(4)
const uint16_t range(const Frame &aFrame)