CMS 3D CMS Logo

Functions
switchMVAtoDB_cfi Namespace Reference

Functions

def switchMVAtoDB (process)
 

Detailed Description

Helper function to switch the MVA input to local root file from the sqlite DB

Function Documentation

def switchMVAtoDB_cfi.switchMVAtoDB (   process)
Contrary to its name, replace the MVA input by local root files for all MVA discriminators

   usage: add following 2 lines to your config file in order to execute this function:

      from RecoTauTag.Configuration.switchMVAtoDB_cfi import switchMVAtoDB
      process = switchMVAtoDB(process)

   The function takes no parameters. The names of the input root files are defined in 
   RecoTauTag/Configuration/python/switchMVAtoDB_cff.py (parameter inputFileName).

Definition at line 7 of file switchMVAtoDB_cfi.py.

References MassReplace.massSearchReplaceParam().

7 def switchMVAtoDB(process):
8  '''Contrary to its name, replace the MVA input by local root files for all MVA discriminators
9 
10  usage: add following 2 lines to your config file in order to execute this function:
11 
12  from RecoTauTag.Configuration.switchMVAtoDB_cfi import switchMVAtoDB
13  process = switchMVAtoDB(process)
14 
15  The function takes no parameters. The names of the input root files are defined in
16  RecoTauTag/Configuration/python/switchMVAtoDB_cff.py (parameter inputFileName).
17  '''
18 # process.load("RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi")
19  massSearchReplaceParam(getattr(process,"produceAndDiscriminateHPSPFTaus"),"loadMVAfromDB", cms.bool(True), cms.bool(False))
20  #muon discriminators
21  process.hpsPFTauDiscriminationByMVArawMuonRejection.mvaName = cms.string("againstMuonMVA")
22  process.hpsPFTauDiscriminationByMVArawMuonRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationAgainstMuonMVA.root')
23  massSearchReplaceParam(getattr(process,"produceAndDiscriminateHPSPFTaus"), "mvaOutput_normalization", cms.string("RecoTauTag_againstMuonMVAv1_mvaOutput_normalization"), cms.string("mvaOutput_normalization_opt2"))
24  process.hpsPFTauDiscriminationByMVALooseMuonRejection.mapping[0].cut = cms.string("opt2eff99_5")
25  process.hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("opt2eff99_0")
26  process.hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("opt2eff98_0")
27 
28  process.hpsPFTauDiscriminationByMVALooseMuonRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByMVAMuonRejection.root')
29  process.hpsPFTauDiscriminationByMVAMediumMuonRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByMVAMuonRejection.root')
30  process.hpsPFTauDiscriminationByMVATightMuonRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByMVAMuonRejection.root')
31 
32  #electron discriminators (MVA5)
33  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_woGwoGSF_EC = cms.string('gbr_woGwoGSF_EC')
34  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_woGwGSF_EC = cms.string('gbr_woGwGSF_EC')
35  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_wGwoGSF_EC = cms.string('gbr_wGwoGSF_EC')
36  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_wGwGSF_EC = cms.string('gbr_wGwGSF_EC')
37  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_woGwoGSF_BL = cms.string('gbr_woGwoGSF_BL')
38  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_woGwGSF_BL = cms.string('gbr_woGwGSF_BL')
39  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_wGwoGSF_BL = cms.string('gbr_wGwoGSF_BL')
40  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_wGwGSF_BL = cms.string('gbr_wGwGSF_BL')
41 
42  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_woGwoGSF_EC = cms.string('gbr_NoEleMatch_woGwoGSF_EC')
43  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_woGwGSF_EC = cms.string('gbr_NoEleMatch_woGwGSF_EC')
44  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_wGwoGSF_EC = cms.string('gbr_NoEleMatch_wGwoGSF_EC')
45  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_wGwGSF_EC = cms.string('gbr_NoEleMatch_wGwGSF_EC')
46  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_woGwoGSF_BL = cms.string('gbr_NoEleMatch_woGwoGSF_BL')
47  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_woGwGSF_BL = cms.string('gbr_NoEleMatch_woGwGSF_BL')
48  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_wGwoGSF_BL = cms.string('gbr_NoEleMatch_wGwoGSF_BL')
49  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_NoEleMatch_wGwGSF_BL = cms.string('gbr_NoEleMatch_wGwGSF_BL')
50 
51  process.hpsPFTauDiscriminationByMVA5rawElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationAgainstElectronMVA5.root')
52 
53  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[0].cut = cms.string("eff99cat0")
54  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[1].cut = cms.string("eff99cat1")
55  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[2].cut = cms.string("eff99cat2")
56  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[3].cut = cms.string("eff99cat3")
57  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[4].cut = cms.string("eff99cat4")
58  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[5].cut = cms.string("eff99cat5")
59  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[6].cut = cms.string("eff99cat6")
60  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[7].cut = cms.string("eff99cat7")
61  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[8].cut = cms.string("eff99cat8")
62  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[9].cut = cms.string("eff99cat9")
63  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[10].cut = cms.string("eff99cat10")
64  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[11].cut = cms.string("eff99cat11")
65  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[12].cut = cms.string("eff99cat12")
66  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[13].cut = cms.string("eff99cat13")
67  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[14].cut = cms.string("eff99cat14")
68  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.mapping[15].cut = cms.string("eff99cat15")
69 
70  process.hpsPFTauDiscriminationByMVA5VLooseElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root')
71 
72  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("eff96cat0")
73  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("eff96cat1")
74  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("eff96cat2")
75  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("eff96cat3")
76  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("eff96cat4")
77  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("eff96cat5")
78  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("eff96cat6")
79  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("eff96cat7")
80  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("eff96cat8")
81  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("eff96cat9")
82  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("eff96cat10")
83  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("eff96cat11")
84  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("eff96cat12")
85  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("eff96cat13")
86  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("eff96cat14")
87  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("eff96cat15")
88 
89  process.hpsPFTauDiscriminationByMVA5LooseElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root')
90 
91  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("eff91cat0")
92  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("eff91cat1")
93  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("eff91cat2")
94  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("eff91cat3")
95  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("eff91cat4")
96  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("eff91cat5")
97  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("eff91cat6")
98  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("eff91cat7")
99  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("eff91cat8")
100  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("eff91cat9")
101  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("eff91cat10")
102  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("eff91cat11")
103  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("eff91cat12")
104  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("eff91cat13")
105  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("eff91cat14")
106  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("eff91cat15")
107 
108  process.hpsPFTauDiscriminationByMVA5MediumElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root')
109 
110  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("eff85cat0")
111  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("eff85cat1")
112  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("eff85cat2")
113  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("eff85cat3")
114  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("eff85cat4")
115  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("eff85cat5")
116  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("eff85cat6")
117  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("eff85cat7")
118  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("eff85cat8")
119  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("eff85cat9")
120  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("eff85cat10")
121  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("eff85cat11")
122  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("eff85cat12")
123  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("eff85cat13")
124  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("eff85cat14")
125  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("eff85cat15")
126 
127  process.hpsPFTauDiscriminationByMVA5TightElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root')
128 
129  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("eff79cat0")
130  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("eff79cat1")
131  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("eff79cat2")
132  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("eff79cat3")
133  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("eff79cat4")
134  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("eff79cat5")
135  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("eff79cat6")
136  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("eff79cat7")
137  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("eff79cat8")
138  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("eff79cat9")
139  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("eff79cat10")
140  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("eff79cat11")
141  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("eff79cat12")
142  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("eff79cat13")
143  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("eff79cat14")
144  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("eff79cat15")
145 
146  process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root')
147 
148  #electron discriminators (MVA6)
149  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_woGwGSF_EC = cms.string('gbr_woGwGSF_EC')
150  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_wGwGSF_EC = cms.string('gbr_wGwGSF_EC')
151  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_woGwGSF_BL = cms.string('gbr_woGwGSF_BL')
152  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_wGwGSF_BL = cms.string('gbr_wGwGSF_BL')
153  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_woGwoGSF_EC = cms.string('gbr_NoEleMatch_woGwoGSF_EC')
154  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_wGwoGSF_EC = cms.string('gbr_NoEleMatch_wGwoGSF_EC')
155  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_woGwoGSF_BL = cms.string('gbr_NoEleMatch_woGwoGSF_BL')
156  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_wGwoGSF_BL = cms.string('gbr_NoEleMatch_wGwoGSF_BL')
157 
158  process.hpsPFTauDiscriminationByMVA6rawElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationAgainstElectronMVA6.root')
159 
160  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[0].cut = cms.string("eff99cat0")
161  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[1].cut = cms.string("eff99cat2")
162  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[2].cut = cms.string("eff99cat5")
163  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[3].cut = cms.string("eff99cat7")
164  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[4].cut = cms.string("eff99cat8")
165  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[5].cut = cms.string("eff99cat10")
166  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[6].cut = cms.string("eff99cat13")
167  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[7].cut = cms.string("eff99cat15")
168 
169  process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root')
170 
171  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("eff96cat0")
172  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("eff96cat2")
173  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("eff96cat5")
174  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("eff96cat7")
175  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("eff96cat8")
176  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("eff96cat10")
177  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("eff96cat13")
178  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("eff96cat15")
179 
180  process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root')
181 
182  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("eff91cat0")
183  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("eff91cat2")
184  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("eff91cat5")
185  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("eff91cat7")
186  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("eff91cat8")
187  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("eff91cat10")
188  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("eff91cat13")
189  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("eff91cat15")
190 
191  process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root')
192 
193  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("eff85cat0")
194  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("eff85cat2")
195  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("eff85cat5")
196  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("eff85cat7")
197  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("eff85cat8")
198  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("eff85cat10")
199  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("eff85cat13")
200  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("eff85cat15")
201 
202  process.hpsPFTauDiscriminationByMVA6TightElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root')
203 
204  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("eff79cat0")
205  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("eff79cat2")
206  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("eff79cat5")
207  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("eff79cat7")
208  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("eff79cat8")
209  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("eff79cat10")
210  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("eff79cat13")
211  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("eff79cat15")
212 
213  process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root')
214 
215  #isolation
216  process.hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.mvaName = cms.string("tauIdMVAoldDMwoLT")
217  massSearchReplaceParam(getattr(process,"produceAndDiscriminateHPSPFTaus"),"mvaOutput_normalization", cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"), cms.string("mvaOutput_normalization_oldDMwoLT"))
218  process.hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff90")
219  process.hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff80")
220  process.hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff70")
221  process.hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff60")
222  process.hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff50")
223  process.hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff40")
224 
225  process.hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_oldDMwoLT.root')
226  process.hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root')
227  process.hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root')
228  process.hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root')
229  process.hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root')
230  process.hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root')
231  process.hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root')
232 
233  process.hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw.mvaName = cms.string("tauIdMVAoldDMwLT")
234  massSearchReplaceParam(getattr(process,"produceAndDiscriminateHPSPFTaus"),"mvaOutput_normalization", cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"), cms.string("mvaOutput_normalization_oldDMwLT"))
235  process.hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff90")
236  process.hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff80")
237  process.hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff70")
238  process.hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff60")
239  process.hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff50")
240  process.hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff40")
241 
242  process.hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_oldDMwLT.root')
243  process.hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root')
244  process.hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root')
245  process.hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root')
246  process.hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root')
247  process.hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root')
248  process.hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root')
249 
250 
251  process.hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw.mvaName = cms.string("tauIdMVAnewDMwoLT")
252  massSearchReplaceParam(getattr(process,"produceAndDiscriminateHPSPFTaus"),"mvaOutput_normalization", cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"), cms.string("mvaOutput_normalization_newDMwoLT"))
253  process.hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff90")
254  process.hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff80")
255  process.hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff70")
256  process.hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff60")
257  process.hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff50")
258  process.hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff40")
259 
260  process.hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_newDMwoLT.root')
261  process.hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root')
262  process.hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root')
263  process.hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root')
264  process.hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root')
265  process.hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root')
266  process.hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root')
267 
268 
269  process.hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw.mvaName = cms.string("tauIdMVAnewDMwLT")
270  massSearchReplaceParam(getattr(process,"produceAndDiscriminateHPSPFTaus"),"mvaOutput_normalization", cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"), cms.string("mvaOutput_normalization_newDMwLT"))
271  process.hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff90")
272  process.hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff80")
273  process.hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff70")
274  process.hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff60")
275  process.hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff50")
276  process.hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff40")
277 
278  process.hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_newDMwLT.root')
279  process.hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root')
280  process.hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root')
281  process.hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root')
282  process.hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root')
283  process.hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root')
284  process.hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root')
285 
286 
287 
288 
289 
290  # if hasattr(process,'pfParticleSelectionSequence'):
291  # process.load("CommonTools.ParticleFlow.deltaBetaWeights_cff")
292  # process.pfParticleSelectionSequence += process.pfDeltaBetaWeightingSequence
293 
294  # if hasattr(process,'elPFIsoDepositNeutral'):
295  # process.elPFIsoDepositNeutral=isoDepositReplace('pfElectronTranslator:pf','pfWeightedNeutralHadrons')
296 
297  # if hasattr(process,'elPFIsoDepositGamma'):
298  # process.elPFIsoDepositGamma=isoDepositReplace('pfElectronTranslator:pf','pfWeightedPhotons')
299 
300  # if hasattr(process,'gedElPFIsoDepositNeutral'):
301  # process.gedElPFIsoDepositNeutral=isoDepositReplace('gedGsfElectronsTmp','pfWeightedNeutralHadrons')
302 
303  # if hasattr(process,'gedElPFIsoDepositGamma'):
304  # process.gedElPFIsoDepositGamma=isoDepositReplace('gedGsfElectronsTmp','pfWeightedPhotons')
305 
306  # if hasattr(process,'muPFIsoDepositNeutral'):
307  # process.muPFIsoDepositNeutral=isoDepositReplace('muons1stStep','pfWeightedNeutralHadrons')
308 
309  # if hasattr(process,'muPFIsoDepositGamma'):
310  # process.muPFIsoDepositGamma=isoDepositReplace('muons1stStep','pfWeightedPhotons')
311 
312  # if hasattr(process,'phPFIsoDepositNeutral'):
313  # process.phPFIsoDepositNeutral=isoDepositReplace('pfSelectedPhotons','pfWeightedNeutralHadrons')
314 
315  # if hasattr(process,'phPFIsoDepositGamma'):
316  # process.phPFIsoDepositGamma.ExtractorPSet.inputCandView = cms.InputTag("pfWeightedPhotons")
317 
318  return process
319 
320 
def massSearchReplaceParam(sequence, paramName, paramOldValue, paramValue, verbose=False)
Definition: MassReplace.py:117
def switchMVAtoDB(process)