54 |
|
#define ELECTRON_TIGHT_ISOMVA_CUT_BIN4 0.531 |
55 |
|
#define ELECTRON_TIGHT_ISOMVA_CUT_BIN5 0.493 |
56 |
|
|
57 |
< |
#define ELECTRON_REFERENCE_PFISO_CUT 0.25 |
58 |
< |
#define MUON_REFERENCE_PFISO_CUT 0.25 |
57 |
> |
|
58 |
> |
// |
59 |
> |
// optimization test |
60 |
> |
// |
61 |
> |
#define ELECTRON_LOOSE_ISOMVA_CUT_OPT_BIN0 0.385 |
62 |
> |
#define ELECTRON_LOOSE_ISOMVA_CUT_OPT_BIN1 -0.083 |
63 |
> |
#define ELECTRON_LOOSE_ISOMVA_CUT_OPT_BIN2 -0.573 |
64 |
> |
#define ELECTRON_LOOSE_ISOMVA_CUT_OPT_BIN3 0.413 |
65 |
> |
#define ELECTRON_LOOSE_ISOMVA_CUT_OPT_BIN4 0.271 |
66 |
> |
#define ELECTRON_LOOSE_ISOMVA_CUT_OPT_BIN5 0.135 |
67 |
> |
|
68 |
> |
#ifdef MUONISO_WP0 |
69 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 0.03735 |
70 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 0.86195 |
71 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.15025 |
72 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 0.87945 |
73 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.88455 |
74 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.90835 |
75 |
> |
#elif MUONISO_WP1 |
76 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.19505 |
77 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 0.77445 |
78 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.46945 |
79 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 0.64635 |
80 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.93635 |
81 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.96505 |
82 |
> |
#elif MUONISO_WP2 |
83 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.33995 |
84 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 0.60785 |
85 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.52125 |
86 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 0.54135 |
87 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.97765 |
88 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.97485 |
89 |
> |
#elif MUONISO_WP3 |
90 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.42045 |
91 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 0.37195 |
92 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.59335 |
93 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 0.41045 |
94 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.98465 |
95 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.98185 |
96 |
> |
#elif MUONISO_WP4 |
97 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.48065 |
98 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 0.26765 |
99 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.64095 |
100 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 0.14865 |
101 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.98675 |
102 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.98815 |
103 |
> |
#elif MUONISO_WP5 |
104 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.52195 |
105 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 0.12905 |
106 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.68715 |
107 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 0.00305 |
108 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.99165 |
109 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.99235 |
110 |
> |
#elif MUONISO_WP6 |
111 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.60315 |
112 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 -0.13415 |
113 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.75855 |
114 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 -0.18805 |
115 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.99235 |
116 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.99445 |
117 |
> |
#elif MUONISO_WP7 |
118 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.65565 |
119 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 -0.34345 |
120 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.79985 |
121 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 -0.31475 |
122 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.99445 |
123 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.99655 |
124 |
> |
#elif MUONISO_WP8 |
125 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.70535 |
126 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 -0.39945 |
127 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.82645 |
128 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 -0.64865 |
129 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.99515 |
130 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.99795 |
131 |
> |
#elif MUONISO_WP9 |
132 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.79145 |
133 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 -0.74245 |
134 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.89085 |
135 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 -0.78585 |
136 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.99725 |
137 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.99865 |
138 |
> |
#else |
139 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN0 -0.5934 |
140 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN1 0.3374 |
141 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN2 -0.7666 |
142 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN3 0.4102 |
143 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN4 -0.989 |
144 |
> |
#define MUON_ISOMVA_LOOSE_FORPFID_CUT_OPT_BIN5 -0.9946 |
145 |
> |
#endif |
146 |
> |
|
147 |
> |
/* #define ELECTRON_REFERENCE_PFISO_CUT 0.25 */ |
148 |
> |
/* #define MUON_REFERENCE_PFISO_CUT 0.25 */ |
149 |
> |
#define ELECTRON_REFERENCE_PFISO_CUT 0.4 |
150 |
> |
#define MUON_REFERENCE_PFISO_CUT 0.4 |
151 |
|
|
152 |
|
Float_t computePFMuonIso(const mithep::Muon *muon, |
153 |
< |
const mithep::Vertex & vtx, |
153 |
> |
const mithep::Vertex * vtx, |
154 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
155 |
|
const Double_t dRMax); |
156 |
|
|
157 |
|
Float_t computePFEleIso(const mithep::Electron *electron, |
158 |
< |
const mithep::Vertex & fVertex, |
158 |
> |
const mithep::Vertex * fVertex, |
159 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
160 |
|
const Double_t dRMax); |
161 |
|
|
162 |
|
SelectionStatus electronIsoSelection(ControlFlags &, const mithep::Electron *, const mithep::Vertex &, const mithep::Array<mithep::PFCandidate> * fPFCandidateCol ); |
163 |
< |
SelectionStatus muonIsoSelection(ControlFlags &, const mithep::Muon *, const mithep::Vertex &, const mithep::Array<mithep::PFCandidate> * fPFCandidateCol ); |
163 |
> |
SelectionStatus muonIsoSelection(ControlFlags &, const mithep::Muon *, const mithep::Vertex *, const mithep::Array<mithep::PFCandidate> * fPFCandidateCol ); |
164 |
|
bool pairwiseIsoSelection( ControlFlags &, vector<SimpleLepton> &, float rho ); |
165 |
|
bool noIso(ControlFlags &, vector<SimpleLepton> &, float rho); |
166 |
|
|
167 |
|
void initMuonIsoMVA(); |
168 |
|
SelectionStatus muonIsoMVASelection(ControlFlags &ctrl, |
169 |
|
const mithep::Muon * mu, |
170 |
< |
const mithep::Vertex & vtx, |
170 |
> |
const mithep::Vertex * vtx, |
171 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
172 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
173 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
174 |
|
vector<const mithep::Muon*> muonsToVeto, |
175 |
|
vector<const mithep::Electron*> electronsToVeto); |
176 |
+ |
//hacked version |
177 |
+ |
SelectionStatus muonIsoMVASelection(ControlFlags &ctrl, |
178 |
+ |
const mithep::Muon * mu, |
179 |
+ |
const mithep::Vertex * vtx, |
180 |
+ |
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
181 |
+ |
float rho, |
182 |
+ |
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
183 |
+ |
vector<const mithep::Muon*> muonsToVeto, |
184 |
+ |
vector<const mithep::Electron*> electronsToVeto); |
185 |
|
double muonPFIso04(ControlFlags &ctrl, |
186 |
|
const mithep::Muon * mu, |
187 |
< |
const mithep::Vertex & vtx, |
187 |
> |
const mithep::Vertex * vtx, |
188 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
189 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
190 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
191 |
|
vector<const mithep::Muon*> muonsToVeto, |
192 |
|
vector<const mithep::Electron*> electronsToVeto); |
193 |
+ |
// hacked version |
194 |
+ |
double muonPFIso04(ControlFlags &ctrl, |
195 |
+ |
const mithep::Muon * mu, |
196 |
+ |
const mithep::Vertex * vtx, |
197 |
+ |
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
198 |
+ |
float rho, // the hack |
199 |
+ |
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
200 |
+ |
vector<const mithep::Muon*> muonsToVeto, |
201 |
+ |
vector<const mithep::Electron*> electronsToVeto); |
202 |
+ |
// |
203 |
|
SelectionStatus muonReferenceIsoSelection(ControlFlags &ctrl, |
204 |
|
const mithep::Muon * mu, |
205 |
< |
const mithep::Vertex & vtx, |
205 |
> |
const mithep::Vertex * vtx, |
206 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
207 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
208 |
|
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
209 |
|
vector<const mithep::Muon*> muonsToVeto, |
210 |
|
vector<const mithep::Electron*> electronsToVeto); |
211 |
+ |
// hacked version |
212 |
+ |
SelectionStatus muonReferenceIsoSelection(ControlFlags &ctrl, |
213 |
+ |
const mithep::Muon * mu, |
214 |
+ |
const mithep::Vertex * vtx, |
215 |
+ |
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
216 |
+ |
float, |
217 |
+ |
mithep::MuonTools::EMuonEffectiveAreaTarget EffectiveAreaVersion, |
218 |
+ |
vector<const mithep::Muon*> muonsToVeto, |
219 |
+ |
vector<const mithep::Electron*> electronsToVeto); |
220 |
|
|
221 |
|
void initElectronIsoMVA(); |
222 |
|
SelectionStatus electronIsoMVASelection(ControlFlags &ctrl, |
223 |
|
const mithep::Electron * ele, |
224 |
< |
const mithep::Vertex & vtx, |
224 |
> |
const mithep::Vertex * vtx, |
225 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
226 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
227 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
228 |
|
vector<const mithep::Muon*> muonsToVeto, |
229 |
|
vector<const mithep::Electron*> electronsToVeto); |
230 |
+ |
//hacked version |
231 |
+ |
SelectionStatus electronIsoMVASelection(ControlFlags &ctrl, |
232 |
+ |
const mithep::Electron * ele, |
233 |
+ |
const mithep::Vertex * vtx, |
234 |
+ |
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
235 |
+ |
float rho, |
236 |
+ |
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
237 |
+ |
vector<const mithep::Muon*> muonsToVeto, |
238 |
+ |
vector<const mithep::Electron*> electronsToVeto); |
239 |
|
float electronPFIso04(ControlFlags &ctrl, |
240 |
|
const mithep::Electron * ele, |
241 |
|
const mithep::Vertex & vtx, |
244 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
245 |
|
vector<const mithep::Muon*> muonsToVeto, |
246 |
|
vector<const mithep::Electron*> electronsToVeto) ; |
247 |
+ |
// hacked version |
248 |
+ |
float electronPFIso04(ControlFlags &ctrl, |
249 |
+ |
const mithep::Electron * ele, |
250 |
+ |
const mithep::Vertex * vtx, |
251 |
+ |
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
252 |
+ |
float rho, // the hack |
253 |
+ |
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
254 |
+ |
vector<const mithep::Muon*> muonsToVeto, |
255 |
+ |
vector<const mithep::Electron*> electronsToVeto) ; |
256 |
+ |
// |
257 |
|
SelectionStatus electronReferenceIsoSelection(ControlFlags &ctrl, |
258 |
|
const mithep::Electron * ele, |
259 |
< |
const mithep::Vertex & vtx, |
259 |
> |
const mithep::Vertex * vtx, |
260 |
|
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
261 |
|
const mithep::Array<mithep::PileupEnergyDensity> * fPUEnergyDensity, |
262 |
|
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
263 |
|
vector<const mithep::Muon*> muonsToVeto, |
264 |
|
vector<const mithep::Electron*> electronsToVeto); |
265 |
+ |
// hacked version |
266 |
+ |
SelectionStatus electronReferenceIsoSelection(ControlFlags &ctrl, |
267 |
+ |
const mithep::Electron * ele, |
268 |
+ |
const mithep::Vertex * vtx, |
269 |
+ |
const mithep::Array<mithep::PFCandidate> * fPFCandidates, |
270 |
+ |
float, |
271 |
+ |
mithep::ElectronTools::EElectronEffectiveAreaTarget EffectiveAreaVersion, |
272 |
+ |
vector<const mithep::Muon*> muonsToVeto, |
273 |
+ |
vector<const mithep::Electron*> electronsToVeto); |