CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
egammaObjectModificationsInMiniAOD_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #electron mva ids
6 
8 
9 #photon mva ids
12 
13 ele_mva_prod_name = 'electronMVAValueMapProducer'
14 pho_mva_prod_name = 'photonMVAValueMapProducer'
15 
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) )
21 
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')
29  )
30  ),
31  cms.PSet( modifierName = cms.string('EGExtraInfoModifierFromIntValueMaps'),
32  electron_config = cms.PSet( ),
33  photon_config = cms.PSet( )
34  )
35 )
36 
37 #setup the mva value maps to embed
38 setup_mva(egamma_modifications[0].electron_config,
39  egamma_modifications[1].electron_config,
40  ele_mva_prod_name,
41  ele_spring15_nt.mvaSpring15NonTrigClassName+ele_spring15_nt.mvaTag)
42 
43 setup_mva(egamma_modifications[0].electron_config,
44  egamma_modifications[1].electron_config,
45  ele_mva_prod_name,
46  ele_spring15_50_t.mvaSpring15TrigClassName+ele_spring15_50_t.mvaTag)
47 
48 setup_mva(egamma_modifications[0].electron_config,
49  egamma_modifications[1].electron_config,
50  ele_mva_prod_name,
51  ele_spring15_25_t.mvaSpring15TrigClassName+ele_spring15_25_t.mvaTag)
52 
53 setup_mva(egamma_modifications[0].photon_config,
54  egamma_modifications[1].photon_config,
55  pho_mva_prod_name,
56  pho_spring15_25_nt.mvaSpring15NonTrigClassName+pho_spring15_25_nt.mvaTag)
57 
58 setup_mva(egamma_modifications[0].photon_config,
59  egamma_modifications[1].photon_config,
60  pho_mva_prod_name,
61  pho_spring15_50_nt.mvaSpring15NonTrigClassName+pho_spring15_50_nt.mvaTag)
62 
63 #############################################################
64 # REGRESSION MODIFIERS
65 #############################################################
66 
67 #from RecoEgamma.EgammaTools.regressionModifier_cfi import *
68 
69 #egamma_modifications.append( regressionModifier )