1 import FWCore.ParameterSet.Config
as cms
8 mvaClassName =
"ElectronMVAEstimatorRun2" 14 mvaProducerModuleLabel =
"electronMVAValueMapProducer" 17 mvaVariablesFile =
"RecoEgamma/ElectronIdentification/data/ElectronMVAEstimatorRun2Variables.txt" 18 mvaVariablesFileRun3 =
"RecoEgamma/ElectronIdentification/data/ElectronIDVariablesRun3.txt" 19 mvaVariablesFileRun3NonIso =
"RecoEgamma/ElectronIdentification/data/ElectronIDVariablesRun3NonIso.txt" 25 EleMVA_3CategoriesCuts = [
26 "abs(superCluster.eta) < 0.800",
27 "abs(superCluster.eta) >= 0.800 && abs(superCluster.eta) < 1.479",
28 "abs(superCluster.eta) >= 1.479" 31 EleMVA_6CategoriesCuts = [
32 "pt < 10. && abs(superCluster.eta) < 0.800",
33 "pt < 10. && abs(superCluster.eta) >= 0.800 && abs(superCluster.eta) < 1.479",
34 "pt < 10. && abs(superCluster.eta) >= 1.479",
35 "pt >= 10. && abs(superCluster.eta) < 0.800",
36 "pt >= 10. && abs(superCluster.eta) >= 0.800 && abs(superCluster.eta) < 1.479",
37 "pt >= 10. && abs(superCluster.eta) >= 1.479",
46 This is a container class to hold MVA cut values for a n-category MVA 47 as well as the names of the value maps that contain the MVA values computed 48 for all particles in a producer upstream. 50 IMPORTANT: the cuts need to be given in alphabetical order, which must 51 be the order in which they are used by the cut class. 60 self.
mvaValueMapName = mvaProducerModuleLabel +
":" + mvaClassName + mvaTag +
"Values" 67 return [self.
cuts[key]
for key
in keylist]
71 This is a container class to hold MVA cut values for a n-category MVA 72 as well as the names of the value maps that contain the MVA values computed 73 for all particles in a producer upstream. 75 IMPORTANT: the cuts need to be given in alphabetical order, which must 76 be the order in which they are used by the cut class. 85 self.
mvaValueMapName = mvaProducerModuleLabel +
":" + mvaClassName + mvaTag +
"RawValues" 92 return [self.
cuts[key]
for key
in keylist]
100 This function configures the full cms.PSet for a VID ID and returns it. 101 The inputs: an object of the class EleMVA_WP or similar 102 that contains all necessary parameters for this MVA. 106 idName = cms.string( mvaWP.idName ),
108 cms.PSet( cutName = cms.string(cutName),
109 mvaCuts = cms.vstring( mvaWP.getCutStrings() ),
110 mvaValueMapName = cms.InputTag( mvaWP.mvaValueMapName ),
111 mvaCategoriesMapName = cms.InputTag( mvaWP.mvaCategoriesMapName ),
112 needsAdditionalProducts = cms.bool(
True),
113 isIgnored = cms.bool(
False)