1 import FWCore.ParameterSet.Config
as cms
13 ele_mva_prod_name =
'electronMVAValueMapProducer' 14 pho_mva_prod_name =
'photonMVAValueMapProducer' 16 def setup_mva(val_pset,cat_pset,prod_name,mva_name):
17 value_name =
'%s:%sValues'%(prod_name,mva_name)
18 cat_name =
'%s:%sCategories'%(prod_name,mva_name)
19 setattr( val_pset,
'%sValues'%mva_name, cms.InputTag(value_name) )
20 setattr( cat_pset,
'%sCategories'%mva_name, cms.InputTag(cat_name) )
22 egamma_modifications = cms.VPSet(
23 cms.PSet( modifierName = cms.string(
'EGExtraInfoModifierFromFloatValueMaps'),
24 electron_config = cms.PSet( ),
25 photon_config = cms.PSet( phoChargedIsolation = cms.InputTag(
'photonIDValueMapProducer:phoChargedIsolation'),
26 phoNeutralHadronIsolation = cms.InputTag(
'photonIDValueMapProducer:phoNeutralHadronIsolation'),
27 phoPhotonIsolation = cms.InputTag(
'photonIDValueMapProducer:phoPhotonIsolation'),
28 phoWorstChargedIsolation = cms.InputTag(
'photonIDValueMapProducer:phoWorstChargedIsolation')
31 cms.PSet( modifierName = cms.string(
'EGExtraInfoModifierFromIntValueMaps'),
32 electron_config = cms.PSet( ),
33 photon_config = cms.PSet( )
38 setup_mva(egamma_modifications[0].electron_config,
39 egamma_modifications[1].electron_config,
41 ele_spring15_nt.mvaSpring15NonTrigClassName+ele_spring15_nt.mvaTag)
43 setup_mva(egamma_modifications[0].electron_config,
44 egamma_modifications[1].electron_config,
46 ele_spring15_50_t.mvaSpring15TrigClassName+ele_spring15_50_t.mvaTag)
48 setup_mva(egamma_modifications[0].electron_config,
49 egamma_modifications[1].electron_config,
51 ele_spring15_25_t.mvaSpring15TrigClassName+ele_spring15_25_t.mvaTag)
53 setup_mva(egamma_modifications[0].photon_config,
54 egamma_modifications[1].photon_config,
56 pho_spring15_25_nt.mvaSpring15NonTrigClassName+pho_spring15_25_nt.mvaTag)
58 setup_mva(egamma_modifications[0].photon_config,
59 egamma_modifications[1].photon_config,
61 pho_spring15_50_nt.mvaSpring15NonTrigClassName+pho_spring15_50_nt.mvaTag)
def setup_mva(val_pset, cat_pset, prod_name, mva_name)