2#ifndef RIVET_ExptSmearingFunctions_HH
3#define RIVET_ExptSmearingFunctions_HH
5#include "Rivet/Tools/JetSmearingFunctions.hh"
6#include "Rivet/Tools/MomentumSmearingFunctions.hh"
7#include "Rivet/Tools/ParticleSmearingFunctions.hh"
48 if (e.
abspid() != PID::ELECTRON)
return 0;
49 if (e.
abseta() > 2.5)
return 0;
50 if (e.
pT() < 10*GeV)
return 0;
51 return (e.
abseta() < 1.5) ? 0.95 : 0.85;
58 if (e.
abspid() != PID::ELECTRON)
return 0;
59 const double et = e.
Et();
60 if (e.
abseta() > 2.5 || e.
Et() < 2*GeV)
return 0;
61 if (et > 25*GeV)
return 0.97;
62 if (et > 10*GeV)
return 0.92 + (et / GeV - 10) / 15. * 0.05;
63 if (et > 6*GeV)
return 0.85 + (et / GeV - 6) / 4. * 0.07;
64 if (et > 5*GeV)
return 0.70 + (et / GeV - 5) / 1. * 0.15;
65 if (et > 2*GeV)
return 0.00 + (et / GeV - 2) / 3. * 0.70;
76 if (e.
abspid() != PID::ELECTRON)
return 0;
79 const static vector<double> edges_eta = {0.0, 0.1, 0.8, 1.37, 1.52, 2.01, 2.37, 2.47};
80 const static vector<double> effs_eta = {0.950, 0.965, 0.955, 0.885, 0.950, 0.935, 0.90};
82 const static vector<double> edges_et = {0, 10, 20, 25, 30, 35, 40, 45, 50, 60, 80};
83 const static vector<double> effs_et = {
84 0.0, 0.90, 0.91, 0.92, 0.94, 0.95,
85 0.955, 0.965, 0.97, 0.98, 0.98};
87 if (e.
abseta() > 2.47)
return 0.0;
90 const int i_et =
binIndex(e.
Et() / GeV, edges_et,
true);
91 const double eff = effs_et[i_et] * effs_eta[i_eta]
104 if (e.
abspid() != PID::ELECTRON)
return 0;
106 const static vector<double> eta_edges_10 = {0.000, 0.049, 0.454, 1.107, 1.46, 1.790, 2.277, 2.500};
107 const static vector<double> eta_vals_10 = {0.730, 0.757, 0.780, 0.771, 0.77, 0.777, 0.778};
109 const static vector<double> eta_edges_15 = {0.000, 0.053, 0.456, 1.102, 1.463, 1.783, 2.263, 2.500};
110 const static vector<double> eta_vals_15 = {0.780, 0.800, 0.819, 0.759, 0.749, 0.813, 0.829};
112 const static vector<double> eta_edges_20 = {0.000, 0.065, 0.362, 0.719, 0.980, 1.289,
113 1.455, 1.681, 1.942, 2.239, 2.452, 2.500};
114 const static vector<double> eta_vals_20 = {0.794, 0.806, 0.816, 0.806, 0.797, 0.774,
115 0.764, 0.788, 0.793, 0.806, 0.825};
117 const static vector<double> eta_edges_25 = {0.000, 0.077, 0.338, 0.742, 1.004, 1.265,
118 1.467, 1.692, 1.940, 2.227, 2.452, 2.500};
119 const static vector<double> eta_vals_25 = {0.833, 0.843, 0.853, 0.845, 0.839, 0.804,
120 0.790, 0.825, 0.830, 0.833, 0.839};
122 const static vector<double> eta_edges_30 = {0.000, 0.077, 0.350, 0.707, 0.980, 1.289,
123 1.479, 1.681, 1.942, 2.239, 2.441, 2.500};
124 const static vector<double> eta_vals_30 = {0.863, 0.872, 0.881, 0.874, 0.870, 0.824,
125 0.808, 0.847, 0.845, 0.840, 0.842};
127 const static vector<double> eta_edges_35 = {0.000, 0.058, 0.344, 0.700, 1.009, 1.270,
128 1.458, 1.685, 1.935, 2.231, 2.468, 2.500};
129 const static vector<double> eta_vals_35 = {0.878, 0.889, 0.901, 0.895, 0.893, 0.849,
130 0.835, 0.868, 0.863, 0.845, 0.832};
132 const static vector<double> eta_edges_40 = {0.000, 0.047, 0.355, 0.699, 0.983, 1.280,
133 1.446, 1.694, 1.943, 2.227, 2.441, 2.500};
134 const static vector<double> eta_vals_40 = {0.894, 0.901, 0.909, 0.905, 0.904, 0.875,
135 0.868, 0.889, 0.876, 0.848, 0.827};
137 const static vector<double> eta_edges_45 = {0.000, 0.058, 0.356, 0.712, 0.997, 1.282,
138 1.459, 1.686, 1.935, 2.220, 2.444, 2.500};
139 const static vector<double> eta_vals_45 = {0.900, 0.911, 0.923, 0.918, 0.917, 0.897,
140 0.891, 0.904, 0.894, 0.843, 0.796};
142 const static vector<double> eta_edges_50 = {0.000, 0.059, 0.355, 0.711, 0.983, 1.280,
143 1.469, 1.682, 1.919, 2.227, 2.441, 2.500};
144 const static vector<double> eta_vals_50 = {0.903, 0.913, 0.923, 0.922, 0.923, 0.903,
145 0.898, 0.908, 0.895, 0.831, 0.774};
147 const static vector<double> eta_edges_60 = {0.000, 0.053, 0.351, 0.720, 1.006, 1.291,
148 1.469, 1.696, 1.946, 2.243, 2.455, 2.500};
149 const static vector<double> eta_vals_60 = {0.903, 0.917, 0.928, 0.924, 0.927, 0.915,
150 0.911, 0.915, 0.899, 0.827, 0.760};
152 const static vector<double> eta_edges_80 = {0.000, 0.053, 0.351, 0.720, 0.994, 1.292,
153 1.482, 1.708, 1.934, 2.220, 2.458, 2.500};
154 const static vector<double> eta_vals_80 = {0.936, 0.942, 0.952, 0.956, 0.956, 0.934,
155 0.931, 0.944, 0.933, 0.940, 0.948};
157 const static vector<double> et_edges = {10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 80};
158 const static vector<vector<double>> et_eta_edges = {eta_edges_10, eta_edges_15, eta_edges_20,
159 eta_edges_25, eta_edges_30, eta_edges_35,
160 eta_edges_40, eta_edges_45, eta_edges_50,
161 eta_edges_60, eta_edges_80};
162 const static vector<vector<double>> et_eta_vals = {eta_vals_10, eta_vals_15, eta_vals_20, eta_vals_25,
163 eta_vals_30, eta_vals_35, eta_vals_40, eta_vals_45,
164 eta_vals_50, eta_vals_60, eta_vals_80};
166 if (e.
abseta() > 2.5 || e.
Et() < 10*GeV)
return 0.0;
167 const int i_et =
binIndex(e.
Et() / GeV, et_edges,
true);
176 if (e.
abspid() != PID::ELECTRON)
return 0;
183 if (e.
abspid() != PID::ELECTRON)
return 0;
185 const static vector<double> eta_edges_10 = {0.000, 0.049, 0.459, 1.100, 1.461, 1.789, 2.270, 2.500};
186 const static vector<double> eta_vals_10 = {0.581, 0.632, 0.668, 0.558, 0.548, 0.662, 0.690};
188 const static vector<double> eta_edges_15 = {0.000, 0.053, 0.450, 1.096, 1.463, 1.783, 2.269, 2.500};
189 const static vector<double> eta_vals_15 = {0.630, 0.678, 0.714, 0.633, 0.616, 0.700, 0.733};
191 const static vector<double> eta_edges_20 = {0.000, 0.065, 0.362, 0.719, 0.992, 1.277,
192 1.479, 1.692, 1.930, 2.227, 2.464, 2.500};
193 const static vector<double> eta_vals_20 = {0.653, 0.695, 0.735, 0.714, 0.688, 0.635,
194 0.625, 0.655, 0.680, 0.691, 0.674};
196 const static vector<double> eta_edges_25 = {0.000, 0.077, 0.362, 0.719, 0.992, 1.300,
197 1.479, 1.692, 1.942, 2.227, 2.464, 2.500};
198 const static vector<double> eta_vals_25 = {0.692, 0.732, 0.768, 0.750, 0.726, 0.677,
199 0.667, 0.692, 0.710, 0.706, 0.679};
201 const static vector<double> eta_edges_30 = {0.000, 0.053, 0.362, 0.719, 1.004, 1.277,
202 1.467, 1.681, 1.954, 2.239, 2.452, 2.500};
203 const static vector<double> eta_vals_30 = {0.724, 0.763, 0.804, 0.789, 0.762, 0.702,
204 0.690, 0.720, 0.731, 0.714, 0.681};
206 const static vector<double> eta_edges_35 = {0.000, 0.044, 0.342, 0.711, 0.971, 1.280,
207 1.456, 1.683, 1.944, 2.218, 2.442, 2.500};
208 const static vector<double> eta_vals_35 = {0.736, 0.778, 0.824, 0.811, 0.784, 0.730,
209 0.718, 0.739, 0.743, 0.718, 0.678};
211 const static vector<double> eta_edges_40 = {0.000, 0.047, 0.355, 0.699, 0.983, 1.268,
212 1.457, 1.671, 1.931, 2.204, 2.453, 2.500};
213 const static vector<double> eta_vals_40 = {0.741, 0.774, 0.823, 0.823, 0.802, 0.764,
214 0.756, 0.771, 0.771, 0.734, 0.684};
216 const static vector<double> eta_edges_45 = {0.000, 0.056, 0.354, 0.711, 0.984, 1.280,
217 1.458, 1.684, 1.945, 2.207, 2.442, 2.500};
218 const static vector<double> eta_vals_45 = {0.758, 0.792, 0.841, 0.841, 0.823, 0.792,
219 0.786, 0.796, 0.794, 0.734, 0.663};
221 const static vector<double> eta_edges_50 = {0.000, 0.059, 0.355, 0.699, 0.983, 1.268,
222 1.446, 1.682, 1.943, 2.216, 2.453, 2.500};
223 const static vector<double> eta_vals_50 = {0.771, 0.806, 0.855, 0.858, 0.843, 0.810,
224 0.800, 0.808, 0.802, 0.730, 0.653};
226 const static vector<double> eta_edges_60 = {0.000, 0.050, 0.350, 0.707, 0.981, 1.278,
227 1.468, 1.694, 1.944, 2.242, 2.453, 2.500};
228 const static vector<double> eta_vals_60 = {0.773, 0.816, 0.866, 0.865, 0.853, 0.820,
229 0.812, 0.817, 0.804, 0.726, 0.645};
231 const static vector<double> eta_edges_80 = {0.000, 0.051, 0.374, 0.720, 0.981, 1.279,
232 1.468, 1.707, 1.945, 2.207, 2.457, 2.500};
233 const static vector<double> eta_vals_80 = {0.819, 0.855, 0.899, 0.906, 0.900, 0.869,
234 0.865, 0.873, 0.869, 0.868, 0.859};
236 const static vector<double> et_edges = {10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 80};
237 const static vector<vector<double>> et_eta_edges = {eta_edges_10, eta_edges_15, eta_edges_20,
238 eta_edges_25, eta_edges_30, eta_edges_35,
239 eta_edges_40, eta_edges_45, eta_edges_50,
240 eta_edges_60, eta_edges_80};
241 const static vector<vector<double>> et_eta_vals = {eta_vals_10, eta_vals_15, eta_vals_20, eta_vals_25,
242 eta_vals_30, eta_vals_35, eta_vals_40, eta_vals_45,
243 eta_vals_50, eta_vals_60, eta_vals_80};
245 if (e.
abseta() > 2.5 || e.
Et() < 10*GeV)
return 0.0;
246 const int i_et =
binIndex(e.
Et() / GeV, et_edges,
true);
255 if (e.
abspid() != PID::ELECTRON)
return 0;
256 const static vector<double> et_edges = { 20, 25, 30, 35, 40, 45, 50, 60, 80};
257 const static vector<double> et_effs = {
258 0.785, 0.805, 0.820, 0.830, 0.840,
259 0.850, 0.875, 0.910, 0.910};
260 const static vector<double> eta_edges = {0.000, 0.051, 0.374, 0.720, 0.981, 1.279,
261 1.468, 1.707, 1.945, 2.207, 2.457, 2.500};
262 const static vector<double> eta_refs = {0.819, 0.855, 0.899, 0.906, 0.900, 0.869,
263 0.865, 0.873, 0.869, 0.868, 0.859};
264 if (e.
abseta() > 2.5 || e.
Et() < 20*GeV)
return 0.0;
265 const int i_et =
binIndex(e.
Et() / GeV, et_edges,
true);
267 const double eff_et = et_effs[i_et];
287 if (e.
abspid() != PID::ELECTRON)
return 0;
288 if (e.
abseta() > 2.47 || e.
Et() < 4.5*GeV)
return 0;
289 static const vector<double> edges_et = {4.5, 7., 10., 15., 20., 25., 30., 35., 40., 45., 50., 60., 80.};
290 static const vector<double> effs_et = {0.976, 0.929, 0.883, 0.830, 0.865, 0.884, 0.902,
291 0.920, 0.930, 0.937, 0.939, 0.944, 0.950};
292 static const vector<double> edges_eta = {0., 0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37};
293 static const vector<double> effs_eta = {0.905, 0.937, 0.939, 0.935, 0.924,
294 0.868, 0.921, 0.898, 0.871, 0.825};
295 static const double norm_eta = 0.9110;
296 const double eff_et = effs_et[
binIndex(e.
Et() / GeV, edges_et,
true)];
297 const double eff_eta = effs_eta[
binIndex(e.
abseta(), edges_eta,
true)];
298 return min(1.0, eff_et * eff_eta / norm_eta);
313 if (e.
abspid() != PID::ELECTRON)
return 0;
314 if (e.
abseta() > 2.47 || e.
Et() < 4.5*GeV)
return 0;
315 static const vector<double> edges_et = {4.5, 7., 10., 15., 20., 25., 30., 35., 40., 45., 50., 60., 80.};
316 static const vector<double> effs_et = {0.791, 0.798, 0.816, 0.753, 0.795, 0.828, 0.848,
317 0.869, 0.882, 0.888, 0.898, 0.917, 0.933};
318 static const vector<double> edges_eta = {0., 0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37};
319 static const vector<double> effs_eta = {0.857, 0.899, 0.896, 0.885, 0.857,
320 0.807, 0.866, 0.834, 0.811, 0.766};
321 static const double norm_eta = 0.8584;
322 const double eff_et = effs_et[
binIndex(e.
Et() / GeV, edges_et,
true)];
323 const double eff_eta = effs_eta[
binIndex(e.
abseta(), edges_eta,
true)];
324 return min(1.0, eff_et * eff_eta / norm_eta);
339 if (e.
abspid() != PID::ELECTRON)
return 0;
340 if (e.
abseta() > 2.47 || e.
Et() < 4.5*GeV)
return 0;
341 static const vector<double> edges_et = {4.5, 7., 10., 15., 20., 25., 30., 35., 40., 45., 50., 60., 80.};
342 static const vector<double> effs_et = {0.583, 0.609, 0.671, 0.652, 0.684, 0.716, 0.747,
343 0.768, 0.783, 0.796, 0.816, 0.854, 0.885};
344 static const vector<double> edges_eta = {0., 0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37};
345 static const vector<double> effs_eta = {0.755, 0.813, 0.808, 0.782, 0.755,
346 0.638, 0.768, 0.740, 0.725, 0.662};
347 static const double norm_eta = 0.7599;
348 const double eff_et = effs_et[
binIndex(e.
Et() / GeV, edges_et,
true)];
349 const double eff_eta = effs_eta[
binIndex(e.
abseta(), edges_eta,
true)];
350 return min(1.0, eff_et * eff_eta / norm_eta);
366 if (e.
abspid() != PID::ELECTRON)
return 0;
367 if (e.
abseta() > 2.47 || e.
Et() < 4.5*GeV)
return 0;
368 static const vector<double> edges_et = {4.5, 7., 10., 15., 20., 25., 30., 35., 40.,
369 45., 50., 60., 80., 150., 200., 250., 300., 350.};
370 static const vector<double> effs_et = {0.741, 0.827, 0.906, 0.952, 0.973, 0.984, 0.990, 0.994, 0.997,
371 0.998, 0.998, 0.999, 0.999, 0.999, 0.999, 0.999, 0.997, 0.998};
372 static const vector<double> edges_eta = {0., 0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37};
373 static const vector<double> effs_eta = {0.992, 0.991, 0.992, 0.993, 0.994,
374 0.988, 0.991, 0.989, 0.988, 0.987};
375 static const double norm_eta = 0.9907;
376 const double eff_et = effs_et[
binIndex(e.
Et() / GeV, edges_et,
true)];
377 const double eff_eta = effs_eta[
binIndex(e.
abseta(), edges_eta,
true)];
378 return min(1.0, eff_et * eff_eta / norm_eta);
393 if (e.
abspid() != PID::ELECTRON)
return 0;
394 if (e.
abseta() > 2.47 || e.
Et() < 4.5*GeV)
return 0;
395 static const vector<double> edges_et = {4.5, 7., 10., 15., 20., 25., 30., 35., 40.,
396 45., 50., 60., 80., 150., 200., 250., 300., 350.};
397 static const vector<double> effs_et = {0.459, 0.541, 0.618, 0.698, 0.770, 0.822, 0.863, 0.896, 0.925,
398 0.941, 0.953, 0.971, 0.986, 0.992, 0.993, 0.994, 0.991, 0.992};
399 static const vector<double> edges_eta = {0., 0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37};
400 static const vector<double> effs_eta = {0.888, 0.881, 0.900, 0.913, 0.925,
401 0.919, 0.881, 0.873, 0.893, 0.881};
402 static const double norm_eta = 0.8947;
403 const double eff_et = effs_et[
binIndex(e.
Et() / GeV, edges_et,
true)];
404 const double eff_eta = effs_eta[
binIndex(e.
abseta(), edges_eta,
true)];
405 return min(1.0, eff_et * eff_eta / norm_eta);
420 if (e.
abspid() != PID::ELECTRON)
return 0;
421 if (e.
abseta() > 2.47 || e.
Et() < 4.5*GeV)
return 0;
422 static const vector<double> edges_et = {4.5, 7., 10., 15., 20., 25., 30., 35., 40.,
423 45., 50., 60., 80., 150., 200., 250., 300., 350.};
424 static const vector<double> effs_et = {0.800, 0.881, 0.927, 0.880, 0.889, 0.896, 0.908, 0.920, 0.929,
425 0.941, 0.961, 0.979, 0.982, 0.994, 0.994, 0.995, 0.993, 0.993};
426 static const vector<double> edges_eta = {0., 0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37};
427 static const vector<double> effs_eta = {0.934, 0.929, 0.929, 0.931, 0.929,
428 0.936, 0.921, 0.914, 0.911, 0.906};
429 static const double norm_eta = 0.9242;
430 const double eff_et = effs_et[
binIndex(e.
Et() / GeV, edges_et,
true)];
431 const double eff_eta = effs_eta[
binIndex(e.
abseta(), edges_eta,
true)];
432 return min(1.0, eff_et * eff_eta / norm_eta);
447 if (e.
abspid() != PID::ELECTRON)
return 0;
448 if (e.
abseta() > 2.47 || e.
Et() < 4.5*GeV)
return 0;
449 static const vector<double> edges_et = {4.5, 7., 10., 15., 20., 25., 30., 35., 40.,
450 45., 50., 60., 80., 150., 200., 250., 300., 350.};
451 static const vector<double> effs_et = {0.982, 0.975, 0.970, 0.968, 0.967, 0.966, 0.966, 0.967, 0.971,
452 0.971, 0.967, 0.962, 0.951, 0.926, 0.904, 0.909, 0.926, 0.929};
453 static const vector<double> edges_eta = {0., 0.1, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37};
454 static const vector<double> effs_eta = {0.960, 0.957, 0.966, 0.974, 0.980,
455 0.971, 0.969, 0.966, 0.975, 0.972};
456 static const double norm_eta = 0.9685;
457 const double eff_et = effs_et[
binIndex(e.
Et() / GeV, edges_et,
true)];
458 const double eff_eta = effs_eta[
binIndex(e.
abseta(), edges_eta,
true)];
459 return min(1.0, eff_et * eff_eta / norm_eta);
465 static const vector<double> edges_eta = {0., 2.5, 3.};
466 static const vector<double> edges_pt = {0., 0.1, 25.};
467 static const vector<double> e2s = {0.000, 0.015, 0.005, 0.005, 0.005, 0.005, 0.107, 0.107, 0.107};
468 static const vector<double> es = {0.00, 0.00, 0.05, 0.05, 0.05, 0.05, 2.08, 2.08, 2.08};
469 static const vector<double> cs = {0.00, 0.00, 0.25, 0.25, 0.25, 0.25, 0.00, 0.00, 0.00};
472 const int i_pt =
binIndex(e.
pT() / GeV, edges_pt,
true);
473 const int i = i_eta * edges_pt.size() + i_pt;
476 const double c1 =
sqr(e2s[i]), c2 =
sqr(es[i]), c3 =
sqr(cs[i]);
477 const double resolution = sqrt(c1 * e.
E2() + c2 * e.
E() + c3) * GeV;
500 if (e.
abspid() != PID::ELECTRON)
return 0;
501 if (e.
abseta() > 2.5)
return 0;
502 if (e.
pT() < 10*GeV)
return 0;
503 return (e.
abseta() < 1.5) ? 0.95 : 0.85;
529 if (e.
abspid() != PID::ELECTRON)
return 0;
560 double resolution = 0;
562 if (e.
pT() > 0.1*GeV &&
abseta < 2.5) {
564 resolution =
add_quad(0.06, 1.3e-3 * e.
pT() / GeV) * GeV;
567 resolution =
add_quad(0.10, 1.7e-3 * e.
pT() / GeV) * GeV;
570 resolution =
add_quad(0.25, 3.1e-3 * e.
pT() / GeV) * GeV;
598 if (y.
abspid() != PID::PHOTON)
return 0;
600 if (y.
pT() < 10*GeV)
return 0;
603 static const vector<double> edges_eta = {0., 0.6, 1.37, 1.52, 1.81, 2.37};
604 static const vector<double> edges_pt = {10., 15., 20., 25., 30., 35., 40., 45.,
605 50., 60., 80., 100., 125., 150., 175., 250.};
606 static const vector<double> effs = {
607 0.53, 0.65, 0.73, 0.83, 0.86, 0.93, 0.94, 0.96, 0.97, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98,
608 0.45, 0.57, 0.67, 0.74, 0.84, 0.87, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.98, 0.99, 0.99, 0.99,
609 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
610 0.48, 0.56, 0.68, 0.76, 0.86, 0.90, 0.93, 0.95, 0.96, 0.97, 0.98, 0.99, 0.99, 1.00, 1.00, 1.00,
611 0.50, 0.61, 0.74, 0.82, 0.88, 0.92, 0.94, 0.95, 0.96, 0.97, 0.98, 0.98, 0.98, 0.98, 0.99, 0.99};
614 const int i_pt =
binIndex(y.
pT() / GeV, edges_pt,
true);
615 const int i = i_eta * edges_pt.size() + i_pt;
616 const double eff = effs[i];
644 if (y.
abspid() != PID::PHOTON)
return 0;
646 if (y.
pT() < 10*GeV)
return 0;
649 static const vector<double> edges_eta = {0., 0.6, 1.37, 1.52, 1.81, 2.37};
650 static const vector<double> edges_pt = {10., 15., 20., 25., 30., 35., 40., 45.,
651 50., 60., 80., 100., 125., 150., 175., 250.};
652 static const vector<double> effs = {
653 0.55, 0.70, 0.85, 0.89, 0.93, 0.95, 0.96, 0.96, 0.97, 0.97, 0.98, 0.97, 0.97, 0.97, 0.97, 0.97,
654 0.47, 0.66, 0.79, 0.86, 0.89, 0.94, 0.96, 0.97, 0.97, 0.98, 0.97, 0.98, 0.98, 0.98, 0.98, 0.98,
655 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
656 0.54, 0.71, 0.84, 0.88, 0.92, 0.93, 0.94, 0.95, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96,
657 0.61, 0.74, 0.83, 0.88, 0.91, 0.94, 0.95, 0.96, 0.97, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98};
660 const int i_pt =
binIndex(y.
pT() / GeV, edges_pt,
true);
661 const int i = i_eta * edges_pt.size() + i_pt;
662 const double eff = effs[i];
689 if (y.
abspid() != PID::PHOTON)
return 0;
690 if (y.
pT() < 10*GeV || y.
abseta() > 2.5)
return 0;
691 return (y.
abseta() < 1.5) ? 0.95 : 0.85;
717 if (y.
abspid() != PID::PHOTON)
return 0;
744 inline Particle PHOTON_SMEAR_ATLAS_RUN2(
const Particle& y) {
762 if (m.
abspid() != PID::MUON)
return 0;
763 if (m.
abseta() > 2.7)
return 0;
764 if (m.
pT() < 10*GeV)
return 0;
765 return (m.
abseta() < 1.5) ? 0.95 : 0.85;
791 if (m.
abspid() != PID::MUON)
return 0;
792 if (m.
abseta() > 2.5)
return 0;
793 if (m.
abseta() < 0.1)
return 0.61;
795 return (m.
abseta() < 1) ? 0.98 : 0.99;
805 if (m.
abspid() != PID::MUON)
return 0;
806 static const vector<double> edges_pt = {0., 3., 4., 5., 6., 7., 8., 9., 10., 15., 20., 30., 40.};
807 static const vector<double> effs_pt = {0., 0.58, 0.70, 0.75, 0.80, 0.82, 0.85,
808 0.87, 0.90, 0.95, 0.98, 1.00, 1.00};
809 const int i_pt =
binIndex(m.
pT() / GeV, edges_pt,
true);
810 const double eff_pt = effs_pt[i_pt];
821 if (m.
abspid() != PID::MUON)
return 0;
822 if (m.
abseta() > 2.5)
return 0;
823 static const vector<double> edges_pt = {0., 3., 3.5, 4., 5., 6., 7., 8., 10.};
824 static const vector<double> effs = {0.00, 0.88, 0.92, 0.97, 0.98, 0.98, 0.98, 0.99, 0.99};
825 const int i_pt =
binIndex(m.
pT() / GeV, edges_pt,
true);
826 const double eff = effs[i_pt];
838 if (m.
abspid() != PID::MUON)
return 0;
839 if (m.
abseta() > 2.5)
return 0;
840 static const vector<double> edges_pt = {0., 3., 3.5, 4., 5., 6., 7., 8., 9., 10., 12.,
841 14., 16., 18., 20., 25., 30., 35., 40., 45., 50.};
842 static const vector<double> effs_pt = {0.00, 0.48, 0.62, 0.82, 0.94, 0.95, 0.96, 0.96, 0.97, 0.97, 0.97,
843 0.97, 0.97, 0.97, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98};
844 const int i_pt =
binIndex(m.
pT() / GeV, edges_pt,
true);
845 const double eff_pt = effs_pt[i_pt];
846 static const vector<double> edges_eta = {0., 0.25, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50};
847 static const vector<double> effs_eta = {0.85, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99};
849 const double eff_eta = effs_eta[i_eta] / 0.99;
860 if (m.
abspid() != PID::MUON)
return 0;
861 if (m.
abseta() > 2.5)
return 0;
862 static const vector<double> edges_pt = {0., 3.5, 4., 5., 6., 7., 8., 9., 10., 12., 14., 16., 18., 20.};
863 static const vector<double> effs_pt = {0.00, 0.00, 0.68, 0.81, 0.85, 0.88, 0.89,
864 0.90, 0.91, 0.92, 0.92, 0.92, 0.93, 0.93};
865 const int i_pt =
binIndex(m.
pT() / GeV, edges_pt,
true);
866 const double eff_pt = effs_pt[i_pt];
867 static const vector<double> edges_eta = {0., 0.25, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50};
868 static const vector<double> effs_eta = {0.78, 0.94, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96};
870 const double eff_eta = effs_eta[i_eta] / 0.96;
888 if (m.
abspid() != PID::MUON)
return 0;
889 if (m.
abseta() > 2.7 || m.
pT() < 3*GeV)
return 0;
890 static const vector<double> edges_pt = {3., 3.5, 4., 5., 7.};
891 static const vector<double> effs_pt = {0.870, 0.935, 0.975, 0.990, 0.988};
892 const double eff_pt = effs_pt[
binIndex(m.
pT() / GeV, edges_pt,
true)];
893 if (m.
abseta() > 2.5)
return eff_pt * (m.
abseta() < 2.6 ? 0.775 : 0.633);
909 if (m.
abspid() != PID::MUON)
return 0;
910 if (m.
abseta() > 2.7 || m.
pT() < 3*GeV)
return 0;
911 static const vector<double> edges_pt = {3., 3.5, 4., 5., 6., 7., 8., 20.};
912 static const vector<double> effs_pt = {0.455, 0.615, 0.810, 0.945, 0.975, 0.980, 0.985, 0.987};
913 const double eff_pt = effs_pt[
binIndex(m.
pT() / GeV, edges_pt,
true)];
914 if (m.
abseta() < 0.1)
return eff_pt * 0.67;
915 if (m.
abseta() > 2.5)
return eff_pt * (m.
abseta() < 2.6 ? 0.775 : 0.633);
933 if (m.
abspid() != PID::MUON)
return 0;
934 if (m.
abseta() > 2.5 || m.
pT() < 4*GeV)
return 0;
935 static const vector<double> edges_pt = {4., 5., 6., 7., 8., 9., 10., 12., 14., 16., 18., 20.};
936 static const vector<double> effs_pt = {0.681, 0.827, 0.869, 0.894, 0.908, 0.920,
937 0.930, 0.934, 0.936, 0.942, 0.956, 0.953};
938 const double eff_pt = effs_pt[
binIndex(m.
pT() / GeV, edges_pt,
true)];
939 if (m.
abseta() < 0.1)
return eff_pt * 0.606;
956 if (m.
abspid() != PID::MUON)
return 0;
957 if (m.
abseta() > 2.5 || m.
pT() < 3*GeV)
return 0;
958 static const vector<double> edges_pt = {3., 4., 5., 6., 7., 8., 9., 10.,
959 15., 20., 30., 40., 55., 70., 90., 150.};
960 static const vector<double> effs_pt = {0.656, 0.726, 0.766, 0.789, 0.822, 0.853, 0.879, 0.921,
961 0.958, 0.983, 0.994, 0.998, 0.999, 0.999, 0.999, 0.997};
962 return effs_pt[
binIndex(m.
pT() / GeV, edges_pt,
true)];
977 if (m.
abspid() != PID::MUON)
return 0;
978 if (m.
abseta() > 2.5 || m.
pT() < 3*GeV)
return 0;
979 static const vector<double> edges_pt = {3., 4., 5., 6., 7., 8., 9., 10.,
980 15., 20., 30., 40., 55., 70., 90., 150.};
981 static const vector<double> effs_pt = {0.569, 0.635, 0.668, 0.691, 0.703, 0.719, 0.733, 0.760,
982 0.794, 0.844, 0.920, 0.970, 0.992, 0.997, 0.998, 0.996};
983 return effs_pt[
binIndex(m.
pT() / GeV, edges_pt,
true)];
998 if (m.
abspid() != PID::MUON)
return 0;
999 if (m.
abseta() > 2.5 || m.
pT() < 3*GeV)
return 0;
1000 static const vector<double> edges_pt = {3., 4., 5., 6., 7., 8., 9., 10.,
1001 15., 20., 30., 40., 55., 70., 90., 150.};
1002 static const vector<double> effs_pt = {0.479, 0.559, 0.594, 0.623, 0.636, 0.650, 0.667, 0.730,
1003 0.773, 0.828, 0.868, 0.909, 0.959, 0.979, 0.989, 0.989};
1004 return effs_pt[
binIndex(m.
pT() / GeV, edges_pt,
true)];
1013 static const vector<double> edges_eta = {0, 1.5, 2.5};
1014 static const vector<double> edges_pt = {0, 0.1, 1.0, 10., 200.};
1015 static const vector<double> res = {0., 0.03, 0.02, 0.03, 0.05, 0., 0.04, 0.03, 0.04, 0.05};
1018 const int i_pt =
binIndex(m.
pT() / GeV, edges_pt,
true);
1019 const int i = i_eta * edges_pt.size() + i_pt;
1020 const double resolution_fixed = res[i];
1025 const double resolution = resolution_fixed
1026 * (1.0 +
max(0.0, (((0.45 - 0.05) / 0.05 - 1.0) / 2300) * (m.
pT() - 200*GeV) / GeV));
1044 double mres_pt = 0.015;
1046 if (m.
pT() > 50*GeV) mres_pt = 0.015 + 0.01 * (m.
pT() - 50*GeV) / (50*GeV);
1048 if (m.
pT() > 100*GeV) mres_pt = 0.025 + 0.0084 * (m.
pT() - 100*GeV) / (100*GeV);
1049 const double ptres_pt =
SQRT2 * mres_pt;
1050 const double resolution = (m.
abseta() < 1.5 ? 1.0 : 1.25) * ptres_pt;
1065 if (m.
abspid() != PID::MUON)
return 0;
1066 if (m.
abseta() > 2.5)
return 0;
1067 if (m.
pT() < 5*GeV)
return 0;
1069 static const vector<double> edges_pT = {5., 10., 15.};
1070 static const vector<double> edges_eta = {-2.5, -2.27273, -2.04545, -1.81818, -1.59091, -1.36364,
1071 -1.13636, -0.90909, -0.68182, -0.45455, -0.22727, 0.,
1072 0.22727, 0.45455, 0.68182, 0.90909, 1.13636, 1.36364,
1073 1.59091, 1.81818, 2.04545, 2.27273, 2.5};
1074 static const vector<double> vals_pT_eta = {
1075 0.96, 0.955, 0.973, 0.969, 0.951, 0.932, 0.976, 0.968, 0.972, 0.98, 0.859, 0.887, 0.978, 0.975,
1076 0.974, 0.974, 0.925, 0.949, 0.975, 0.974, 0.967, 0.965, 0.965, 0.97, 0.96, 0.976, 0.976, 0.976,
1077 0.943, 0.984, 0.988, 0.988, 0.982, 0.83, 0.84, 0.982, 0.988, 0.989, 0.983, 0.944, 0.973, 0.969,
1078 0.976, 0.961, 0.971, 0.971, 0.97, 0.96, 0.976, 0.976, 0.976, 0.943, 0.984, 0.988, 0.988, 0.982,
1079 0.83, 0.84, 0.982, 0.988, 0.989, 0.983, 0.944, 0.973, 0.969, 0.976, 0.961, 0.971, 0.971};
1080 const int i_pT =
binIndex(m.
pT() / GeV, edges_pT,
true);
1081 const int i_eta =
binIndex(m.
eta(), edges_eta,
true);
1082 return vals_pT_eta[i_pT * edges_eta.size() + i_eta];
1091 if (m.
abspid() != PID::MUON)
return 0;
1092 if (m.
abseta() > 2.5)
return 0;
1093 if (m.
pT() < 5*GeV)
return 0;
1095 static const vector<double> edges_pT = {5., 10., 15.};
1096 static const vector<double> edges_eta = {-2.5, -2.27273, -2.04545, -1.81818, -1.59091, -1.36364,
1097 -1.13636, -0.90909, -0.68182, -0.45455, -0.22727, 0.,
1098 0.22727, 0.45455, 0.68182, 0.90909, 1.13636, 1.36364,
1099 1.59091, 1.81818, 2.04545, 2.27273, 2.5};
1100 static const vector<double> vals_pT_eta = {
1101 0.98, 0.972, 0.981, 0.979, 0.984, 0.963, 0.965, 0.978, 0.973, 0.981, 0.85, 0.867, 0.975, 0.975,
1102 0.982, 0.959, 0.963, 0.982, 0.984, 0.974, 0.98, 0.97, 0.97, 0.981, 0.984, 0.984, 0.987, 0.983,
1103 0.971, 0.982, 0.986, 0.986, 0.98, 0.83, 0.841, 0.982, 0.989, 0.99, 0.983, 0.975, 0.98, 0.976,
1104 0.984, 0.98, 0.979, 0.979, 0.981, 0.984, 0.984, 0.987, 0.983, 0.971, 0.982, 0.986, 0.986, 0.98,
1105 0.83, 0.841, 0.982, 0.989, 0.99, 0.983, 0.975, 0.98, 0.976, 0.984, 0.98, 0.979, 0.979};
1106 const int i_pT =
binIndex(m.
pT() / GeV, edges_pT,
true);
1107 const int i_eta =
binIndex(m.
eta(), edges_eta,
true);
1108 return vals_pT_eta[i_pT * edges_eta.size() + i_eta];
1117 if (m.
abspid() != PID::MUON)
return 0;
1118 if (m.
abseta() > 2.5)
return 0;
1119 if (m.
pT() < 5*GeV)
return 0;
1121 static const vector<double> edges_pT = {5., 10., 15.};
1122 static const vector<double> edges_eta = {-2.5, -2.27273, -2.04545, -1.81818, -1.59091, -1.36364,
1123 -1.13636, -0.90909, -0.68182, -0.45455, -0.22727, 0.,
1124 0.22727, 0.45455, 0.68182, 0.90909, 1.13636, 1.36364,
1125 1.59091, 1.81818, 2.04545, 2.27273, 2.5};
1126 static const vector<double> vals_pT_eta = {
1127 0.975, 0.978, 0.979, 0.985, 0.979, 0.969, 0.974, 0.976, 0.974, 0.977, 0.855, 0.873, 0.98, 0.977,
1128 0.974, 0.974, 0.963, 0.983, 0.988, 0.981, 0.978, 0.966, 0.966, 0.979, 0.983, 0.986, 0.988, 0.989,
1129 0.974, 0.984, 0.987, 0.986, 0.979, 0.828, 0.839, 0.979, 0.988, 0.99, 0.984, 0.975, 0.988, 0.985,
1130 0.985, 0.98, 0.975, 0.975, 0.979, 0.983, 0.986, 0.988, 0.989, 0.974, 0.984, 0.987, 0.986, 0.979,
1131 0.828, 0.839, 0.979, 0.988, 0.99, 0.984, 0.975, 0.988, 0.985, 0.985, 0.98, 0.975, 0.975};
1132 const int i_pT =
binIndex(m.
pT() / GeV, edges_pT,
true);
1133 const int i_eta =
binIndex(m.
eta(), edges_eta,
true);
1134 return vals_pT_eta[i_pT * edges_eta.size() + i_eta];
1163 if (m.
abspid() != PID::MUON)
return 0;
1164 if (m.
abseta() > 2.5)
return 0;
1165 if (m.
pT() < 5*GeV)
return 0;
1167 static const vector<double> edges_pT = {5., 10., 15.};
1168 static const vector<double> edges_eta = {-2.5, -2.27273, -2.04545, -1.81818, -1.59091, -1.36364,
1169 -1.13636, -0.90909, -0.68182, -0.45455, -0.22727, 0.,
1170 0.22727, 0.45455, 0.68182, 0.90909, 1.13636, 1.36364,
1171 1.59091, 1.81818, 2.04545, 2.27273, 2.5};
1172 static const vector<double> vals_pT_eta = {
1173 0.96, 0.955, 0.973, 0.969, 0.951, 0.936, 0.982, 0.982, 0.982, 0.99, 0.874, 0.898, 0.987, 0.985,
1174 0.988, 0.98, 0.93, 0.949, 0.975, 0.974, 0.967, 0.965, 0.965, 0.97, 0.96, 0.976, 0.976, 0.976,
1175 0.943, 0.984, 0.988, 0.988, 0.982, 0.98, 0.978, 0.982, 0.988, 0.989, 0.983, 0.944, 0.973, 0.969,
1176 0.976, 0.961, 0.971, 0.971, 0.97, 0.96, 0.976, 0.976, 0.976, 0.943, 0.984, 0.988, 0.988, 0.982,
1177 0.98, 0.978, 0.982, 0.988, 0.989, 0.983, 0.944, 0.973, 0.969, 0.976, 0.961, 0.971, 0.971};
1178 const int i_pT =
binIndex(m.
pT() / GeV, edges_pT,
true);
1179 const int i_eta =
binIndex(m.
eta(), edges_eta,
true);
1180 return vals_pT_eta[i_pT * edges_eta.size() + i_eta];
1190 if (m.
abspid() != PID::MUON)
return 0;
1191 if (m.
abseta() > 2.5)
return 0;
1192 if (m.
pT() < 5*GeV)
return 0;
1194 static const vector<double> edges_pT = {5., 10., 15.};
1195 static const vector<double> edges_eta = {-2.5, -2.27273, -2.04545, -1.81818, -1.59091, -1.36364,
1196 -1.13636, -0.90909, -0.68182, -0.45455, -0.22727, 0.,
1197 0.22727, 0.45455, 0.68182, 0.90909, 1.13636, 1.36364,
1198 1.59091, 1.81818, 2.04545, 2.27273, 2.5};
1199 static const vector<double> vals_pT_eta = {
1200 0.98, 0.972, 0.981, 0.979, 0.984, 0.967, 0.971, 0.992, 0.983, 0.99, 0.865, 0.878, 0.984, 0.986,
1201 0.996, 0.965, 0.968, 0.982, 0.984, 0.974, 0.98, 0.97, 0.97, 0.981, 0.984, 0.984, 0.987, 0.983,
1202 0.971, 0.983, 0.986, 0.986, 0.98, 0.978, 0.977, 0.982, 0.989, 0.99, 0.983, 0.975, 0.98, 0.976,
1203 0.984, 0.98, 0.979, 0.979, 0.981, 0.984, 0.984, 0.987, 0.983, 0.971, 0.983, 0.986, 0.986, 0.98,
1204 0.978, 0.977, 0.982, 0.989, 0.99, 0.983, 0.975, 0.98, 0.976, 0.984, 0.98, 0.979, 0.979};
1205 const int i_pT =
binIndex(m.
pT() / GeV, edges_pT,
true);
1206 const int i_eta =
binIndex(m.
eta(), edges_eta,
true);
1207 return vals_pT_eta[i_pT * edges_eta.size() + i_eta];
1216 if (m.
abspid() != PID::MUON)
return 0;
1217 if (m.
abseta() > 2.5)
return 0;
1218 if (m.
pT() < 5*GeV)
return 0;
1220 static const vector<double> edges_pT = {5., 10., 15.};
1221 static const vector<double> edges_eta = {-2.5, -2.27273, -2.04545, -1.81818, -1.59091, -1.36364,
1222 -1.13636, -0.90909, -0.68182, -0.45455, -0.22727, 0.,
1223 0.22727, 0.45455, 0.68182, 0.90909, 1.13636, 1.36364,
1224 1.59091, 1.81818, 2.04545, 2.27273, 2.5};
1225 static const vector<double> vals_pT_eta = {
1226 0.975, 0.978, 0.979, 0.985, 0.979, 0.972, 0.98, 0.989, 0.984, 0.987, 0.87, 0.885, 0.989, 0.987,
1227 0.988, 0.98, 0.968, 0.984, 0.988, 0.981, 0.978, 0.966, 0.966, 0.979, 0.983, 0.986, 0.988, 0.989,
1228 0.974, 0.984, 0.987, 0.986, 0.979, 0.972, 0.973, 0.979, 0.988, 0.99, 0.984, 0.975, 0.988, 0.985,
1229 0.985, 0.98, 0.975, 0.975, 0.979, 0.983, 0.986, 0.988, 0.989, 0.974, 0.984, 0.987, 0.986, 0.979,
1230 0.972, 0.973, 0.979, 0.988, 0.99, 0.984, 0.975, 0.988, 0.985, 0.985, 0.98, 0.975, 0.975};
1231 const int i_pT =
binIndex(m.
pT() / GeV, edges_pT,
true);
1232 const int i_eta =
binIndex(m.
eta(), edges_eta,
true);
1233 return vals_pT_eta[i_pT * edges_eta.size() + i_eta];
1261 if (m.
abspid() != PID::MUON)
return 0;
1262 if (m.
abseta() > 2.5)
return 0;
1263 if (m.
pT() < 3*GeV)
return 0;
1264 static const vector<double> edges_pT = {3., 4., 5., 6., 7., 8., 9., 10., 15.,
1265 20., 30., 40., 55., 70., 90., 150., 250.};
1266 static const vector<double> vals_pT = {0.648, 0.739, 0.781, 0.808, 0.836, 0.851, 0.864, 0.903, 0.935,
1267 0.969, 0.991, 0.999, 0.998, 0.998, 0.998, 0.999, 0.999};
1268 return vals_pT[
binIndex(m.
pT() / GeV, edges_pT,
true)];
1277 if (m.
abspid() != PID::MUON)
return 0;
1278 if (m.
abseta() > 2.5)
return 0;
1279 if (m.
pT() < 3*GeV)
return 0;
1280 static const vector<double> edges_pT = {3., 4., 5., 6., 7., 8., 9., 10., 15.,
1281 20., 30., 40., 55., 70., 90., 150., 250.};
1282 static const vector<double> vals_pT = {0.639, 0.731, 0.768, 0.803, 0.825, 0.849, 0.867, 0.9, 0.933,
1283 0.966, 0.99, 0.999, 0.998, 0.999, 0.999, 1., 1.};
1284 return vals_pT[
binIndex(m.
pT() / GeV, edges_pT,
true)];
1293 if (m.
abspid() != PID::MUON)
return 0;
1294 if (m.
abseta() > 2.5)
return 0;
1295 if (m.
pT() < 3*GeV)
return 0;
1296 static const vector<double> edges_pT = {3., 4., 5., 6., 7., 8., 9., 10., 15.,
1297 20., 30., 40., 55., 70., 90., 150., 250.};
1298 static const vector<double> vals_pT = {0.617, 0.705, 0.753, 0.787, 0.815, 0.837, 0.857, 0.894, 0.931,
1299 0.968, 0.99, 0.999, 0.998, 0.998, 0.999, 1., 1.};
1300 return vals_pT[
binIndex(m.
pT() / GeV, edges_pT,
true)];
1325 if (m.
abspid() != PID::MUON)
return 0;
1326 if (m.
abseta() > 2.4)
return 0;
1327 if (m.
pT() < 10*GeV)
return 0;
1328 return 0.95 * (m.
abseta() < 1.5 ? 1 : exp(0.5 - 5e-4 * m.
pT() / GeV));
1388 double resolution = 0;
1390 if (m.
pT() > 0.1*GeV &&
abseta < 2.5) {
1392 resolution =
add_quad(0.01, 2.0e-4 * m.
pT() / GeV);
1395 resolution =
add_quad(0.02, 3.0e-4 * m.
pT() / GeV);
1398 resolution =
add_quad(0.05, 2.6e-4 * m.
pT() / GeV);
1431 if (t.
abseta() > 2.5)
return 0;
1433 double pThadvis = 0;
1438 if (
p.charge3() != 0 &&
p.abseta() < 2.5 &&
p.pT() > 1*GeV) chargedhadrons +=
p;
1441 if (chargedhadrons.empty())
return 0;
1442 if (pThadvis < 20*GeV)
return 0;
1443 if (pThadvis < 40*GeV) {
1444 if (chargedhadrons.size() == 1)
return (t.
abspid() == PID::TAU) ? 0.56 : 0;
1445 if (chargedhadrons.size() == 3)
return (t.
abspid() == PID::TAU) ? 0.38 : 0;
1448 if (chargedhadrons.size() == 1)
return (t.
abspid() == PID::TAU) ? 0.56 : 0;
1449 if (chargedhadrons.size() == 3)
return (t.
abspid() == PID::TAU) ? 0.38 : 0;
1481 if (j.
abseta() > 2.5)
return 0;
1483 double pThadvis = 0;
1488 if (
p.charge3() != 0 &&
p.abseta() < 2.5 &&
p.pT() > 1*GeV) chargedhadrons +=
p;
1492 if (chargedhadrons.empty())
return 0;
1493 if (pThadvis < 20*GeV)
return 0;
1497 if (ttags.empty()) {
1498 if (pThadvis < 40*GeV)
1499 return chargedhadrons.size() == 1 ? 1 / 20.
1500 : chargedhadrons.size() == 3 ? 1 / 100.
1503 return chargedhadrons.size() == 1 ? 1 / 25.
1504 : chargedhadrons.size() == 3 ? 1 / 400.
1508 const Particles prongs = ttags[0].stableDescendants(Cuts::charge3 != 0 && Cuts::pT > 1*GeV
1509 && Cuts::abseta < 2.5);
1510 return prongs.size() == 1 ? 0.56 : 0.38;
1520 if (t.
abspid() != PID::TAU)
return 0;
1521 if (t.
abseta() > 2.5)
return 0;
1523 double pThadvis = 0;
1528 if (
p.charge3() != 0 &&
p.abseta() < 2.5 &&
p.pT() > 1*GeV) chargedhadrons +=
p;
1531 if (chargedhadrons.empty())
return 0;
1532 if (pThadvis < 20*GeV)
return 0;
1533 if (chargedhadrons.size() == 1)
return (t.
abspid() == PID::TAU) ? 0.55 : 0;
1534 if (chargedhadrons.size() == 3)
return (t.
abspid() == PID::TAU) ? 0.40 : 0;
1563 if (j.
abseta() > 2.5)
return 0;
1565 double pThadvis = 0;
1570 if (
p.charge3() != 0 &&
p.abseta() < 2.5 &&
p.pT() > 1*GeV) chargedhadrons +=
p;
1573 if (chargedhadrons.empty())
return 0;
1574 if (pThadvis < 20*GeV)
return 0;
1575 if (chargedhadrons.size() != 1 && chargedhadrons.size() != 3)
return 0;
1584 return chargedhadrons.size() == 1 ? 1 / 50. : 1 / 110.;
1585 const Particles prongs = ttags[0].stableDescendants(Cuts::charge3 != 0 && Cuts::pT > 1*GeV
1586 && Cuts::abseta < 2.5);
1587 return prongs.size() == 1 ? 0.55 : 0.40;
1594 if (j.
abseta() > 2.5)
return 0;
1596 double pThadvis = 0;
1601 if (
p.charge3() != 0 &&
p.abseta() < 2.5 &&
p.pT() > 1*GeV) chargedhadrons +=
p;
1604 if (chargedhadrons.empty())
return 0;
1605 if (pThadvis < 20*GeV)
return 0;
1606 if (chargedhadrons.size() != 1 && chargedhadrons.size() != 3)
return 0;
1608 if (ttags.empty())
return 1 / 30.;
1609 const Particles prongs = ttags[0].stableDescendants(Cuts::charge3 != 0 && Cuts::pT > 1*GeV
1610 && Cuts::abseta < 2.5);
1611 return prongs.size() == 1 ? 0.60 : 0.50;
1618 if (j.
abseta() > 2.5)
return 0;
1620 double pThadvis = 0;
1625 if (
p.charge3() != 0 &&
p.abseta() < 2.5 &&
p.pT() > 1*GeV) chargedhadrons +=
p;
1628 if (chargedhadrons.empty())
return 0;
1629 if (pThadvis < 20*GeV)
return 0;
1630 if (chargedhadrons.size() != 1 && chargedhadrons.size() != 3)
return 0;
1633 return chargedhadrons.size() == 1 ? 1 / 120. : 1 / 300.;
1634 const Particles prongs = ttags[0].stableDescendants(Cuts::charge3 != 0 && Cuts::pT > 1*GeV
1635 && Cuts::abseta < 2.5);
1636 return prongs.size() == 1 ? 0.45 : 0.30;
1658 static const vector<double> binedges_pt = {0., 50., 70., 100., 150., 200., 1000., 10000.};
1659 static const vector<double> jer = {0.145, 0.115, 0.095, 0.075,
1660 0.07, 0.05, 0.04, 0.04};
1661 const int ipt =
binIndex(t.
pT() / GeV, binedges_pt,
true);
1662 if (ipt < 0)
return t;
1663 const double resolution = jer.at(ipt);
1668 const double fsmear =
max(
randnorm(1., resolution), 0.);
1688 if (t.
abspid() != PID::TAU)
return 0;
1689 return (t.
abspid() == PID::TAU) ? 0.6 : 0;
1714 if (t.
abspid() != PID::TAU)
return 0;
1715 return (t.
abspid() == PID::TAU) ? 0.6 : 0;
1761 if (j.
abseta() > 2.5)
return 0;
1762 if (j.
bTagged(Cuts::pT > 5*GeV, 0.3))
1763 return 0.80 * tanh(0.003 * j.
pT() / GeV) * (30 / (1 + 0.0860 * j.
pT() / GeV));
1764 if (j.
cTagged(Cuts::pT > 5*GeV, 0.3))
1765 return 0.20 * tanh(0.020 * j.
pT() / GeV) * (1 / (1 + 0.0034 * j.
pT() / GeV));
1766 return 0.002 + 7.3e-6 * j.
pT() / GeV;
1775 if (j.
abseta() > 2.5)
return 0;
1776 if (j.
bTagged(Cuts::pT > 5*GeV, 0.3))
return 0.77;
1777 if (j.
cTagged(Cuts::pT > 5*GeV, 0.3))
return 1 / 4.5;
1783 if (j.
abseta() > 2.5)
return 0;
1784 if (j.
bTagged(Cuts::pT > 5*GeV, 0.3))
return 0.77;
1785 if (j.
cTagged(Cuts::pT > 5*GeV, 0.3))
return 1 / 6.0;
1794 if (j.
abseta() > 2.5)
return 0;
1795 if (j.
bTagged(Cuts::pT > 5*GeV, 0.3)) {
1803 const static vector<double> binedges_pt = {0.00, 30.0, 40.00, 50.00, 60.0, 75.00,
1804 90.0, 105., 150., 200., 500};
1805 const static vector<double> eff_pt = {0.63, 0.705, 0.74, 0.76, 0.775, 0.785,
1806 0.795, 0.80, 0.79, 0.75, 0.68};
1808 return eff_pt[
binIndex(j.
pt(), binedges_pt,
true)];
1810 else if (j.
cTagged(Cuts::pT > 5*GeV, 0.3)) {
1826 if (j.
abseta() > 2.5)
return 0.;
1828 if (j.
bTagged(Cuts::pT > 5*GeV, 0.3)) {
1841 const static vector<double> binedges_pt = {0.00, 20., 30., 40., 60., 85., 110.,
1842 140., 175., 250., 400., 800., 1200., 2000.};
1843 const static vector<double> eff_pt = {0.0, 0.68, 0.74, 0.77, 0.79, 0.8, 0.81,
1844 0.81, 0.805, 0.78, 0.75, 0.7, 0.65, 0.5};
1846 return eff_pt[
binIndex(j.
pt(), binedges_pt,
true)];
1848 else if (j.
cTagged(Cuts::pT > 5*GeV, 0.3)) {
1867 if (j.
abseta() > 2.5)
return 0;
1868 if (j.
pt() <= 20*GeV)
return 0.;
1870 const static vector<double> binedges_pt = {20., 30., 40., 60., 85., 110., 140.,
1871 175., 210., 250., 400., 600., 800., 1000.,
1872 1200., 1400., 1500., 2000.0, 3000.0};
1874 if (j.
bTagged(Cuts::pT > 5*GeV, 0.3)) {
1876 const static vector<double> eff_pt = {0.667, 0.731, 0.771, 0.791, 0.801, 0.805, 0.806,
1877 0.798, 0.795, 0.825, 0.802, 0.771, 0.741, 0.706,
1878 0.679, 0.674, 0.634, 0.5, 0.5};
1880 return eff_pt[
binIndex(j.
pt(), binedges_pt,
true)];
1882 else if (j.
cTagged(Cuts::pT > 5*GeV, 0.3)) {
1883 const static vector<double> c_rej_pt = {5.30, 5.23, 5.55, 5.91, 6.13, 6.30, 6.32, 6.50, 6.10, 3.04,
1884 3.05, 3.21, 3.37, 3.616, 3.83, 3.96, 4.01, 2.90, 2.90};
1886 return 1. / c_rej_pt[
binIndex(j.
pt(), binedges_pt,
true)];
1889 const static vector<double> light_rej_pt = {143, 191, 239, 261, 235, 257, 248, 189, 158, 32.8,
1890 19.1, 14.2, 12.4, 11.2, 11.0, 11.2, 12.4, 8.27, 8.27};
1892 return 1. / light_rej_pt[
binIndex(j.
pt(), binedges_pt,
true)];
1905 static const vector<double> binedges_pt = {0., 50., 70., 100., 150., 200., 1000., 10000.};
1906 static const vector<double> jer = {0.145, 0.115, 0.095, 0.075,
1907 0.07, 0.05, 0.04, 0.04};
1908 const int ipt =
binIndex(j.
pT() / GeV, binedges_pt,
true);
1909 if (ipt < 0)
return j;
1910 const double resolution = jer.at(ipt);
1915 const double fsmear =
max(
randnorm(1., resolution), 0.);
1955 if (met.
mod() < 25*GeV)
1956 smeared_met *= 1.05;
1957 else if (met.
mod() < 40*GeV)
1958 smeared_met *= (1.05 - (0.04 / 15) * (met.
mod() / GeV - 25));
1960 smeared_met *= 1.01;
1962 return {smeared_met, 0.45 * sqrt(set / GeV) * GeV, 0.0};
1982 const Vector3 smeared_met = met * (1 + 0.45 *
min(1.0, exp(-(met.
mod() - 25*GeV) / (10*GeV))) - 0.02);
1986 const double resolution1 = (set < 180*GeV ? set / 180. : 1) * 0.45 * sqrt(
max(set / GeV, 180)) * GeV;
1990 const double resolution2 = 15*GeV + 0.5 * sqrt(met.
mod() / GeV) * GeV;
1995 const double sigma =
min(resolution1, resolution2);
1997 return {smeared_met, sigma, 0.0};
2014 const Vector3 smeared_met = met * (1 + 1.15 * exp(-met.
mod() / (20*GeV)) - 0.01);
2019 const double resolution = 20*GeV;
2021 return {smeared_met, resolution, 0.0};
2035 const double resolution_x = (1.1 + 0.6 * sqrt(set / GeV)) * GeV;
2036 const double resolution_y = (1.4 + 0.6 * sqrt(set / GeV)) * GeV;
2037 const double resolution = sqrt(
sqr(resolution_x) +
sqr(resolution_y));
2038 return {met, resolution, 0.0};
2052 const double resolution_para = (2.0 + 0.64 * sqrt(set / GeV)) * GeV;
2053 const double resolution_perp = (-1.5 + 0.68 * sqrt(set / GeV)) * GeV;
2054 const double resolution = sqrt(
sqr(resolution_para) +
sqr(resolution_perp));
2055 return {met, resolution, 0.0};
2071 if (
p.charge3() == 0)
return 0;
2072 if (
p.abseta() > 2.5)
return 0;
2073 if (
p.pT() < 0.1*GeV)
return 0;
2075 if (
p.abspid() == PID::ELECTRON) {
2076 if (
p.abseta() < 1.5) {
2077 if (
p.pT() < 1*GeV)
return 0.73;
2078 if (
p.pT() < 100*GeV)
return 0.95;
2082 if (
p.pT() < 1*GeV)
return 0.50;
2083 if (
p.pT() < 100*GeV)
2089 else if (
p.abspid() == PID::MUON) {
2090 if (
p.abseta() < 1.5) {
2091 return (
p.pT() < 1*GeV) ? 0.75 : 0.99;
2094 return (
p.pT() < 1*GeV) ? 0.70 : 0.98;
2098 if (
p.abseta() < 1.5) {
2099 return (
p.pT() < 1*GeV) ? 0.70 : 0.95;
2102 return (
p.pT() < 1*GeV) ? 0.60 : 0.85;
2131 if (
p.charge3() == 0)
return 0;
2132 if (
p.abseta() > 2.5)
return 0;
2133 if (
p.pT() < 0.1*GeV)
return 0;
2135 if (
p.abspid() == PID::ELECTRON) {
2136 if (
p.abseta() < 1.5) {
2137 if (
p.pT() < 1*GeV)
return 0.73;
2138 if (
p.pT() < 100*GeV)
return 0.95;
2142 if (
p.pT() < 1*GeV)
return 0.50;
2143 if (
p.pT() < 100*GeV)
2149 else if (
p.abspid() == PID::MUON) {
2150 if (
p.abseta() < 1.5) {
2151 return (
p.pT() < 1*GeV) ? 0.75 : 0.99;
2154 return (
p.pT() < 1*GeV) ? 0.70 : 0.98;
2158 if (
p.abseta() < 1.5) {
2159 return (
p.pT() < 1*GeV) ? 0.70 : 0.95;
2162 return (
p.pT() < 1*GeV) ? 0.60 : 0.85;
2196 if (j.
abseta() > 2.4)
return 1.0;
2198 if (j.
pt() <= 20*GeV || j.
pt() >= 60*GeV)
return 1.0;
2200 const static vector<double> binedges_pt = {20*GeV, 25*GeV, 30*GeV, 35*GeV, 40*GeV,
2201 45*GeV, 50*GeV, 55*GeV, 60*GeV};
2202 const static vector<double> binvals = {0.9, 0.93, 0.94, 0.95, 0.96, 0.96, 0.97, 0.97};
2204 const size_t bini =
binIndex(j.
pt(), binedges_pt);
2205 return binvals[bini];
2216 if (j.
abseta() > 2.4)
return 1.0;
2218 if (j.
pt() <= 20*GeV || j.
pt() >= 60*GeV)
return 1.0;
2220 const static vector<double> binedges_pt = {20*GeV, 25*GeV, 30*GeV, 35*GeV, 40*GeV,
2221 45*GeV, 50*GeV, 55*GeV, 60*GeV};
2222 const static vector<double> binvals = {0.86, 0.9, 0.92, 0.93, 0.94, 0.95, 0.95, 0.96};
2224 const size_t bini =
binIndex(j.
pt(), binedges_pt);
2225 return binvals[bini];
2236 if (j.
abseta() > 2.4)
return 1.0;
2238 if (j.
pt() <= 20*GeV || j.
pt() >= 60*GeV)
return 1.0;
2240 const static vector<double> binedges_pt = {20*GeV, 25*GeV, 30*GeV, 35*GeV, 40*GeV,
2241 45*GeV, 50*GeV, 55*GeV, 60*GeV};
2242 const static vector<double> binvals = {0.81, 0.84, 0.87, 0.90, 0.91, 0.92, 0.93, 0.94};
2244 const size_t bini =
binIndex(j.
pt(), binedges_pt);
2245 return binvals[bini];
2256 template <
typename T>
2258 const vector<pair<function<
double(
const T&)>,
double>>& effs) {
2260 for (
const auto& el : effs) {
2261 if (!(el.second >= 0))
throw UserError(
"lumiWeightedEff: luminosities must be >= 0");
2262 sumlumi += el.second;
2264 if (!(sumlumi > 0))
throw UserError(
"lumiWeightedEff: needs a positive total luminosity");
2265 return [effs, sumlumi](
const T& x) {
2267 for (
const auto& el : effs)
sum += el.second * el.first(x);
2268 return sum / sumlumi;
2278 inline double ELECTRON_EFF_IDENTITY_LOOSE(
const Particle& e) {
2281 inline double ELECTRON_EFF_IDENTITY_MEDIUM(
const Particle& e) {
2284 inline double ELECTRON_EFF_IDENTITY_TIGHT(
const Particle& e) {
2287 inline double MUON_EFF_IDENTITY_LOOSE(
const Particle& m) {
2290 inline double MUON_EFF_IDENTITY_MEDIUM(
const Particle& m) {
2293 inline double MUON_EFF_IDENTITY_TIGHT(
const Particle& m) {
2296 inline double PHOTON_EFF_IDENTITY_LOOSE(
const Particle& y) {
2299 inline double PHOTON_EFF_IDENTITY_MEDIUM(
const Particle& y) {
2302 inline double PHOTON_EFF_IDENTITY_TIGHT(
const Particle& y) {
2305 inline double TAU_EFF_IDENTITY_LOOSE(
const Particle& t) {
2308 inline double TAU_EFF_IDENTITY_MEDIUM(
const Particle& t) {
2311 inline double TAU_EFF_IDENTITY_TIGHT(
const Particle& t) {
2328 inline double TRK_EFF_IDENTITY_TIGHT(
const Particle& trk) {
2335 inline double JET_BTAG_IDENTITY_IDENTITY(
const Jet& j) {
static FourMomentum mkXYZM(double px, double py, double pz, double mass)
Make a vector from (px,py,pz) coordinates and the mass.
Definition Vector4.hh:809
Representation of a clustered jet of particles.
Definition Jet.hh:47
bool cTagged(const Cut &c=Cuts::open(), double dRmax=-1) const
Does this jet have at least one c-tag? (with optional Cut and dR restriction).
Definition Jet.hh:217
Particles & particles()
Get the particles in this jet.
Definition Jet.hh:84
bool tauTagged(const Cut &c=Cuts::open(), double dRmax=-1) const
Does this jet have at least one tau-tag (with optional Cut and dR restriction).
Definition Jet.hh:246
bool bTagged(const Cut &c=Cuts::open(), double dRmax=-1) const
Does this jet have at least one b-tag? (with optional Cut and dR restriction).
Definition Jet.hh:188
Particles tauTags(const Cut &c=Cuts::open(), double dRmax=-1) const
Get the tau particles tag-matched to this jet.
double py() const
y component of momentum.
Definition ParticleBase.hh:190
double pT() const
Get the directly (alias).
Definition ParticleBase.hh:81
double mass2() const
Get the mass**2 directly.
Definition ParticleBase.hh:116
double abseta() const
Get the directly (alias).
Definition ParticleBase.hh:133
double mass() const
Get the mass directly.
Definition ParticleBase.hh:112
double pz() const
z component of momentum.
Definition ParticleBase.hh:194
double pt() const
Get the directly.
Definition ParticleBase.hh:77
double px() const
x component of momentum.
Definition ParticleBase.hh:186
double eta() const
Get the directly (alias).
Definition ParticleBase.hh:125
double Et() const
Get the directly.
Definition ParticleBase.hh:103
double E() const
Get the energy directly.
Definition ParticleBase.hh:59
double E2() const
Get the energy-squared.
Definition ParticleBase.hh:68
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:50
PdgId pid() const
This Particle's PDG ID code.
Definition Particle.hh:221
PdgId abspid() const
Absolute value of the PDG ID code.
Definition Particle.hh:225
Particles children(const Cut &c=Cuts::OPEN) const
Get a list of the direct descendants from the current particle (with optional selection Cut).
Specialised vector of Particle objects.
Definition Particle.hh:21
Three-dimensional specialisation of Vector.
Definition Vector3.hh:39
double mod() const
Calculate the modulus of a vector. .
Definition VectorN.hh:99
double mass(const FourMomentum &a, const FourMomentum &b)
Calculate mass of two 4-vectors.
Definition Vector4.hh:1474
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:819
double abseta(const ParticleBase &p)
Unbound function access to abseta.
Definition ParticleBaseUtils.hh:844
double ELECTRON_EFF_ATLAS_RUN1_MEDIUM(const Particle &e)
ATLAS Run 1 'medium' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:103
double ELECTRON_EFF_ATLAS_RUN1_TIGHT(const Particle &e)
ATLAS Run 1 'tight' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:182
double ELECTRON_EFF_ATLAS_RUN2_LOOSE(const Particle &e)
ATLAS Run 2 'loose' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:75
double ELECTRON_EFF_CMS_RUN1(const Particle &e)
CMS Run 1 electron reconstruction efficiency.
Definition ExptSmearingFunctions.hh:499
Particle ELECTRON_SMEAR_ATLAS_RUN1(const Particle &e)
ATLAS Run 1 electron reco smearing.
Definition ExptSmearingFunctions.hh:464
double ELECTRON_EFF_CMS_RUN2_TIGHT(const Particle &e)
Definition ExptSmearingFunctions.hh:547
function< double(const T &)> lumiWeightedEff(const vector< pair< function< double(const T &)>, double > > &effs)
Luminosity-weighted average of per-period efficiency functions, sum_i L_i eff_i / sum_i L_i.
Definition ExptSmearingFunctions.hh:2257
double ELECTRON_IDEFF_ATLAS_RUN2_TIGHT(const Particle &e)
ATLAS Run 2 electron identification efficiency, Tight likelihood working point.
Definition ExptSmearingFunctions.hh:338
double ELECTRON_ISOEFF_ATLAS_RUN2_FCLOOSE(const Particle &e)
ATLAS Run 2 electron isolation efficiency, FCLoose working point.
Definition ExptSmearingFunctions.hh:365
double ELECTRON_ISOEFF_ATLAS_RUN2_FCTIGHT(const Particle &e)
ATLAS Run 2 electron isolation efficiency, FCTight working point.
Definition ExptSmearingFunctions.hh:392
double ELECTRON_EFF_ATLAS_RUN2_TIGHT(const Particle &e)
ATLAS Run 2 'tight' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:254
double ELECTRON_EFF_CMS_RUN1_MEDIUM(const Particle &e)
Definition ExptSmearingFunctions.hh:514
double ELECTRON_RECOEFF_ATLAS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:57
Particle ELECTRON_SMEAR_CMS_RUN1(const Particle &e)
CMS electron energy smearing, preserving direction.
Definition ExptSmearingFunctions.hh:558
double ELECTRON_EFF_CMS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:528
double ELECTRON_IDEFF_ATLAS_RUN2_MEDIUM(const Particle &e)
ATLAS Run 2 electron identification efficiency, Medium likelihood working point.
Definition ExptSmearingFunctions.hh:312
double ELECTRON_EFF_ATLAS_RUN2_MEDIUM(const Particle &e)
ATLAS Run 2 'medium' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:175
double ELECTRON_EFF_CMS_RUN2_MEDIUM(const Particle &e)
Definition ExptSmearingFunctions.hh:541
Particle ELECTRON_SMEAR_ATLAS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:490
double ELECTRON_ISOEFF_ATLAS_RUN2_GRADIENT(const Particle &e)
ATLAS Run 2 electron isolation efficiency, "Gradient" working point.
Definition ExptSmearingFunctions.hh:419
double ELECTRON_EFF_ATLAS_RUN1_LOOSE(const Particle &e)
Pretend that ATLAS Run 1 loose was the same as in Run 2.
Definition ExptSmearingFunctions.hh:97
double ELECTRON_EFF_CMS_RUN1_LOOSE(const Particle &e)
Definition ExptSmearingFunctions.hh:508
double ELECTRON_RECOEFF_ATLAS_RUN1(const Particle &e)
Definition ExptSmearingFunctions.hh:47
Particle ELECTRON_SMEAR_CMS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:584
double ELECTRON_IDEFF_ATLAS_RUN2_LOOSE(const Particle &e)
ATLAS Run 2 electron identification efficiency, Loose likelihood working point.
Definition ExptSmearingFunctions.hh:286
double ELECTRON_EFF_CMS_RUN2_LOOSE(const Particle &e)
Definition ExptSmearingFunctions.hh:535
double ELECTRON_ISOEFF_ATLAS_RUN2_HIGHPTCALOONLY(const Particle &e)
ATLAS Run 2 electron isolation efficiency, HighPtCaloOnly working point.
Definition ExptSmearingFunctions.hh:446
double ELECTRON_EFF_CMS_RUN1_TIGHT(const Particle &e)
Definition ExptSmearingFunctions.hh:520
Jet JET_SMEAR_ATLAS_RUN2(const Jet &j)
Definition ExptSmearingFunctions.hh:1925
double JET_BTAG_ATLAS_RUN2_MV2C20(const Jet &j)
Return the ATLAS Run 2 MC2c20 77% WP jet flavour tagging efficiency for the given Jet.
Definition ExptSmearingFunctions.hh:1774
Jet JET_SMEAR_ATLAS_RUN1(const Jet &j)
ATLAS Run 1 jet smearing.
Definition ExptSmearingFunctions.hh:1901
double JET_BTAG_ATLAS_RUN2_DL1d_77(const Jet &j)
Definition ExptSmearingFunctions.hh:1825
double JET_BTAG_ATLAS_RUN2_2016_MV2C10_77(const Jet &j)
Definition ExptSmearingFunctions.hh:1793
double JET_BTAG_ATLAS_RUN2_DL1r_77(const Jet &j)
Definition ExptSmearingFunctions.hh:1866
Jet JET_SMEAR_CMS_RUN1(const Jet &j)
Definition ExptSmearingFunctions.hh:1932
Jet JET_SMEAR_CMS_RUN2(const Jet &j)
Definition ExptSmearingFunctions.hh:1939
double JET_BTAG_ATLAS_RUN2_MV2C10(const Jet &j)
Return the ATLAS Run 2 MC2c10 77% WP jet flavour tagging efficiency for the given Jet.
Definition ExptSmearingFunctions.hh:1782
double JET_BTAG_ATLAS_RUN1_XXX(const Jet &j)
Alias for naming scheme.
Definition ExptSmearingFunctions.hh:1769
double JET_BTAG_ATLAS_RUN1(const Jet &j)
Return the ATLAS Run 1 jet flavour tagging efficiency for the given Jet, from Delphes.
Definition ExptSmearingFunctions.hh:1759
METSmearParams MET_SMEARPARAMS_ATLAS_RUN2(const Vector3 &met, double set)
Definition ExptSmearingFunctions.hh:1974
Vector3 MET_SMEAR_ATLAS_RUN2(const Vector3 &met, double set)
ATLAS Run 2 ETmiss smearing.
Definition ExptSmearingFunctions.hh:2001
Vector3 MET_SMEAR_ATLAS_RUN2_PFLOW(const Vector3 &met, double set)
ATLAS Run 2 pflow ETmiss smearing.
Definition ExptSmearingFunctions.hh:2025
METSmearParams MET_SMEARPARAMS_ATLAS_RUN2_PFLOW(const Vector3 &met, double)
Definition ExptSmearingFunctions.hh:2011
METSmearParams MET_SMEARPARAMS_ATLAS_RUN1(const Vector3 &met, double set)
ATLAS Run 1 ETmiss resolution.
Definition ExptSmearingFunctions.hh:1952
Vector3 MET_SMEAR_CMS_RUN1(const Vector3 &met, double set)
CMS Run 1 ETmiss smearing.
Definition ExptSmearingFunctions.hh:2042
Vector3 MET_SMEAR_NORM(const METSmearParams &msps)
Smear a nominal vector magnitude by Gaussian with the given absolute resolutions.
Definition MomentumSmearingFunctions.hh:187
Vector3 MET_SMEAR_ATLAS_RUN1(const Vector3 &met, double set)
ATLAS Run 1 ETmiss smearing.
Definition ExptSmearingFunctions.hh:1966
Vector3 MET_SMEAR_CMS_RUN2(const Vector3 &met, double set)
CMS Run 2 ETmiss smearing.
Definition ExptSmearingFunctions.hh:2059
METSmearParams MET_SMEARPARAMS_CMS_RUN1(const Vector3 &met, double set)
Definition ExptSmearingFunctions.hh:2033
METSmearParams MET_SMEARPARAMS_CMS_RUN2(const Vector3 &met, double set)
CMS Run 2 ETmiss smearing.
Definition ExptSmearingFunctions.hh:2050
FourMomentum P4_SMEAR_E_GAUSS(const FourMomentum &p, double resolution)
Definition MomentumSmearingFunctions.hh:76
FourMomentum P4_SMEAR_PT_GAUSS(const FourMomentum &p, double resolution)
Smear a FourMomentum's transverse momentum using a Gaussian of absolute width resolution.
Definition MomentumSmearingFunctions.hh:84
double MUON_RECOIDEFF_ATLAS_RUN2_MEDIUM(const Particle &m)
ATLAS Run 2 muon reconstruction x identification efficiency, Medium working point.
Definition ExptSmearingFunctions.hh:908
double MUON_EFF_ATLAS_RUN1_LOOSE(const Particle &m)
Definition ExptSmearingFunctions.hh:770
double MUON_RECOIDEFF_ATLAS_RUN2_LOOSE(const Particle &m)
ATLAS Run 2 muon reconstruction x identification efficiency, Loose working point.
Definition ExptSmearingFunctions.hh:887
double MUON_EFF_ATLAS_RUN2_TIGHT(const Particle &m)
ATLAS Run 2 muon reco+ID efficiency.
Definition ExptSmearingFunctions.hh:859
Particle MUON_SMEAR_ATLAS_RUN1(const Particle &m)
Definition ExptSmearingFunctions.hh:1012
Particle MUON_SMEAR_CMS_RUN1(const Particle &m)
CMS Run 1 muon reco smearing.
Definition ExptSmearingFunctions.hh:1383
double MUON_ISOEFF_ATLAS_RUN3_PFLOWLOOSE_VARRAD_2022(const Particle &m)
ATLAS Run 3 muon isolation efficiency, PflowLoose_VarRad working point, 2022 data.
Definition ExptSmearingFunctions.hh:1260
double MUON_ISOEFF_ATLAS_RUN2_FCLOOSE(const Particle &m)
ATLAS Run 2 muon isolation efficiency, FCLoose working point.
Definition ExptSmearingFunctions.hh:955
double MUON_EFF_ATLAS_RUN2_LOOSE(const Particle &m)
ATLAS Run 2 muon reco+ID efficiency.
Definition ExptSmearingFunctions.hh:820
double MUON_EFF_CMS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:1356
double MUON_EFF_ATLAS_RUN1(const Particle &m)
ATLAS Run 1 muon reco efficiency.
Definition ExptSmearingFunctions.hh:761
double MUON_RECOIDEFF_ATLAS_RUN3_MEDIUM_2024(const Particle &m)
ATLAS Run 3 Medium muon reconstruction x identification efficiency, 2024 data.
Definition ExptSmearingFunctions.hh:1116
double MUON_EFF_CMS_RUN2_TIGHT(const Particle &m)
Definition ExptSmearingFunctions.hh:1377
double MUON_ISOEFF_ATLAS_RUN2_LOOSE(const Particle &m)
ATLAS Run 2 muon isolation efficiency, PflowLoose working point.
Definition ExptSmearingFunctions.hh:804
double MUON_EFF_CMS_RUN2_LOOSE(const Particle &m)
Definition ExptSmearingFunctions.hh:1363
double MUON_ISOEFF_ATLAS_RUN3_PFLOWLOOSE_VARRAD_2024(const Particle &m)
ATLAS Run 3 muon isolation efficiency, PflowLoose_VarRad working point, 2024 data.
Definition ExptSmearingFunctions.hh:1292
Particle MUON_SMEAR_ATLAS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:1042
double MUON_RECOIDEFF_ATLAS_RUN3_LOOSE_2022(const Particle &m)
ATLAS Run 3 Loose muon reconstruction x identification efficiency, 2022 data.
Definition ExptSmearingFunctions.hh:1162
double MUON_RECOEFF_ATLAS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:790
double MUON_RECOIDEFF_ATLAS_RUN3_LOOSE(const Particle &m)
ATLAS Run 3 Loose muon reconstruction x identification efficiency, all published years.
Definition ExptSmearingFunctions.hh:1248
double MUON_ISOEFF_ATLAS_RUN2_FCTIGHT(const Particle &m)
ATLAS Run 2 muon isolation efficiency, FCTight working point.
Definition ExptSmearingFunctions.hh:976
double MUON_ISOEFF_ATLAS_RUN2_PLBDTTIGHT(const Particle &m)
ATLAS Run 2 muon isolation efficiency, PLBDTTight working point.
Definition ExptSmearingFunctions.hh:997
double MUON_RECOIDEFF_ATLAS_RUN3_MEDIUM_2022(const Particle &m)
ATLAS Run 3 Medium muon reconstruction x identification efficiency, 2022 data.
Definition ExptSmearingFunctions.hh:1064
double MUON_ISOEFF_ATLAS_RUN3_PFLOWLOOSE_VARRAD(const Particle &m)
ATLAS Run 3 muon isolation efficiency, PflowLoose_VarRad working point, all published years.
Definition ExptSmearingFunctions.hh:1314
double MUON_ISOEFF_ATLAS_RUN3_PFLOWLOOSE_VARRAD_2023(const Particle &m)
ATLAS Run 3 muon isolation efficiency, PflowLoose_VarRad working point, 2023 data.
Definition ExptSmearingFunctions.hh:1276
double MUON_EFF_CMS_RUN1(const Particle &m)
CMS Run 1 muon reco efficiency.
Definition ExptSmearingFunctions.hh:1324
double MUON_EFF_CMS_RUN1_TIGHT(const Particle &m)
Definition ExptSmearingFunctions.hh:1348
double MUON_RECOIDEFF_ATLAS_RUN3_MEDIUM(const Particle &m)
ATLAS Run 3 Medium muon reconstruction x identification efficiency, all published years.
Definition ExptSmearingFunctions.hh:1148
double MUON_RECOIDEFF_ATLAS_RUN3_LOOSE_2024(const Particle &m)
ATLAS Run 3 Loose muon reconstruction x identification efficiency, 2024 data.
Definition ExptSmearingFunctions.hh:1215
double MUON_RECOIDEFF_ATLAS_RUN2_TIGHT(const Particle &m)
ATLAS Run 2 muon reconstruction x identification efficiency, Tight working point.
Definition ExptSmearingFunctions.hh:932
double MUON_RECOIDEFF_ATLAS_RUN3_MEDIUM_2023(const Particle &m)
ATLAS Run 3 Medium muon reconstruction x identification efficiency, 2023 data.
Definition ExptSmearingFunctions.hh:1090
double MUON_EFF_ATLAS_RUN1_TIGHT(const Particle &m)
Definition ExptSmearingFunctions.hh:782
double MUON_RECOIDEFF_ATLAS_RUN3_LOOSE_2023(const Particle &m)
ATLAS Run 3 Loose muon reconstruction x identification efficiency, 2023 data.
Definition ExptSmearingFunctions.hh:1189
double MUON_EFF_CMS_RUN2_MEDIUM(const Particle &m)
Definition ExptSmearingFunctions.hh:1370
double MUON_EFF_CMS_RUN1_LOOSE(const Particle &m)
Definition ExptSmearingFunctions.hh:1334
double MUON_EFF_CMS_RUN1_MEDIUM(const Particle &m)
Definition ExptSmearingFunctions.hh:1341
double MUON_EFF_ATLAS_RUN1_MEDIUM(const Particle &m)
Definition ExptSmearingFunctions.hh:776
Particle MUON_SMEAR_CMS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:1413
double MUON_EFF_ATLAS_RUN2_MEDIUM(const Particle &m)
ATLAS Run 2 muon reco+ID efficiency.
Definition ExptSmearingFunctions.hh:837
double PARTICLE_EFF_ONE(const Particle &)
Take a Particle and return 1.
Definition ParticleSmearingFunctions.hh:39
Particle PARTICLE_SMEAR_IDENTITY(const Particle &p)
Take a Particle and return it unmodified.
Definition ParticleSmearingFunctions.hh:80
double JET_BTAG_IDENTITY(const Jet &j)
Alias for JET_BTAG_PERFECT.
Definition JetSmearingFunctions.hh:91
double PHOTON_EFF_CMS_RUN1_TIGHT(const Particle &y)
Definition ExptSmearingFunctions.hh:708
double PHOTON_EFF_CMS_RUN2_TIGHT(const Particle &y)
Definition ExptSmearingFunctions.hh:735
double PHOTON_EFF_CMS_RUN2_LOOSE(const Particle &y)
Definition ExptSmearingFunctions.hh:723
double PHOTON_EFF_ATLAS_RUN2_TIGHT(const Particle &y)
Definition ExptSmearingFunctions.hh:680
double PHOTON_EFF_ATLAS_RUN1_MEDIUM(const Particle &y)
Definition ExptSmearingFunctions.hh:628
Particle PHOTON_SMEAR_ATLAS_RUN1(const Particle &y)
Definition ExptSmearingFunctions.hh:741
double PHOTON_EFF_ATLAS_RUN1_TIGHT(const Particle &y)
Definition ExptSmearingFunctions.hh:634
double PHOTON_EFF_ATLAS_RUN2_LOOSE(const Particle &y)
Definition ExptSmearingFunctions.hh:668
double PHOTON_EFF_ATLAS_RUN2_MEDIUM(const Particle &y)
Definition ExptSmearingFunctions.hh:674
double PHOTON_EFF_ATLAS_RUN1(const Particle &y)
ATLAS Run 2 photon reco efficiency.
Definition ExptSmearingFunctions.hh:597
double PHOTON_EFF_CMS_RUN2_MEDIUM(const Particle &y)
Definition ExptSmearingFunctions.hh:729
double PHOTON_EFF_CMS_RUN1_LOOSE(const Particle &y)
Definition ExptSmearingFunctions.hh:696
double PHOTON_EFF_CMS_RUN2(const Particle &y)
Definition ExptSmearingFunctions.hh:716
double PHOTON_EFF_CMS_RUN1(const Particle &y)
Definition ExptSmearingFunctions.hh:688
double PHOTON_EFF_ATLAS_RUN2(const Particle &y)
ATLAS Run 2 photon identification efficiency (tight ID).
Definition ExptSmearingFunctions.hh:643
double PHOTON_EFF_ATLAS_RUN1_LOOSE(const Particle &y)
Definition ExptSmearingFunctions.hh:622
double PHOTON_EFF_CMS_RUN1_MEDIUM(const Particle &y)
Definition ExptSmearingFunctions.hh:702
double TAU_EFF_ATLAS_RUN2_LOOSE(const Particle &t)
Definition ExptSmearingFunctions.hh:1546
double TAU_EFF_ATLAS_RUN2_MEDIUM(const Particle &t)
ATLAS Run 2 13 TeV tau efficiencies (medium working point).
Definition ExptSmearingFunctions.hh:1519
double TAUJET_EFF_ATLAS_RUN1(const Jet &j)
ATLAS Run 1 8 TeV tau misID rates (medium working point).
Definition ExptSmearingFunctions.hh:1480
double TAU_EFF_ATLAS_RUN2_TIGHT(const Particle &t)
Definition ExptSmearingFunctions.hh:1552
double TAU_EFF_ATLAS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:1456
double TAUJET_EFF_ATLAS_RUN2_LOOSE(const Jet &j)
ATLAS Run 2 13 TeV jet tau-tag efficiency and misID rate (loose working point).
Definition ExptSmearingFunctions.hh:1593
Particle TAU_SMEAR_CMS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:1740
double TAU_EFF_ATLAS_RUN1_MEDIUM(const Particle &t)
ATLAS Run 1 8 TeV tau efficiencies (medium working point).
Definition ExptSmearingFunctions.hh:1430
double TAU_EFF_ATLAS_RUN1_TIGHT(const Particle &t)
Definition ExptSmearingFunctions.hh:1468
Particle TAU_SMEAR_CMS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:1748
double TAU_EFF_CMS_RUN2_TIGHT(const Particle &t)
Definition ExptSmearingFunctions.hh:1732
double TAU_EFF_CMS_RUN1_TIGHT(const Particle &t)
Definition ExptSmearingFunctions.hh:1706
double TAUJET_EFF_ATLAS_RUN2_TIGHT(const Jet &j)
ATLAS Run 2 13 TeV jet tau-tag efficiency and misID rate (tight working point).
Definition ExptSmearingFunctions.hh:1617
double TAU_EFF_ATLAS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:1540
Particle TAU_SMEAR_ATLAS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:1643
double TAUJET_EFF_ATLAS_RUN2(const Jet &j)
ATLAS Run 2 13 TeV jet tau-tag efficiency and misID rate (medium working point).
Definition ExptSmearingFunctions.hh:1562
double TAU_EFF_ATLAS_RUN1_LOOSE(const Particle &t)
Definition ExptSmearingFunctions.hh:1462
double TAU_EFF_CMS_RUN1_LOOSE(const Particle &t)
Definition ExptSmearingFunctions.hh:1694
double TAU_EFF_CMS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:1713
double TAU_EFF_CMS_RUN2_MEDIUM(const Particle &t)
Definition ExptSmearingFunctions.hh:1726
double TAU_EFF_CMS_RUN1_MEDIUM(const Particle &t)
Definition ExptSmearingFunctions.hh:1700
double TAU_EFF_CMS_RUN2_LOOSE(const Particle &t)
Definition ExptSmearingFunctions.hh:1720
double TAU_EFF_CMS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:1687
Particle TAU_SMEAR_ATLAS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:1679
double ATLAS_JVT_EFF_MEDIUM(const Jet &j)
Return the efficiency of the ATLAS JVT tagger at > 0.4 W.P.
Definition ExptSmearingFunctions.hh:2215
Particle TRK_SMEAR_CMS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:2184
double TRK_EFF_CMS_RUN2(const Particle &p)
Definition ExptSmearingFunctions.hh:2170
Particle TRK_SMEAR_ATLAS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:2118
double ATLAS_JVT_EFF_TIGHT(const Jet &j)
Return the efficiency of the ATLAS JVT tagger at > 0.7 W.P.
Definition ExptSmearingFunctions.hh:2235
double TRK_EFF_CMS_RUN1(const Particle &p)
CMS Run 1 tracking efficiency.
Definition ExptSmearingFunctions.hh:2130
double ATLAS_JVT_EFF_LOOSE(const Jet &j)
Return the efficiency of the ATLAS JVT tagger at > 0.2 W.P.
Definition ExptSmearingFunctions.hh:2195
Particle TRK_SMEAR_CMS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:2178
Particle TRK_SMEAR_ATLAS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:2124
double TRK_EFF_ATLAS_RUN1(const Particle &p)
ATLAS Run 1 tracking efficiency.
Definition ExptSmearingFunctions.hh:2070
double TRK_EFF_ATLAS_RUN2(const Particle &p)
Definition ExptSmearingFunctions.hh:2110
Definition LHCbCommon.hh:9
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, signed_if_mixed_t< N1, N2 > > max(N1 a, N2 b)
Get the maximum of two numbers.
Definition MathUtils.hh:124
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > add_quad(NUM a, NUM b)
Named number-type addition in quadrature operation.
Definition MathUtils.hh:260
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > sqr(NUM a)
Named number-type squaring operation.
Definition MathUtils.hh:237
double randnorm(double loc, double scale)
Return a random number sampled from a Gaussian/normal distribution.
T sum(const DressedLeptons &c, FN &&fn, const T &start=T())
Generic sum function, adding fn(x) for all x in container c, starting with start.
Definition DressedLepton.hh:66
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, signed_if_mixed_t< N1, N2 > > min(N1 a, N2 b)
Get the minimum of two numbers.
Definition MathUtils.hh:113
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > inRange(N1 value, N2 low, N3 high, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN)
Determine if value is in the range low to high, for floating point numbers.
Definition MathUtils.hh:147
constexpr double SQRT2
A pre-defined value of .
Definition MathConstants.hh:22
std::enable_if_t< std::is_arithmetic_v< NUM1 > &&std::is_arithmetic_v< NUM2 >, int > binIndex(NUM1 val, std::initializer_list< NUM2 > binedges, bool allow_overflow=false)
Return the bin index of the given value, val, given a vector of bin edges.
Definition MathUtils.hh:503
Struct for holding MET-smearing parameters.
Definition MomentumSmearingFunctions.hh:152
Error specialisation for where the problem is between the chair and the computer.
Definition Exceptions.hh:75