1 import FWCore.ParameterSet.Config
as cms
6 process = cms.Process(
"ElectronMVANtuplizer")
8 process.load(
"FWCore.MessageService.MessageLogger_cfi")
9 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
11 process.GlobalTag =
GlobalTag(process.GlobalTag,
'auto:run2_mc',
'')
14 mvaVariablesFile =
"RecoEgamma/ElectronIdentification/data/ElectronIDVariables.txt" 16 outputFile =
"electron_ntuple.root" 18 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
20 process.source = cms.Source(
"PoolSource",
21 fileNames = cms.untracked.vstring(
22 '/store/mc/RunIIFall17MiniAOD/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/MINIAODSIM/RECOSIMstep_94X_mc2017_realistic_v10-v1/00000/0293A280-B5F3-E711-8303-3417EBE33927.root' 32 dataFormat = DataFormat.AOD
34 dataFormat = DataFormat.MiniAOD
40 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V2_cff',
41 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V2_cff',
42 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V1_cff',
43 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V1_cff',
47 for idmod
in my_id_modules:
50 process.ntuplizer = cms.EDAnalyzer(
'ElectronMVANtuplizer',
52 src = cms.InputTag(
'gedGsfElectrons'),
53 vertices = cms.InputTag(
'offlinePrimaryVertices'),
54 pileup = cms.InputTag(
'addPileupInfo'),
55 genParticles = cms.InputTag(
'genParticles'),
57 srcMiniAOD = cms.InputTag(
'slimmedElectrons'),
58 verticesMiniAOD = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
59 pileupMiniAOD = cms.InputTag(
'slimmedAddPileupInfo'),
60 genParticlesMiniAOD = cms.InputTag(
'prunedGenParticles'),
62 eleMVAs = cms.untracked.vstring(
63 "egmGsfElectronIDs:mvaEleID-Fall17-noIso-V2-wp80",
64 "egmGsfElectronIDs:mvaEleID-Fall17-noIso-V2-wpLoose",
65 "egmGsfElectronIDs:mvaEleID-Fall17-noIso-V2-wp90",
66 "egmGsfElectronIDs:mvaEleID-Fall17-iso-V2-wpHZZ",
67 "egmGsfElectronIDs:mvaEleID-Fall17-iso-V2-wp80",
68 "egmGsfElectronIDs:mvaEleID-Fall17-iso-V2-wpLoose",
69 "egmGsfElectronIDs:mvaEleID-Fall17-iso-V2-wp90",
70 "egmGsfElectronIDs:mvaEleID-Fall17-noIso-V1-wp90",
71 "egmGsfElectronIDs:mvaEleID-Fall17-noIso-V1-wp80",
72 "egmGsfElectronIDs:mvaEleID-Fall17-noIso-V1-wpLoose",
73 "egmGsfElectronIDs:mvaEleID-Fall17-iso-V1-wp90",
74 "egmGsfElectronIDs:mvaEleID-Fall17-iso-V1-wp80",
75 "egmGsfElectronIDs:mvaEleID-Fall17-iso-V1-wpLoose",
77 eleMVALabels = cms.untracked.vstring(
79 "Fall17noIsoV2wpLoose",
87 "Fall17noIsoV1wpLoose",
92 eleMVAValMaps = cms.untracked.vstring(
93 "electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17NoIsoV2Values",
94 "electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17NoIsoV2RawValues",
95 "electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17IsoV2Values",
96 "electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17IsoV2RawValues",
97 "electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17IsoV1Values",
98 "electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17NoIsoV1Values",
100 eleMVAValMapLabels = cms.untracked.vstring(
102 "Fall17NoIsoV2RawVals",
104 "Fall17IsoV2RawVals",
108 eleMVACats = cms.untracked.vstring(
109 "electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17NoIsoV1Categories",
111 eleMVACatLabels = cms.untracked.vstring(
115 variableDefinition = cms.string(mvaVariablesFile),
116 isMC = cms.bool(
True),
117 deltaR = cms.double(0.1),
120 process.TFileService = cms.Service(
"TFileService",
121 fileName = cms.string( outputFile )
124 process.p = cms.Path(process.egmGsfElectronIDSequence * process.ntuplizer)