5 antiElectronDiscrMVA_categories = {
6 '0' :
"gbr_NoEleMatch_woGwoGSF_BL",
7 '1' :
"gbr_NoEleMatch_woGwGSF_BL",
8 '2' :
"gbr_NoEleMatch_wGwoGSF_BL",
9 '3' :
"gbr_NoEleMatch_wGwGSF_BL",
10 '4' :
"gbr_woGwoGSF_BL",
11 '5' :
"gbr_woGwGSF_BL",
12 '6' :
"gbr_wGwoGSF_BL",
13 '7' :
"gbr_wGwGSF_BL",
14 '8' :
"gbr_NoEleMatch_woGwoGSF_EC",
15 '9' :
"gbr_NoEleMatch_woGwGSF_EC",
16 '10' :
"gbr_NoEleMatch_wGwoGSF_EC",
17 '11' :
"gbr_NoEleMatch_wGwGSF_EC",
18 '12' :
"gbr_woGwoGSF_EC",
19 '13' :
"gbr_woGwGSF_EC",
20 '14' :
"gbr_wGwoGSF_EC",
21 '15' :
"gbr_wGwGSF_EC"
24 antiElectronDiscrMVA_inputFileName = {
25 'GBRForest' :
"RecoTauTag/RecoTau/data/gbrDiscriminationAgainstElectronMVA5.root",
26 'TGraph' :
"RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root"
29 antiElectronDiscrMVA_WPs = [
"eff99",
"eff96",
"eff91",
"eff85",
"eff79" ]
31 antiElectronDiscrMVA_version =
"v1"
33 writeAntiElectronDiscrMVAs = cms.EDAnalyzer(
"GBRForestWriter",
36 writeAntiElectronDiscrWPs = cms.EDAnalyzer(
"TGraphWriter",
40 for category, gbrForestName
in antiElectronDiscrMVA_categories.items():
41 writeAntiElectronDiscrMVAs.jobs.append(
43 inputFileName = cms.FileInPath(antiElectronDiscrMVA_inputFileName[
'GBRForest']),
44 inputFileType = cms.string(
"GBRForest"),
45 gbrForestName = cms.string(gbrForestName),
46 outputFileType = cms.string(
"SQLLite"),
47 outputRecord = cms.string(
"RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA_version, gbrForestName))
50 for WP
in antiElectronDiscrMVA_WPs:
51 writeAntiElectronDiscrWPs.jobs.append(
53 inputFileName = cms.FileInPath(antiElectronDiscrMVA_inputFileName[
'TGraph']),
54 graphName = cms.string(
"%scat%s" % (WP, category)),
55 outputRecord = cms.string(
"RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA_version, gbrForestName, WP))
59 writeAntiElectronDiscrSequence = cms.Sequence(writeAntiElectronDiscrMVAs + writeAntiElectronDiscrWPs)