Skip to content

Commit

Permalink
Merge pull request #21427 from makortel/trackingValidation_v12
Browse files Browse the repository at this point in the history
Add duplicate rate vs. sim PV z, and update plotting
  • Loading branch information
cmsbuild committed Dec 13, 2017
2 parents 8a28371 + e8d4f00 commit dba5ef8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 20 deletions.
Expand Up @@ -227,7 +227,7 @@ class MTVHistoProducerAlgoForTracker {

std::vector<MonitorElement*> h_reco_dzpvcut_pt, h_assoc_dzpvcut_pt, h_assoc2_dzpvcut_pt, h_simul_dzpvcut_pt, h_simul2_dzpvcut_pt, h_pileup_dzpvcut_pt;
std::vector<MonitorElement*> h_reco_dzpvsigcut_pt, h_assoc_dzpvsigcut_pt, h_assoc2_dzpvsigcut_pt, h_simul_dzpvsigcut_pt, h_simul2_dzpvsigcut_pt, h_pileup_dzpvsigcut_pt;
std::vector<MonitorElement*> h_reco_simpvz, h_assoc_simpvz, h_assoc2_simpvz, h_simul_simpvz, h_pileup_simpvz;
std::vector<MonitorElement*> h_reco_simpvz, h_assoc_simpvz, h_assoc2_simpvz, h_simul_simpvz, h_looper_simpvz, h_pileup_simpvz;

std::vector<MonitorElement*> h_reco_seedingLayerSet, h_assoc2_seedingLayerSet, h_looper_seedingLayerSet, h_pileup_seedingLayerSet;

Expand Down
1 change: 1 addition & 0 deletions Validation/RecoTrack/python/PostProcessorTracker_cfi.py
Expand Up @@ -129,6 +129,7 @@

"effic_vs_simpvz 'Efficiency vs. sim PV z' num_assoc(simToReco)_simpvz num_simul_simpvz",
"fakerate_vs_simpvz 'Fake rate vs. sim PV z' num_assoc(recoToSim)_simpvz num_reco_simpvz fake",
"duplicatesRate_simpvz 'Duplicates Rate vs sim PV z' num_duplicate_simpvz num_reco_simpvz",
"pileuprate_simpvz 'Pileup rate vs. sim PV z' num_pileup_simpvz num_reco_simpvz",

"fakerate_vs_mva1 'Fake rate vs. MVA1' num_assoc(recoToSim)_mva1 num_reco_mva1 fake",
Expand Down
50 changes: 33 additions & 17 deletions Validation/RecoTrack/python/plotting/trackingPlots.py
Expand Up @@ -32,6 +32,8 @@
_maxPixelLayers = 8
_min3DLayers = [0, 5, 10]
_max3DLayers = [5, 10, 20]
_minZ = [-60, -40, -20, -10, -5]
_maxZ = [5, 10, 20, 40, 60]
_minPU = [0, 10, 20, 50, 100, 150]
_maxPU = [20, 50, 65, 80, 100, 150, 200, 250]
_minMaxTracks = [0, 200, 500, 1000, 1500, 2000]
Expand Down Expand Up @@ -204,13 +206,18 @@ def _makeMVAPlots(num, hp=False):
legendDy=_legendDy_4rows
)
_common = {"ymin": 0, "ymax": _maxEff}
_effandfakePosDeltaRPU = PlotGroup("effandfakePosDeltaRPU",
_makeEffFakeDupPlots("vertpos", "vert r", "cm", fakeopts=dict(xtitle="track ref. point r (cm)", ytitle="fake+duplicates vs. r"), common=dict(xlog=True)) +
_makeEffFakeDupPlots("zpos" , "vert z", "cm", fakeopts=dict(xtitle="track ref. point z (cm)", ytitle="fake+duplicates vs. z")) +
_makeEffFakeDupPlots("dr" , "#DeltaR", effopts=dict(xtitle="TP min #DeltaR"), fakeopts=dict(xtitle="track min #DeltaR"), common=dict(xlog=True)) +
_makeEffFakeDupPlots("pu" , "PU" , common=dict(xtitle="Pileup", xmin=_minPU, xmax=_maxPU)),
legendDy=_legendDy_4rows
_effandfakePos = PlotGroup("effandfakePos",
_makeEffFakeDupPlots("vertpos", "vert r", "cm", fakeopts=dict(xtitle="track ref. point r (cm)", ytitle="fake+duplicates vs. r"), common=dict(xlog=True)) +
_makeEffFakeDupPlots("zpos" , "vert z", "cm", fakeopts=dict(xtitle="track ref. point z (cm)", ytitle="fake+duplicates vs. z")) +
_makeEffFakeDupPlots("simpvz" , "Sim. PV z", "cm", common=dict(xtitle="Sim. PV z (cm)", xmin=_minZ, xmax=_maxZ))
)
_effandfakeDeltaRPU = PlotGroup("effandfakeDeltaRPU",
_makeEffFakeDupPlots("dr" , "#DeltaR", effopts=dict(xtitle="TP min #DeltaR"), fakeopts=dict(xtitle="track min #DeltaR"), common=dict(xlog=True)) +
_makeEffFakeDupPlots("pu" , "PU" , common=dict(xtitle="Pileup", xmin=_minPU, xmax=_maxPU)),
legendDy=_legendDy_2rows
)


_algos_common = dict(removeEmptyBins=True, xbinlabelsize=10, xbinlabeloption="d")
_duplicateAlgo = PlotOnSideGroup("duplicateAlgo", Plot("duplicates_oriAlgo_vs_oriAlgo", drawStyle="COLZ", adjustMarginLeft=0.1, adjustMarginRight=0.1, **_algos_common))

Expand Down Expand Up @@ -243,12 +250,16 @@ def _makeMVAPlots(num, hp=False):
_makeFakeDupPileupPlots("3Dlayer" , "3D layers" , common=dict(xmin=_min3DLayers, xmax=_max3DLayers)),
ncols=3, legendDy=_legendDy_4rows
)
_dupandfakePosDeltaRPU = PlotGroup("dupandfakePosDeltaRPU",
_makeFakeDupPileupPlots("vertpos", "r", "cm", xquantity="ref. point r (cm)", common=dict(xlog=True)) +
_makeFakeDupPileupPlots("zpos" , "z", "cm", xquantity="ref. point z (cm)") +
_makeFakeDupPileupPlots("dr" , "#DeltaR", xquantity="min #DeltaR", common=dict(xlog=True)) +
_makeFakeDupPileupPlots("pu" , "PU" , xtitle="Pileup", common=dict(xmin=_minPU, xmax=_maxPU)),
ncols=3, legendDy=_legendDy_4rows
_dupandfakePos = PlotGroup("dupandfakePos",
_makeFakeDupPileupPlots("vertpos", "r", "cm", xquantity="ref. point r (cm)", common=dict(xlog=True)) +
_makeFakeDupPileupPlots("zpos" , "z", "cm", xquantity="ref. point z (cm)") +
_makeFakeDupPileupPlots("simpvz" , "Sim. PV z", xtitle="Sim. PV z (cm)", common=dict(xmin=_minZ, xmax=_maxZ)),
ncols=3,
)
_dupandfakeDeltaRPU = PlotGroup("dupandfakeDeltaRPU",
_makeFakeDupPileupPlots("dr" , "#DeltaR", xquantity="min #DeltaR", common=dict(xlog=True)) +
_makeFakeDupPileupPlots("pu" , "PU" , xtitle="Pileup", common=dict(xmin=_minPU, xmax=_maxPU)),
ncols=3, legendDy=_legendDy_2rows_3cols
)
_seedingLayerSet_common = dict(removeEmptyBins=True, xbinlabelsize=8, xbinlabeloption="d", adjustMarginRight=0.1)
_dupandfakeSeedingPlots = _makeFakeDupPileupPlots("seedingLayerSet", "seeding layers", xtitle="", common=_seedingLayerSet_common)
Expand Down Expand Up @@ -411,8 +422,9 @@ def _makeMVAPlots(num, hp=False):
_extDistPosDeltaR = PlotGroup("distPosDeltaR",
_makeDistPlots("vertpos", "ref. point r (cm)", common=dict(xlog=True)) +
_makeDistPlots("zpos" , "ref. point z (cm)") +
_makeDistPlots("simpvz" , "Sim. PV z (cm)", common=dict(xmin=_minZ, xmax=_maxZ)) +
_makeDistPlots("dr" , "min #DeltaR", common=dict(xlog=True)),
ncols=4
ncols=4, legendDy=_legendDy_4rows,
)
_extDistSeedingPlots = _makeDistPlots("seedingLayerSet", "seeding layers", common=dict(xtitle="", **_seedingLayerSet_common))
_extDistChi2Seeding = PlotGroup("distChi2Seeding",
Expand Down Expand Up @@ -477,8 +489,9 @@ def _makeMVAPlots(num, hp=False):
_extDistSimPosDeltaR = PlotGroup("distsimPosDeltaR",
_makeDistSimPlots("vertpos", "vert r (cm)", common=dict(xlog=True)) +
_makeDistSimPlots("zpos" , "vert z (cm)") +
_makeDistSimPlots("simpvz" , "Sim. PV z (cm)", common=dict(xmin=_minZ, xmax=_maxZ)) +
_makeDistSimPlots("dr" , "min #DeltaR", common=dict(xlog=True)),
ncols=2
ncols=2, legendDy=_legendDy_4rows,
)

########################################
Expand Down Expand Up @@ -1166,15 +1179,17 @@ def _trackingFolders(lastDirName="Track"):
_effandfakeDxyDzBS,
_effandfakeDxyDzPV,
_effandfakeHitsLayers,
_effandfakePosDeltaRPU,
_effandfakePos,
_effandfakeDeltaRPU,
_duplicateAlgo,
]
_recoBasedPlots = [
_dupandfakePtEtaPhi,
_dupandfakeDxyDzBS,
_dupandfakeDxyDzPV,
_dupandfakeHitsLayers,
_dupandfakePosDeltaRPU,
_dupandfakePos,
_dupandfakeDeltaRPU,
_dupandfakeChi2Seeding,
_dupandfakeSeedingTable,
_pvassociation1,
Expand All @@ -1193,7 +1208,8 @@ def _trackingFolders(lastDirName="Track"):
_dupandfakeDxyDzBS,
_dupandfakeDxyDzPV,
_dupandfakeHitsLayers,
_dupandfakePosDeltaRPU,
_dupandfakePos,
_dupandfakeDeltaRPU,
_dupandfakeChi2Seeding,
_dupandfakeSeedingTable,
_hitsAndPt,
Expand Down
4 changes: 4 additions & 0 deletions Validation/RecoTrack/python/plotting/validation.py
Expand Up @@ -308,6 +308,10 @@
"CMSSW_9_4_0_pre3_phase1": {"default": "94X_mc2017_realistic_v4",
"fullsim_25ns_PU50": "94X_mc2017_realistic_v4_highPU_AVE50",
"Design": "94X_mc2017_design_IdealBS_v4"},
"CMSSW_9_4_0": {"default": "94X_mcRun2_asymptotic_v0"},
"CMSSW_9_4_0_phase1": {"default": "94X_mc2017_realistic_v10",
"fullsim_25ns_PU50": "94X_mc2017_realistic_v10_highPU_AVE50",
"Design": "94X_mc2017_design_IdealBS_v5"},
}

_releasePostfixes = ["_AlcaCSA14", "_PHYS14", "_TEST", "_v2", "_v3", "_pmx", "_Fall14DR", "_FIXGT", "_PU", "_PXbest", "_PXworst", "_hcal", "_tec", "_71XGENSIM", "_73XGENSIM", "_BS", "_GenSim_7113", "_extended",
Expand Down
4 changes: 4 additions & 0 deletions Validation/RecoTrack/src/MTVHistoProducerAlgoForTracker.cc
Expand Up @@ -571,6 +571,7 @@ void MTVHistoProducerAlgoForTracker::bookRecoHistos(DQMStore::IBooker& ibook, bo

h_reco_simpvz.push_back( ibook.book1D("num_reco_simpvz", "N of reco track vs. sim PV z", nintPVz, minPVz, maxPVz) );
h_assoc2_simpvz.push_back( ibook.book1D("num_assoc(recoToSim)_simpvz", "N of associated tracks (recoToSim) vs. sim PV z", nintPVz, minPVz, maxPVz) );
h_looper_simpvz.push_back( ibook.book1D("num_duplicate_simpvz", "N of associated (recoToSim) looper tracks vs. sim PV z", nintPVz, minPVz, maxPVz) );
h_pileup_simpvz.push_back( ibook.book1D("num_pileup_simpvz", "N of associated (recoToSim) pileup tracks vs. sim PV z", nintPVz, minPVz, maxPVz) );

h_recochi2.push_back( ibook.book1D("num_reco_chi2","N of reco track vs normalized #chi^{2}",nintChi2,minChi2,maxChi2) );
Expand Down Expand Up @@ -1243,6 +1244,9 @@ void MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(int count,
fillPlotNoFlow(h_looperdxypvzoomed[count], dxypv);
fillPlotNoFlow(h_looperdzpvzoomed[count], dzpv);
}
if(simPVPosition) {
h_looper_simpvz[count]->Fill(simpvz);
}
}
fillPlotNoFlow(h_looperhit[count], nhits);
fillPlotNoFlow(h_looperlayer[count], nlayers);
Expand Down
4 changes: 2 additions & 2 deletions Validation/RecoTrack/test/trackingPerformanceValidation.py
Expand Up @@ -9,10 +9,10 @@
########### User Defined Variables (BEGIN) ##############

### Reference release
RefRelease='CMSSW_9_4_0_pre2_phase1'
RefRelease='CMSSW_9_4_0_pre3_phase1'

### Relval release (set if different from $CMSSW_VERSION)
NewRelease='CMSSW_9_4_0_pre3_phase1'
NewRelease='CMSSW_9_4_0_phase1'

### This is the list of IDEAL-conditions relvals
startupsamples_run1 = [
Expand Down

0 comments on commit dba5ef8

Please sign in to comment.