CMS 3D CMS Logo

PileupJetIDParams_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 
4 
5 full_81x_chs = cms.PSet(
6  impactParTkThreshold = cms.double(1.),
7  cutBased = cms.bool(False),
8  etaBinnedWeights = cms.bool(True),
9  tmvaMethod = cms.string("JetIDMVAHighPt"),
10  version = cms.int32(-1),
11  nEtaBins = cms.int32(4),
12  trainings = cms.VPSet(
13  cms.PSet(
14  jEtaMin = cms.double(0.),
15  jEtaMax = cms.double(2.5),
16  tmvaWeights = cms.FileInPath("RecoJets/JetProducers/data/pileupJetId_80XvarFix_Eta0to2p5_BDT.weights.xml.gz"),
17  tmvaVariables = cms.vstring(
18  "nvtx",
19  "dR2Mean" ,
20  "nParticles" ,
21  "nCharged" ,
22  "majW" ,
23  "minW",
24  "frac01" ,
25  "frac02" ,
26  "frac03" ,
27  "frac04" ,
28  "ptD" ,
29  "beta" ,
30  "pull" ,
31  "jetR" ,
32  "jetRchg" ,
33  )
34  ),
35  cms.PSet(
36  jEtaMin = cms.double(2.5),
37  jEtaMax = cms.double(2.75),
38  tmvaWeights = cms.FileInPath("RecoJets/JetProducers/data/pileupJetId_80XvarFix_Eta2p5to2p75_BDT.weights.xml.gz"),
39  tmvaVariables = cms.vstring(
40  "nvtx",
41  "dR2Mean" ,
42  "nParticles" ,
43  "nCharged" ,
44  "majW" ,
45  "minW",
46  "frac01" ,
47  "frac02" ,
48  "frac03" ,
49  "frac04" ,
50  "ptD" ,
51  "beta" ,
52  "pull" ,
53  "jetR" ,
54  "jetRchg" ,
55  )
56  ),
57  cms.PSet(
58  jEtaMin = cms.double(2.75),
59  jEtaMax = cms.double(3.),
60  tmvaWeights = cms.FileInPath("RecoJets/JetProducers/data/pileupJetId_80XvarFix_Eta2p75to3_BDT.weights.xml.gz"),
61  tmvaVariables = cms.vstring(
62  "nvtx",
63  "dR2Mean" ,
64  "nParticles" ,
65  "nCharged" ,
66  "majW" ,
67  "minW",
68  "frac01" ,
69  "frac02" ,
70  "frac03" ,
71  "frac04" ,
72  "ptD" ,
73  "beta" ,
74  "pull" ,
75  "jetR" ,
76  "jetRchg" ,
77  )
78  ),
79  cms.PSet(
80  jEtaMin = cms.double(3.),
81  jEtaMax = cms.double(5.),
82  tmvaWeights = cms.FileInPath("RecoJets/JetProducers/data/pileupJetId_80XvarFix_Eta3to5_BDT.weights.xml.gz"),
83  tmvaVariables = cms.vstring(
84  "nvtx",
85  "dR2Mean" ,
86  "nParticles" ,
87  "majW" ,
88  "minW",
89  "frac01" ,
90  "frac02" ,
91  "frac03" ,
92  "frac04" ,
93  "ptD" ,
94  "pull" ,
95  "jetR" ,
96  )
97  ),
98  ),
99  tmvaSpectators = cms.vstring(
100  "jetPt" ,
101  "jetEta" ,
102  ),
103  JetIdParams = full_81x_chs_wp,
104  label = cms.string("full")
105 )
106 
107 
108 trainingVariables_102X_Eta0To3 = [
109  "nvtx" ,
110  "beta" ,
111  "dR2Mean" ,
112  "frac01" ,
113  "frac02" ,
114  "frac03" ,
115  "frac04" ,
116  "majW" ,
117  "minW" ,
118  "jetR" ,
119  "jetRchg" ,
120  "nParticles",
121  "nCharged" ,
122  "ptD" ,
123  "pull" ,
124  ]
125 trainingVariables_102X_Eta3To5 = list(trainingVariables_102X_Eta0To3)
126 trainingVariables_102X_Eta3To5.remove('beta')
127 trainingVariables_102X_Eta3To5.remove('jetRchg')
128 trainingVariables_102X_Eta3To5.remove('nCharged')
129 
130 
131 full_102x_chs = full_81x_chs.clone(
132  JetIdParams = full_102x_chs_wp,
133  trainings = {0: dict(tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta0p0To2p5_chs_BDT.weights.xml.gz",
134  tmvaVariables = trainingVariables_102X_Eta0To3),
135  1: dict(tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta2p5To2p75_chs_BDT.weights.xml.gz",
136  tmvaVariables = trainingVariables_102X_Eta0To3),
137  2: dict(tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta2p75To3p0_chs_BDT.weights.xml.gz",
138  tmvaVariables = trainingVariables_102X_Eta0To3),
139  3: dict(tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta3p0To5p0_chs_BDT.weights.xml.gz",
140  tmvaVariables = trainingVariables_102X_Eta3To5)
141  }
142 )
143 
144 
145 full_94x_chs = full_102x_chs.clone(JetIdParams = full_94x_chs_wp)
146 for train in full_94x_chs.trainings:
147  train.tmvaWeights = train.tmvaWeights.value().replace("102X", "94X")
148 
149 
150 full_106x_UL17_chs = full_102x_chs.clone(JetIdParams = full_106x_UL17_chs_wp)
151 for train in full_106x_UL17_chs.trainings:
152  train.tmvaWeights = train.tmvaWeights.value().replace("102X", "UL17")
153 
154 
155 full_106x_UL18_chs = full_106x_UL17_chs.clone(JetIdParams = full_106x_UL18_chs_wp)
156 for train in full_106x_UL18_chs.trainings:
157  train.tmvaWeights = train.tmvaWeights.value().replace("UL17", "UL18")
158 
159 
160 full_106x_UL16_chs = full_106x_UL17_chs.clone(JetIdParams = full_106x_UL16_chs_wp)
161 for train in full_106x_UL16_chs.trainings:
162  train.tmvaWeights = train.tmvaWeights.value().replace("UL17", "UL16")
163 
164 
165 full_106x_UL16APV_chs = full_106x_UL17_chs.clone(JetIdParams = full_106x_UL16APV_chs_wp)
166 for train in full_106x_UL16APV_chs.trainings:
167  train.tmvaWeights = train.tmvaWeights.value().replace("UL17", "UL16APV")
168 
169 
170 cutbased = cms.PSet(
171  impactParTkThreshold = cms.double(1.),
172  cutBased = cms.bool(True),
173  JetIdParams = EmptyCutBased_wp,
174  label = cms.string("cutbased")
175 )
PileupJetIDCutParams_cfi
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444