1 import FWCore.ParameterSet.Config
as cms
4 from PhysicsTools.NanoAOD.nanoDQM_cfi
import nanoDQM
8 from Configuration.StandardSequences.Eras
import eras
9 _vplots80X = nanoDQM.vplots.clone()
11 _tauPlots80X = cms.VPSet()
12 for plot
in _vplots80X.Tau.plots:
13 if plot.name.value().
find(
"MVA")>-1
and plot.name.value().
find(
"2017")>-1:
15 _tauPlots80X.append(plot)
16 _tauPlots80X.append(
Plot1D(
'idMVAnewDM',
'idMVAnewDM', 64, -0.5, 63.5,
'IsolationMVArun2v1DBnewDMwLT ID working point: bitmask 1 = VLoose, 2 = Loose, 4 = Medium, 8 = Tight, 16 = VTight, 32 = VVTight'))
17 _tauPlots80X.append(
Plot1D(
'idMVAoldDMdR03',
'idMVAoldDMdR03', 64, -0.5, 63.5,
'IsolationMVArun2v1DBdR03oldDMwLT ID working point: bitmask 1 = VLoose, 2 = Loose, 4 = Medium, 8 = Tight, 16 = VTight, 32 = VVTight'))
18 _tauPlots80X.append(
Plot1D(
'rawMVAnewDM',
'rawMVAnewDM', 20, -1, 1,
'byIsolationMVArun2v1DBnewDMwLT raw output discriminator'))
19 _tauPlots80X.append(
Plot1D(
'rawMVAoldDMdR03',
'rawMVAoldDMdR03', 20, -1, 1,
'byIsolationMVArun2v1DBdR03oldDMwLT raw output discriminator'))
20 _vplots80X.Tau.plots = _tauPlots80X
21 eras.run2_miniAOD_80XLegacy.toModify(nanoDQM,
25 _METFixEE2017_DQMentry = nanoDQM.vplots.MET.clone()
26 _METFixEE2017_plots = cms.VPSet()
27 for plot
in _METFixEE2017_DQMentry.plots:
28 if plot.name.value().
find(
"fiducial")>-1:
continue 29 _METFixEE2017_plots.append(plot)
30 _METFixEE2017_DQMentry.plots = _METFixEE2017_plots
31 for modifier
in eras.run2_nanoAOD_94XMiniAODv1, eras.run2_nanoAOD_94XMiniAODv2:
32 modifier.toModify(nanoDQM.vplots, METFixEE2017 = _METFixEE2017_DQMentry)
34 _Electron_plots_with_eCorr = copy.deepcopy(nanoDQM.vplots.Electron.plots)
35 _Electron_plots_with_eCorr.append(
Plot1D(
'eCorr',
'eCorr', 20, 0.8, 1.2,
'ratio of the calibrated energy/miniaod energy'))
37 _Electron_plots_with_eCorr_2016 = copy.deepcopy(_Electron_plots_with_eCorr)
38 _Electron_plots_with_eCorr_2016.append(
Plot1D(
'cutBased_HLTPreSel',
'cutBased_HLTPreSel', 2, -0.5, 1.5,
'cut-based HLT pre-selection ID'))
39 _Electron_plots_with_eCorr_2016.append(
Plot1D(
'cutBased_Spring15',
'cutBased_Spring15', 5, -0.5, 4.5,
'cut-based Spring15 ID (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)'))
40 _Electron_plots_with_eCorr_2016.append(
Plot1D(
'mvaSpring16GP',
'mvaSpring16GP', 20, -1, 1,
'MVA Spring16 general-purpose ID score'))
41 _Electron_plots_with_eCorr_2016.append(
Plot1D(
'mvaSpring16GP_WP80',
'mvaSpring16GP_WP80', 2, -0.5, 1.5,
'MVA Spring16 general-purpose ID WP80'))
42 _Electron_plots_with_eCorr_2016.append(
Plot1D(
'mvaSpring16GP_WP90',
'mvaSpring16GP_WP90', 2, -0.5, 1.5,
'MVA Spring16 general-purpose ID WP90'))
43 _Electron_plots_with_eCorr_2016.append(
Plot1D(
'mvaSpring16HZZ',
'mvaSpring16HZZ', 20, -1, 1,
'MVA Spring16 HZZ ID score'))
44 _Electron_plots_with_eCorr_2016.append(
Plot1D(
'mvaSpring16HZZ_WPL',
'mvaSpring16HZZ_WPL', 2, -0.5, 1.5,
'MVA Spring16 HZZ ID loose WP'))
45 _Electron_plots_with_eCorr_2016.append(
NoPlot(
'vidNestedWPBitmapSpring15'))
47 _Photon_plots_with_eCorr = copy.deepcopy(nanoDQM.vplots.Photon.plots)
48 _Photon_plots_with_eCorr.append(
Plot1D(
'eCorr',
'eCorr', 20, 0.8, 1.2,
'ratio of the calibrated energy/miniaod energy'))
50 _Photon_plots_with_eCorr_2016 = copy.deepcopy(_Photon_plots_with_eCorr)
51 _Photon_plots_with_eCorr_2016.append(
Plot1D(
'cutBased',
'cutBased', 4, -0.5, 3.5,
'cut-based Spring16-V2p2 ID (0:fail, 1::loose, 2:medium, 3:tight)'))
52 _Photon_plots_with_eCorr_2016.append(
Plot1D(
'cutBased17Bitmap',
'cutBased17Bitmap', 8, -0.5, 7.5,
'cut-based Fall17-94X-V1 ID bitmap, 2^(0:loose, 1:medium, 2:tight)'))
53 _Photon_plots_with_eCorr_2016.append(
Plot1D(
'mvaID17',
'mvaID17', 20, -1, 1,
'MVA Fall17v1p1 ID score'))
54 _Photon_plots_with_eCorr_2016.append(
Plot1D(
'mvaID17_WP80',
'mvaID17_WP80', 2, -0.5, 1.5,
'MVA Fall17v1p1 ID WP80'))
55 _Photon_plots_with_eCorr_2016.append(
Plot1D(
'mvaID17_WP90',
'mvaID17_WP90', 2, -0.5, 1.5,
'MVA Fall17v1p1 ID WP90'))
57 _FatJet_plots_80x = copy.deepcopy(nanoDQM.vplots.FatJet.plots)
58 _FatJet_plots_80x.append(
Plot1D(
'msoftdrop_chs',
'msoftdrop_chs', 20, -300, 300,
'Legacy uncorrected soft drop mass with CHS'))
60 _Flag_plots_80x = copy.deepcopy(nanoDQM.vplots.Flag.plots)
61 _Flag_plots_80x.append(
Plot1D(
'BadGlobalMuon',
'BadGlobalMuon', 2, -0.5, 1.5,
'Bad muon flag'))
62 _Flag_plots_80x.append(
Plot1D(
'CloneGlobalMuon',
'CloneGlobalMuon', 2, -0.5, 1.5,
'Clone muon flag'))
64 for modifier
in eras.run2_nanoAOD_94XMiniAODv1, eras.run2_nanoAOD_94XMiniAODv2:
65 modifier.toModify(nanoDQM.vplots.Electron, plots = _Electron_plots_with_eCorr)
66 modifier.toModify(nanoDQM.vplots.Photon, plots = _Photon_plots_with_eCorr)
67 for modifier
in eras.run2_miniAOD_80XLegacy, eras.run2_nanoAOD_94X2016:
68 modifier.toModify(nanoDQM.vplots.Electron, plots = _Electron_plots_with_eCorr_2016)
69 modifier.toModify(nanoDQM.vplots.Photon, plots = _Photon_plots_with_eCorr_2016)
70 eras.run2_miniAOD_80XLegacy.toModify(nanoDQM.vplots.FatJet, plots = _FatJet_plots_80x)
71 eras.run2_miniAOD_80XLegacy.toModify(nanoDQM.vplots.Flag, plots = _Flag_plots_80x)
73 eras.run2_miniAOD_80XLegacy.toModify(nanoDQM.vplots, IsoTrack =
None)
76 nanoDQMMC = nanoDQM.clone()
77 nanoDQMMC.vplots.Electron.sels.Prompt = cms.string(
"genPartFlav == 1")
78 nanoDQMMC.vplots.Muon.sels.Prompt = cms.string(
"genPartFlav == 1")
79 nanoDQMMC.vplots.Photon.sels.Prompt = cms.string(
"genPartFlav == 1")
80 nanoDQMMC.vplots.Tau.sels.Prompt = cms.string(
"genPartFlav == 5")
81 nanoDQMMC.vplots.Jet.sels.Prompt = cms.string(
"genJetIdx != 1")
82 nanoDQMMC.vplots.Jet.sels.PromptB = cms.string(
"genJetIdx != 1 && hadronFlavour == 5")
84 nanoDQMQTester = cms.EDAnalyzer(
"QualityTester",
85 qtList = cms.untracked.FileInPath(
'PhysicsTools/NanoAOD/test/dqmQualityTests.xml'),
86 prescaleFactor = cms.untracked.int32(1),
87 testInEventloop = cms.untracked.bool(
False),
88 qtestOnEndLumi = cms.untracked.bool(
False),
89 verboseQT = cms.untracked.bool(
True)
92 nanoHarvest = cms.Sequence( nanoDQMQTester )
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)