CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
egammaObjectModificationsPatches_cff.py
Go to the documentation of this file.
2 
3 #electron mva ids
5 
6 #photon mva ids
9 
10 ele_mva_prod_name = 'electronMVAValueMapProducer'
11 pho_mva_prod_name = 'photonMVAValueMapProducer'
12 
13 def setup_mva(val_pset,cat_pset,prod_name,mva_name):
14  value_name = '%s:%sValues'%(prod_name,mva_name)
15  cat_name = '%s:%sCategories'%(prod_name,mva_name)
16  setattr( val_pset, '%sValues'%mva_name, cms.InputTag(value_name) )
17  setattr( cat_pset, '%sCategories'%mva_name, cms.InputTag(cat_name) )
18 
19 egamma_modifications = cms.VPSet(
20  cms.PSet( modifierName = cms.string('EGFull5x5ShowerShapeModifierFromValueMaps'),
21  photon_config = cms.PSet( photonSrc = cms.InputTag('slimmedPhotons',processName=cms.InputTag.skipCurrentProcess()),
22  sigmaIetaIeta = cms.InputTag('photonIDValueMapProducer:phoFull5x5SigmaIEtaIEta'),
23  e5x5 = cms.InputTag('photonIDValueMapProducer:phoFull5x5E5x5')
24  )
25  ),
26  cms.PSet( modifierName = cms.string('EGExtraInfoModifierFromFloatValueMaps'),
27  electron_config = cms.PSet( electronSrc = cms.InputTag('slimmedElectrons',processName=cms.InputTag.skipCurrentProcess())
28  ),
29  photon_config = cms.PSet( photonSrc = cms.InputTag('slimmedPhotons',processName=cms.InputTag.skipCurrentProcess()),
30  phoFull5x5SigmaIEtaIPhi = cms.InputTag('photonIDValueMapProducer:phoFull5x5SigmaIEtaIPhi'),
31  phoFull5x5E1x3 = cms.InputTag('photonIDValueMapProducer:phoFull5x5E1x3'),
32  phoFull5x5E2x2 = cms.InputTag('photonIDValueMapProducer:phoFull5x5E2x2'),
33  phoFull5x5E2x5Max = cms.InputTag('photonIDValueMapProducer:phoFull5x5E2x5Max'),
34  phoESEffSigmaRR = cms.InputTag('photonIDValueMapProducer:phoESEffSigmaRR'),
35  phoChargedIsolation = cms.InputTag('photonIDValueMapProducer:phoChargedIsolation'),
36  phoNeutralHadronIsolation = cms.InputTag('photonIDValueMapProducer:phoNeutralHadronIsolation'),
37  phoPhotonIsolation = cms.InputTag('photonIDValueMapProducer:phoPhotonIsolation'),
38  phoWorstChargedIsolation = cms.InputTag('photonIDValueMapProducer:phoWorstChargedIsolation')
39  )
40  ),
41  cms.PSet( modifierName = cms.string('EGExtraInfoModifierFromIntValueMaps'),
42  electron_config = cms.PSet( electronSrc = cms.InputTag('slimmedElectrons',processName=cms.InputTag.skipCurrentProcess())
43  ),
44  photon_config = cms.PSet( photonSrc = cms.InputTag('slimmedPhotons',processName=cms.InputTag.skipCurrentProcess())
45  )
46  )
47 )
48 
49 #setup the mva value maps to embed
50 setup_mva(egamma_modifications[1].electron_config,
51  egamma_modifications[2].electron_config,
52  ele_mva_prod_name,
53  ele_phys14_nt.mvaPhys14NonTrigClassName)
54 
55 setup_mva(egamma_modifications[1].photon_config,
56  egamma_modifications[2].photon_config,
57  pho_mva_prod_name,
58  pho_phys14_nt.mvaPhys14NonTrigClassName)
59 
60 setup_mva(egamma_modifications[1].photon_config,
61  egamma_modifications[2].photon_config,
62  pho_mva_prod_name,
63  pho_spring15_nt.mvaSpring15NonTrigClassName)