1 import FWCore.ParameterSet.Config
as cms
8 from PhysicsTools.NanoAOD.nanoDQM_cfi
import nanoDQM
11 from RecoEgamma.EgammaIsolationAlgos.superclusValueMapProducer_cfi
import superclusValueMaps
13 customElectronFilterBits = cms.PSet(
14 doc = cms.string(
"PixelMatched e/gamma"),
16 sel = cms.string(
"type(92) && pt > 7 && (coll('hltEgammaCandidates') || coll('hltEgammaCandidatesUnseeded')) && (filter('*PixelMatchFilter') || filter('*PixelMatchUnseededFilter'))"),
17 l1seed = cms.string(
"type(-98)"), l1deltaR = cms.double(0.3),
18 skipObjectsNotPassingQualityBits = cms.bool(
True),
19 qualityBits = cms.VPSet(
21 mksel(
"filter('hltEGL1SingleEGOrFilter')",
"1e WPTight L1T match"),
22 mksel(
"filter('hltEG30L1SingleEGOrEtFilter')",
"1e WPTight Et"),
23 mksel(
"filter('hltEle30WPTightClusterShapeFilter')",
"1e WPTight SigmaIeIe"),
24 mksel(
"filter('hltEle30WPTightHEFilter')",
"1e WPTight HoE"),
25 mksel(
"filter('hltEle30WPTightEcalIsoFilter')",
"1e WPTight ECAL Iso"),
26 mksel(
"filter('hltEle30WPTightHcalIsoFilter')",
"1e WPTight HCAL Iso"),
27 mksel(
"filter('hltEle30WPTightPixelMatchFilter')",
"1e WPTight Pixel match"),
28 mksel(
"filter('hltEle30WPTightPMS2Filter')",
"1e WPTight S2"),
29 mksel(
"filter('hltEle30WPTightGsfOneOEMinusOneOPFilter')",
"1e WPTight 1/E-1/p"),
30 mksel(
"filter('hltEle30WPTightGsfMissingHitsFilter')",
"1e WPTight missing hits"),
31 mksel(
"filter('hltEle30WPTightGsfDetaFilter')",
"1e WPTight DEta"),
32 mksel(
"filter('hltEle30WPTightGsfDphiFilter')",
"1e WPTight DPhi"),
33 mksel(
"filter('hltEle30WPTightGsfTrackIsoFilter')",
"1e WPTight Track Iso"),
35 mksel(
"filter('hltEGL1SingleAndDoubleEGOrPairFilter')",
"2e L1T match"),
36 mksel(
"filter('hltEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg1Filter')",
"2e Track Iso Leg1"),
37 mksel(
"filter('hltEle23Ele12CaloIdLTrackIdLIsoVLTrackIsoLeg2Filter')",
"2e Track Iso Leg2"),
39 mksel(
"filter('hltEGL1SingleAndDoubleEGNonIsoOrWithEG26WithJetAndTauFilter')",
"2e (CaloIdL_MW) L1T match"),
40 mksel(
"filter('hltEle33CaloIdLPixelMatchFilter')",
"2e (CaloIdL_MW) Pixel match Leg1"),
41 mksel(
"filter('hltEle33CaloIdLMWPMS2Filter')",
"2e (CaloIdL_MW) S2"),
42 mksel(
"filter('hltDiEle33CaloIdLMWPMS2UnseededFilter')",
"2e (CaloIdL_MW unseeded) S2"),
44 mksel(
"filter('hltEG200HEFilter')",
"1e Photon200"),
46 mksel(
"filter('hltEG50EBEtFilter')",
"1e Photon50EB"),
48 mksel(
"filter('hltEle16Ele12Ele8CaloIdLTrackIdLDphiLeg3Filter')",
"3e Leg3"),
50 mksel(
"filter('hltMu*TrkIsoVVLEle23CaloIdLTrackIdLIsoVLElectronlegTrackIsoFilter')",
"1mu-1e eLeg"),
52 mksel(
"filter('hltEle24erWPTightGsfTrackIsoFilterForTau')",
"1e-1tau eLeg"),
54 mksel(
"filter('hltEle115CaloIdVTGsfTrkIdTGsfDphiFilter')",
"1e high pT noIso"),
58 customPhotonFilterBits = cms.PSet(
60 sel = cms.string(
"type(92) && pt > 15 && coll('hltEgammaCandidates')"),
61 l1seed = cms.string(
"type(-98)"), l1deltaR = cms.double(0.3),
62 skipObjectsNotPassingQualityBits = cms.bool(
True),
63 qualityBits = cms.VPSet(
65 mksel(
"filter('hltEG50EBEtFilter')",
"Photon50EB"),
67 mksel(
"filter('hltEG120HEFilter')",
"Photon120"),
68 mksel(
"filter('hltEG150HEFilter')",
"Photon150"),
69 mksel(
"filter('hltEG175HEFilter')",
"Photon175"),
70 mksel(
"filter('hltEG200HEFilter')",
"Photon200"),
72 mksel(
"filter('hltHtEcal800')",
"ECAL HT800"),
74 mksel(
"filter('hltEG110EBTightIDTightIsoTrackIsoFilter')",
"Photon110EB Tight"),
76 mksel(
"filter('hltMu17Photon30IsoCaloIdPhotonlegTrackIsoFilter')",
"1mu-1photon"),
78 mksel(
"filter('hltEG30LR9Id85b90eHE12R9Id50b80eR9IdLastFilter')",
"diPhoton 30_22 R9ID"),
79 mksel(
"filter('hltEG30LIso60CaloId15b35eHE12R9Id50b80eEcalIsoLastFilter')",
"diPhoton 30_22 ECALIso"),
80 mksel(
"filter('hltEG22R9Id85b90eHE12R9Id50b80eR9UnseededLastFilter')",
"diPhoton 30_22 unseeded R9ID"),
81 mksel(
"filter('hltEG22Iso60CaloId15b35eHE12R9Id50b80eTrackIsoUnseededLastFilter')",
"diPhoton 30_22 unseeded TrackIso"),
85 superclusterTable = cms.EDProducer(
"SimpleSuperclusterFlatTableProducer",
86 src = cms.InputTag(
"reducedEgamma",
"reducedSuperClusters"),
87 name = cms.string(
"Supercluster"),
88 doc = cms.string(
"Supercluster collection"),
90 energy =
Var(
"energy()",float,doc=
"supercluster energy",precision=10),
91 eta =
Var(
"eta()",float,doc=
"supercluster eta",precision=10),
92 phi =
Var(
"phi()",float,doc=
"supercluster phi",precision=10),
93 rawEnergy =
Var(
"rawEnergy()",float,doc=
"sum of basic clusters energy",precision=10),
94 preshowerEnergy =
Var(
"preshowerEnergy()",float,doc=
"sum of energy in preshower",precision=10),
95 etaWidth =
Var(
"etaWidth()",float,doc=
"supercluster eta width",precision=10),
96 phiWidth =
Var(
"etaWidth()",float,doc=
"supercluster phi width",precision=10),
97 seedClusEnergy =
Var(
"seed().energy()",float,doc=
"seed cluster energy",precision=10),
98 seedClusterEta =
Var(
"seed().eta()",float,doc=
"seed cluster eta",precision=10),
99 seedClusterPhi =
Var(
"seed().phi()",float,doc=
"seed cluster phi",precision=10),
101 externalVariables = cms.PSet(
102 trkIso =
ExtVar(
"superclusValueMaps:superclusTkIso",float,doc=
"supercluster track iso within 0.06 < dR < 0.4 & |dEta| > 0.03",precision=10),
108 process.photonTable.variables.setValue(_phoVarsExtra.parameters_())
109 process.triggerObjectTable.selections.Photon = customPhotonFilterBits
111 process.nanoDQM.vplots.Photon.plots = _Photon_extra_plots
113 process.electronTable.variables.setValue(_eleVarsExtra.parameters_())
114 process.triggerObjectTable.selections.Electron = customElectronFilterBits
116 process.nanoDQM.vplots.Electron.plots = _Electron_extra_plots
119 process.superclusValueMaps = superclusValueMaps
120 process.superclusterTable = superclusterTable
122 process.superclusterTask = cms.Task(process.superclusValueMaps)
123 process.superclusterTask.add(process.superclusterTable)
124 process.nanoTableTaskCommon.add(process.superclusterTask)
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
def ExtVar(tag, valtype, doc=None, precision=-1)
def addExtraEGammaVarsCustomize(process)
def mksel(selection, doc=None, bit=None)