1 import FWCore.ParameterSet.Config
as cms
8 mvaClassName =
"ElectronMVAEstimatorRun2" 14 mvaProducerModuleLabel =
"electronMVAValueMapProducer" 17 mvaVariablesFile =
"RecoEgamma/ElectronIdentification/data/ElectronMVAEstimatorRun2Variables.txt" 23 EleMVA_3CategoriesCuts = cms.vstring(
24 "abs(superCluster.eta) < 0.800",
25 "abs(superCluster.eta) >= 0.800 && abs(superCluster.eta) < 1.479",
26 "abs(superCluster.eta) >= 1.479" 29 EleMVA_6CategoriesCuts = cms.vstring(
30 "pt < 10. && abs(superCluster.eta) < 0.800",
31 "pt < 10. && abs(superCluster.eta) >= 0.800 && abs(superCluster.eta) < 1.479",
32 "pt < 10. && abs(superCluster.eta) >= 1.479",
33 "pt >= 10. && abs(superCluster.eta) < 0.800",
34 "pt >= 10. && abs(superCluster.eta) >= 0.800 && abs(superCluster.eta) < 1.479",
35 "pt >= 10. && abs(superCluster.eta) >= 1.479",
44 This is a container class to hold MVA cut values for a n-category MVA 45 as well as the names of the value maps that contain the MVA values computed 46 for all particles in a producer upstream. 48 IMPORTANT: the cuts need to be given in alphabetical order, which must 49 be the order in which they are used by the cut class. 58 self.
mvaValueMapName = mvaProducerModuleLabel +
":" + mvaClassName + mvaTag +
"Values" 64 keylist = sorted(self.cuts.keys())
65 return [self.
cuts[key]
for key
in keylist]
69 This is a container class to hold MVA cut values for a n-category MVA 70 as well as the names of the value maps that contain the MVA values computed 71 for all particles in a producer upstream. 73 IMPORTANT: the cuts need to be given in alphabetical order, which must 74 be the order in which they are used by the cut class. 83 self.
mvaValueMapName = mvaProducerModuleLabel +
":" + mvaClassName + mvaTag +
"RawValues" 89 keylist = self.cuts.keys()
91 return [self.
cuts[key]
for key
in keylist]
99 This function configures the full cms.PSet for a VID ID and returns it. 100 The inputs: an object of the class EleMVA_WP or similar 101 that contains all necessary parameters for this MVA. 105 idName = cms.string( mvaWP.idName ),
107 cms.PSet( cutName = cms.string(cutName),
108 mvaCuts = cms.vstring( mvaWP.getCutStrings() ),
109 mvaValueMapName = cms.InputTag( mvaWP.mvaValueMapName ),
110 mvaCategoriesMapName = cms.InputTag( mvaWP.mvaCategoriesMapName ),
111 needsAdditionalProducts = cms.bool(
True),
112 isIgnored = cms.bool(
False)