test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
switchMVAtoDB_cfi Namespace Reference

Functions

def switchMVAtoDB
 

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 helpers.massSearchReplaceParam().

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