rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
ExptSmearingFunctions.hh
1// -*- C++ -*-
2#ifndef RIVET_ExptSmearingFunctions_HH
3#define RIVET_ExptSmearingFunctions_HH
4
5#include "Rivet/Tools/MomentumSmearingFunctions.hh"
6#include "Rivet/Tools/ParticleSmearingFunctions.hh"
7#include "Rivet/Tools/JetSmearingFunctions.hh"
8
9namespace Rivet {
10
11
14
17
20 inline double ELECTRON_RECOEFF_ATLAS_RUN1(const Particle& e) {
21 if (e.abspid() != PID::ELECTRON) return 0;
22 if (e.abseta() > 2.5) return 0;
23 if (e.pT() < 10*GeV) return 0;
24 return (e.abseta() < 1.5) ? 0.95 : 0.85;
25 }
26
30 inline double ELECTRON_RECOEFF_ATLAS_RUN2(const Particle& e) {
31 if (e.abspid() != PID::ELECTRON) return 0;
32 const double et = e.Et();
33 if (e.abseta() > 2.5 || e.Et() < 2*GeV) return 0;
34 if (et > 25*GeV) return 0.97;
35 if (et > 10*GeV) return 0.92 + (et/GeV-10)/15.*0.05;
36 if (et > 6*GeV) return 0.85 + (et/GeV-6)/4.*0.07;
37 if (et > 5*GeV) return 0.70 + (et/GeV-5)/1.*0.15;
38 if (et > 2*GeV) return 0.00 + (et/GeV-2)/3.*0.70;
39 return 0;
40 }
41
42
47 inline double ELECTRON_EFF_ATLAS_RUN2_LOOSE(const Particle& e) {
48 if (e.abspid() != PID::ELECTRON) return 0;
49
50 // Manually symmetrised eta eff histogram
51 const static vector<double> edges_eta = { 0.0, 0.1, 0.8, 1.37, 1.52, 2.01, 2.37, 2.47 };
52 const static vector<double> effs_eta = { 0.950, 0.965, 0.955, 0.885, 0.950, 0.935, 0.90 };
53 // Et eff histogram (10-20 is a guess)
54 const static vector<double> edges_et = { 0, 10, 20, 25, 30, 35, 40, 45, 50, 60, 80 };
55 const static vector<double> effs_et = { 0.0, 0.90, 0.91, 0.92, 0.94, 0.95, 0.955, 0.965, 0.97, 0.98, 0.98 };//Extra value extrapolated for overflow
56
57 if (e.abseta() > 2.47) return 0.0; // no ID outside the tracker
58
59 const int i_eta = binIndex(e.abseta(), edges_eta);
60 const int i_et = binIndex(e.Et()/GeV, edges_et, true);
61 const double eff = effs_et[i_et] * effs_eta[i_eta] / 0.95; //< norm factor as approximate double differential
62 return min(eff, 1.0) * ELECTRON_RECOEFF_ATLAS_RUN2(e);
63 }
64
65
67 inline double ELECTRON_EFF_ATLAS_RUN1_MEDIUM(const Particle& e) {
68 if (e.abspid() != PID::ELECTRON) return 0;
69
70 const static vector<double> eta_edges_10 = {0.000, 0.049, 0.454, 1.107, 1.46, 1.790, 2.277, 2.500};
71 const static vector<double> eta_vals_10 = {0.730, 0.757, 0.780, 0.771, 0.77, 0.777, 0.778};
72
73 const static vector<double> eta_edges_15 = {0.000, 0.053, 0.456, 1.102, 1.463, 1.783, 2.263, 2.500};
74 const static vector<double> eta_vals_15 = {0.780, 0.800, 0.819, 0.759, 0.749, 0.813, 0.829};
75
76 const static vector<double> eta_edges_20 = {0.000, 0.065, 0.362, 0.719, 0.980, 1.289, 1.455, 1.681, 1.942, 2.239, 2.452, 2.500};
77 const static vector<double> eta_vals_20 = {0.794, 0.806, 0.816, 0.806, 0.797, 0.774, 0.764, 0.788, 0.793, 0.806, 0.825};
78
79 const static vector<double> eta_edges_25 = {0.000, 0.077, 0.338, 0.742, 1.004, 1.265, 1.467, 1.692, 1.940, 2.227, 2.452, 2.500};
80 const static vector<double> eta_vals_25 = {0.833, 0.843, 0.853, 0.845, 0.839, 0.804, 0.790, 0.825, 0.830, 0.833, 0.839};
81
82 const static vector<double> eta_edges_30 = {0.000, 0.077, 0.350, 0.707, 0.980, 1.289, 1.479, 1.681, 1.942, 2.239, 2.441, 2.500};
83 const static vector<double> eta_vals_30 = {0.863, 0.872, 0.881, 0.874, 0.870, 0.824, 0.808, 0.847, 0.845, 0.840, 0.842};
84
85 const static vector<double> eta_edges_35 = {0.000, 0.058, 0.344, 0.700, 1.009, 1.270, 1.458, 1.685, 1.935, 2.231, 2.468, 2.500};
86 const static vector<double> eta_vals_35 = {0.878, 0.889, 0.901, 0.895, 0.893, 0.849, 0.835, 0.868, 0.863, 0.845, 0.832};
87
88 const static vector<double> eta_edges_40 = {0.000, 0.047, 0.355, 0.699, 0.983, 1.280, 1.446, 1.694, 1.943, 2.227, 2.441, 2.500};
89 const static vector<double> eta_vals_40 = {0.894, 0.901, 0.909, 0.905, 0.904, 0.875, 0.868, 0.889, 0.876, 0.848, 0.827};
90
91 const static vector<double> eta_edges_45 = {0.000, 0.058, 0.356, 0.712, 0.997, 1.282, 1.459, 1.686, 1.935, 2.220, 2.444, 2.500};
92 const static vector<double> eta_vals_45 = {0.900, 0.911, 0.923, 0.918, 0.917, 0.897, 0.891, 0.904, 0.894, 0.843, 0.796};
93
94 const static vector<double> eta_edges_50 = {0.000, 0.059, 0.355, 0.711, 0.983, 1.280, 1.469, 1.682, 1.919, 2.227, 2.441, 2.500};
95 const static vector<double> eta_vals_50 = {0.903, 0.913, 0.923, 0.922, 0.923, 0.903, 0.898, 0.908, 0.895, 0.831, 0.774};
96
97 const static vector<double> eta_edges_60 = {0.000, 0.053, 0.351, 0.720, 1.006, 1.291, 1.469, 1.696, 1.946, 2.243, 2.455, 2.500};
98 const static vector<double> eta_vals_60 = {0.903, 0.917, 0.928, 0.924, 0.927, 0.915, 0.911, 0.915, 0.899, 0.827, 0.760};
99
100 const static vector<double> eta_edges_80 = {0.000, 0.053, 0.351, 0.720, 0.994, 1.292, 1.482, 1.708, 1.934, 2.220, 2.458, 2.500};
101 const static vector<double> eta_vals_80 = {0.936, 0.942, 0.952, 0.956, 0.956, 0.934, 0.931, 0.944, 0.933, 0.940, 0.948};
102
103 const static vector<double> et_edges = { 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 80 };
104 const static vector< vector<double> > et_eta_edges = { eta_edges_10, eta_edges_15, eta_edges_20, eta_edges_25, eta_edges_30, eta_edges_35, eta_edges_40, eta_edges_45, eta_edges_50, eta_edges_60, eta_edges_80 };
105 const static vector< vector<double> > et_eta_vals = { eta_vals_10, eta_vals_15, eta_vals_20, eta_vals_25, eta_vals_30, eta_vals_35, eta_vals_40, eta_vals_45, eta_vals_50, eta_vals_60, eta_vals_80 };
106
107 if (e.abseta() > 2.5 || e.Et() < 10*GeV) return 0.0;
108 const int i_et = binIndex(e.Et()/GeV, et_edges, true);
109 const int i_eta = binIndex(e.abseta(), et_eta_edges[i_et]);
110 return et_eta_vals[i_et][i_eta] * ELECTRON_RECOEFF_ATLAS_RUN1(e);
111 }
112
116 inline double ELECTRON_EFF_ATLAS_RUN2_MEDIUM(const Particle& e) {
117 if (e.abspid() != PID::ELECTRON) return 0;
118 return 1.01 * ELECTRON_EFF_ATLAS_RUN1_MEDIUM(e);
119 }
120
121
123 inline double ELECTRON_EFF_ATLAS_RUN1_TIGHT(const Particle& e) {
124 if (e.abspid() != PID::ELECTRON) return 0;
125
126 const static vector<double> eta_edges_10 = {0.000, 0.049, 0.459, 1.100, 1.461, 1.789, 2.270, 2.500};
127 const static vector<double> eta_vals_10 = {0.581, 0.632, 0.668, 0.558, 0.548, 0.662, 0.690};
128
129 const static vector<double> eta_edges_15 = {0.000, 0.053, 0.450, 1.096, 1.463, 1.783, 2.269, 2.500};
130 const static vector<double> eta_vals_15 = {0.630, 0.678, 0.714, 0.633, 0.616, 0.700, 0.733};
131
132 const static vector<double> eta_edges_20 = {0.000, 0.065, 0.362, 0.719, 0.992, 1.277, 1.479, 1.692, 1.930, 2.227, 2.464, 2.500};
133 const static vector<double> eta_vals_20 = {0.653, 0.695, 0.735, 0.714, 0.688, 0.635, 0.625, 0.655, 0.680, 0.691, 0.674};
134
135 const static vector<double> eta_edges_25 = {0.000, 0.077, 0.362, 0.719, 0.992, 1.300, 1.479, 1.692, 1.942, 2.227, 2.464, 2.500};
136 const static vector<double> eta_vals_25 = {0.692, 0.732, 0.768, 0.750, 0.726, 0.677, 0.667, 0.692, 0.710, 0.706, 0.679};
137
138 const static vector<double> eta_edges_30 = {0.000, 0.053, 0.362, 0.719, 1.004, 1.277, 1.467, 1.681, 1.954, 2.239, 2.452, 2.500};
139 const static vector<double> eta_vals_30 = {0.724, 0.763, 0.804, 0.789, 0.762, 0.702, 0.690, 0.720, 0.731, 0.714, 0.681};
140
141 const static vector<double> eta_edges_35 = {0.000, 0.044, 0.342, 0.711, 0.971, 1.280, 1.456, 1.683, 1.944, 2.218, 2.442, 2.500};
142 const static vector<double> eta_vals_35 = {0.736, 0.778, 0.824, 0.811, 0.784, 0.730, 0.718, 0.739, 0.743, 0.718, 0.678};
143
144 const static vector<double> eta_edges_40 = {0.000, 0.047, 0.355, 0.699, 0.983, 1.268, 1.457, 1.671, 1.931, 2.204, 2.453, 2.500};
145 const static vector<double> eta_vals_40 = {0.741, 0.774, 0.823, 0.823, 0.802, 0.764, 0.756, 0.771, 0.771, 0.734, 0.684};
146
147 const static vector<double> eta_edges_45 = {0.000, 0.056, 0.354, 0.711, 0.984, 1.280, 1.458, 1.684, 1.945, 2.207, 2.442, 2.500};
148 const static vector<double> eta_vals_45 = {0.758, 0.792, 0.841, 0.841, 0.823, 0.792, 0.786, 0.796, 0.794, 0.734, 0.663};
149
150 const static vector<double> eta_edges_50 = {0.000, 0.059, 0.355, 0.699, 0.983, 1.268, 1.446, 1.682, 1.943, 2.216, 2.453, 2.500};
151 const static vector<double> eta_vals_50 = {0.771, 0.806, 0.855, 0.858, 0.843, 0.810, 0.800, 0.808, 0.802, 0.730, 0.653};
152
153 const static vector<double> eta_edges_60 = {0.000, 0.050, 0.350, 0.707, 0.981, 1.278, 1.468, 1.694, 1.944, 2.242, 2.453, 2.500};
154 const static vector<double> eta_vals_60 = {0.773, 0.816, 0.866, 0.865, 0.853, 0.820, 0.812, 0.817, 0.804, 0.726, 0.645};
155
156 const static vector<double> eta_edges_80 = {0.000, 0.051, 0.374, 0.720, 0.981, 1.279, 1.468, 1.707, 1.945, 2.207, 2.457, 2.500};
157 const static vector<double> eta_vals_80 = {0.819, 0.855, 0.899, 0.906, 0.900, 0.869, 0.865, 0.873, 0.869, 0.868, 0.859};
158
159 const static vector<double> et_edges = { 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 80 };
160 const static vector< vector<double> > et_eta_edges = { eta_edges_10, eta_edges_15, eta_edges_20, eta_edges_25, eta_edges_30, eta_edges_35, eta_edges_40, eta_edges_45, eta_edges_50, eta_edges_60, eta_edges_80 };
161 const static vector< vector<double> > et_eta_vals = { eta_vals_10, eta_vals_15, eta_vals_20, eta_vals_25, eta_vals_30, eta_vals_35, eta_vals_40, eta_vals_45, eta_vals_50, eta_vals_60, eta_vals_80 };
162
163 if (e.abseta() > 2.5 || e.Et() < 10*GeV) return 0.0;
164 const int i_et = binIndex(e.Et()/GeV, et_edges, true);
165 const int i_eta = binIndex(e.abseta(), et_eta_edges[i_et]);
166 return et_eta_vals[i_et][i_eta] * ELECTRON_RECOEFF_ATLAS_RUN1(e);
167 }
168
172 inline double ELECTRON_EFF_ATLAS_RUN2_TIGHT(const Particle& e) {
173 if (e.abspid() != PID::ELECTRON) return 0;
174 const static vector<double> et_edges = { /* 10, 15, */ 20, 25, 30, 35, 40, 45, 50, 60, 80 };
175 const static vector<double> et_effs = { 0.785, 0.805, 0.820, 0.830, 0.840, 0.850, 0.875, 0.910, 0.910 }; //Extra value extrapolated for overflow
176 const static vector<double> eta_edges = {0.000, 0.051, 0.374, 0.720, 0.981, 1.279, 1.468, 1.707, 1.945, 2.207, 2.457, 2.500}; // from ET > 80 bin
177 const static vector<double> eta_refs = {0.819, 0.855, 0.899, 0.906, 0.900, 0.869, 0.865, 0.873, 0.869, 0.868, 0.859};
178 if (e.abseta() > 2.5 || e.Et() < 20*GeV) return 0.0;
179 const int i_et = binIndex(e.Et()/GeV, et_edges, true);
180 const int i_eta = binIndex(e.abseta(), eta_edges);
181 const double eff_et = et_effs[i_et]; //< integral eff
182 // Scale to |eta| shape, following the ~85% efficient high-ET bin from Run 1
183 const double eff = eff_et * (eta_refs[i_eta]/0.85) * ELECTRON_RECOEFF_ATLAS_RUN2(e);
184 //return ELECTRON_IDEFF_ATLAS_RUN1_TIGHT(e);
185 return eff;
186 }
187
188
189
192 static const vector<double> edges_eta = {0., 2.5, 3.};
193 static const vector<double> edges_pt = {0., 0.1, 25.};
194 static const vector<double> e2s = {0.000, 0.015, 0.005,
195 0.005, 0.005, 0.005,
196 0.107, 0.107, 0.107};
197 static const vector<double> es = {0.00, 0.00, 0.05,
198 0.05, 0.05, 0.05,
199 2.08, 2.08, 2.08};
200 static const vector<double> cs = {0.00, 0.00, 0.25,
201 0.25, 0.25, 0.25,
202 0.00, 0.00, 0.00};
203
204 const int i_eta = binIndex(e.abseta(), edges_eta, true);
205 const int i_pt = binIndex(e.pT()/GeV, edges_pt, true);
206 const int i = i_eta*edges_pt.size() + i_pt;
207
208 // Calculate absolute resolution in GeV
209 const double c1 = sqr(e2s[i]), c2 = sqr(es[i]), c3 = sqr(cs[i]);
210 const double resolution = sqrt(c1*e.E2() + c2*e.E() + c3) * GeV;
211
212 // normal_distribution<> d(e.E(), resolution);
213 // const double mass = e.mass2() > 0 ? e.mass() : 0; //< numerical carefulness...
214 // const double smeared_E = max(d(gen), mass); //< can't let the energy go below the mass!
215 // return Particle(e.pid(), FourMomentum::mkEtaPhiME(e.eta(), e.phi(), mass, smeared_E));
216 return Particle(e.pid(), P4_SMEAR_E_GAUSS(e, resolution));
217 }
218
219
225
226
228
229
230
232 inline double ELECTRON_EFF_CMS_RUN1(const Particle& e) {
233 if (e.abspid() != PID::ELECTRON) return 0;
234 if (e.abseta() > 2.5) return 0;
235 if (e.pT() < 10*GeV) return 0;
236 return (e.abseta() < 1.5) ? 0.95 : 0.85;
237 }
238
239
242 inline double ELECTRON_EFF_CMS_RUN2(const Particle& e) {
243 if (e.abspid() != PID::ELECTRON) return 0;
244 return ELECTRON_EFF_CMS_RUN1(e);
245 }
246
247
255 // Calculate absolute resolution in GeV from functional form
256 double resolution = 0;
257 const double abseta = e.abseta();
258 if (e.pT() > 0.1*GeV && abseta < 2.5) { //< should be a given from efficiencies
259 if (abseta < 0.5) {
260 resolution = add_quad(0.06, 1.3e-3 * e.pT()/GeV) * GeV;
261 } else if (abseta < 1.5) {
262 resolution = add_quad(0.10, 1.7e-3 * e.pT()/GeV) * GeV;
263 } else { // still |eta| < 2.5
264 resolution = add_quad(0.25, 3.1e-3 * e.pT()/GeV) * GeV;
265 }
266 }
267
268 // normal_distribution<> d(e.E(), resolution);
269 // const double mass = e.mass2() > 0 ? e.mass() : 0; //< numerical carefulness...
270 // const double smeared_E = max(d(gen), mass); //< can't let the energy go below the mass!
271 // return Particle(e.pid(), FourMomentum::mkEtaPhiME(e.eta(), e.phi(), mass, smeared_E));
272 return Particle(e.pid(), P4_SMEAR_E_GAUSS(e, resolution));
273 }
274
278 return ELECTRON_SMEAR_CMS_RUN1(e);
279 }
280
282
283
284
287
291 inline double PHOTON_EFF_ATLAS_RUN1(const Particle& y) {
292 if (y.abspid() != PID::PHOTON) return 0;
293
294 if (y.pT() < 10*GeV) return 0;
295 if (inRange(y.abseta(), 1.37, 1.52) || y.abseta() > 2.37) return 0;
296
297 static const vector<double> edges_eta = {0., 0.6, 1.37, 1.52, 1.81, 2.37};
298 static const vector<double> edges_pt = {10., 15., 20., 25., 30., 35., 40., 45.,
299 50., 60., 80., 100., 125., 150., 175., 250.};
300 static const vector<double> effs = {0.53, 0.65, 0.73, 0.83, 0.86, 0.93, 0.94, 0.96,
301 0.97, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98,//
302 0.45, 0.57, 0.67, 0.74, 0.84, 0.87, 0.93, 0.94,
303 0.95, 0.96, 0.97, 0.98, 0.98, 0.99, 0.99, 0.99,//
304 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
305 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,//
306 0.48, 0.56, 0.68, 0.76, 0.86, 0.90, 0.93, 0.95,
307 0.96, 0.97, 0.98, 0.99, 0.99, 1.00, 1.00, 1.00,//
308 0.50, 0.61, 0.74, 0.82, 0.88, 0.92, 0.94, 0.95,
309 0.96, 0.97, 0.98, 0.98, 0.98, 0.98, 0.99, 0.99};
310
311 const int i_eta = binIndex(y.abseta(), edges_eta);
312 const int i_pt = binIndex(y.pT()/GeV, edges_pt, true);
313 const int i = i_eta*edges_pt.size() + i_pt;
314 const double eff = effs[i];
315 return eff;
316 }
317
321 inline double PHOTON_EFF_ATLAS_RUN2(const Particle& y) {
322 if (y.abspid() != PID::PHOTON) return 0;
323
324 if (y.pT() < 10*GeV) return 0;
325 if (inRange(y.abseta(), 1.37, 1.52) || y.abseta() > 2.37) return 0;
326
327 static const vector<double> edges_eta = {0., 0.6, 1.37, 1.52, 1.81, 2.37};
328 static const vector<double> edges_pt = {10., 15., 20., 25., 30., 35., 40., 45.,
329 50., 60., 80., 100., 125., 150., 175., 250.};
330 static const vector<double> effs = {0.55, 0.70, 0.85, 0.89, 0.93, 0.95, 0.96, 0.96,
331 0.97, 0.97, 0.98, 0.97, 0.97, 0.97, 0.97, 0.97,//
332 0.47, 0.66, 0.79, 0.86, 0.89, 0.94, 0.96, 0.97,
333 0.97, 0.98, 0.97, 0.98, 0.98, 0.98, 0.98, 0.98,//
334 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
335 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,//
336 0.54, 0.71, 0.84, 0.88, 0.92, 0.93, 0.94, 0.95,
337 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96, 0.96,//
338 0.61, 0.74, 0.83, 0.88, 0.91, 0.94, 0.95, 0.96,
339 0.97, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98, 0.98};
340
341 const int i_eta = binIndex(y.abseta(), edges_eta);
342 const int i_pt = binIndex(y.pT()/GeV, edges_pt, true);
343 const int i = i_eta*edges_pt.size() + i_pt;
344 const double eff = effs[i];
345 return eff;
346 }
347
350 inline double PHOTON_EFF_CMS_RUN1(const Particle& y) {
351 if (y.abspid() != PID::PHOTON) return 0;
352 if (y.pT() < 10*GeV || y.abseta() > 2.5) return 0;
353 return (y.abseta() < 1.5) ? 0.95 : 0.85;
354 }
355
358 inline double PHOTON_EFF_CMS_RUN2(const Particle& y) {
359 if (y.abspid() != PID::PHOTON) return 0;
360 return PHOTON_EFF_CMS_RUN1(y);
361 }
362
363
365 inline Particle PHOTON_SMEAR_ATLAS_RUN1(const Particle& y) { return y; }
366 inline Particle PHOTON_SMEAR_ATLAS_RUN2(const Particle& y) { return y; }
367 inline Particle PHOTON_SMEAR_CMS_RUN1(const Particle& y) { return y; }
368 inline Particle PHOTON_SMEAR_CMS_RUN2(const Particle& y) { return y; }
369
371
372
373
376
378 inline double MUON_EFF_ATLAS_RUN1(const Particle& m) {
379 if (m.abspid() != PID::MUON) return 0;
380 if (m.abseta() > 2.7) return 0;
381 if (m.pT() < 10*GeV) return 0;
382 return (m.abseta() < 1.5) ? 0.95 : 0.85;
383 }
384
388 inline double MUON_RECOEFF_ATLAS_RUN2(const Particle& m) {
389 if (m.abspid() != PID::MUON) return 0;
390 if (m.abseta() > 2.5) return 0;
391 if (m.abseta() < 0.1) return 0.61;
392 // if (m.pT() < 10*GeV) return 0;
393 return (m.abseta() < 1) ? 0.98 : 0.99;
394 }
395
400 inline double MUON_EFF_ATLAS_RUN2(const Particle& m) {
401 if (m.abspid() != PID::MUON) return 0;
402 if (m.abseta() > 2.7) return 0;
403 static const vector<double> edges_pt = {0., 3.5, 4., 5., 6., 7., 8., 10.};
404 static const vector<double> effs = {0.00, 0.76, 0.94, 0.97, 0.98, 0.98, 0.98, 0.99};
405 const int i_pt = binIndex(m.pT()/GeV, edges_pt, true);
406 const double eff = effs[i_pt] * MUON_RECOEFF_ATLAS_RUN2(m);
407 return eff;
408 }
409
411
412
413
416 static const vector<double> edges_eta = {0, 1.5, 2.5};
417 static const vector<double> edges_pt = {0, 0.1, 1.0, 10., 200.};
418 static const vector<double> res = {0., 0.03, 0.02, 0.03, 0.05,
419 0., 0.04, 0.03, 0.04, 0.05};
420
421 const int i_eta = binIndex(m.abseta(), edges_eta);
422 const int i_pt = binIndex(m.pT()/GeV, edges_pt, true);
423 const int i = i_eta*edges_pt.size() + i_pt;
424
425 const double resolution = res[i];
426
427 // Smear by a Gaussian centered on the current pT, with width given by the resolution
428 // normal_distribution<> d(m.pT(), resolution*m.pT());
429 // const double smeared_pt = max(d(gen), 0.);
430 // const double mass = m.mass2() > 0 ? m.mass() : 0; //< numerical carefulness...
431 // return Particle(m.pid(), FourMomentum::mkEtaPhiMPt(m.eta(), m.phi(), mass, smeared_pt));
432 return Particle(m.pid(), P4_SMEAR_PT_GAUSS(m, resolution*m.pT()));
433 }
434
438 double mres_pt = 0.015;
439 if (m.pT() > 50*GeV) mres_pt = 0.014 + 0.01*(m.pT()/GeV-50)/50;
440 if (m.pT() > 100*GeV) mres_pt = 0.025;
441 const double ptres_pt = SQRT2 * mres_pt; //< from Eq (10)
442 const double resolution = (m.abseta() < 1.5 ? 1.0 : 1.25) * ptres_pt;
443 return Particle(m.pid(), P4_SMEAR_PT_GAUSS(m, resolution*m.pT()));
444 }
445
446
447
449 inline double MUON_EFF_CMS_RUN1(const Particle& m) {
450 if (m.abspid() != PID::MUON) return 0;
451 if (m.abseta() > 2.4) return 0;
452 if (m.pT() < 10*GeV) return 0;
453 return 0.95 * (m.abseta() < 1.5 ? 1 : exp(0.5 - 5e-4*m.pT()/GeV));
454 }
455
458 inline double MUON_EFF_CMS_RUN2(const Particle& m) {
459 if (m.abspid() != PID::MUON) return 0;
460 return MUON_EFF_CMS_RUN1(m);
461 }
462
463
466 // Calculate fractional resolution
467 // for pT > 0.1 GeV, mom resolution = |eta| < 0.5 -> sqrt(0.01^2 + pt^2 * 2.0e-4^2)
468 // |eta| < 1.5 -> sqrt(0.02^2 + pt^2 * 3.0e-4^2)
469 // |eta| < 2.5 -> sqrt(0.05^2 + pt^2 * 2.6e-4^2)
470 double resolution = 0;
471 const double abseta = m.abseta();
472 if (m.pT() > 0.1*GeV && abseta < 2.5) {
473 if (abseta < 0.5) {
474 resolution = add_quad(0.01, 2.0e-4 * m.pT()/GeV);
475 } else if (abseta < 1.5) {
476 resolution = add_quad(0.02, 3.0e-4 * m.pT()/GeV);
477 } else { // still |eta| < 2.5... but isn't CMS' mu acceptance < 2.4?
478 resolution = add_quad(0.05, 2.6e-4 * m.pT()/GeV);
479 }
480 }
481
482 // Smear by a Gaussian centered on the current pT, with width given by the resolution
483 // normal_distribution<> d(m.pT(), resolution*m.pT());
484 // const double smeared_pt = max(d(gen), 0.);
485 // const double mass = m.mass2() > 0 ? m.mass() : 0; //< numerical carefulness...
486 // return Particle(m.pid(), FourMomentum::mkEtaPhiMPt(m.eta(), m.phi(), mass, smeared_pt));
487 return Particle(m.pid(), P4_SMEAR_PT_GAUSS(m, resolution*m.pT()));
488 }
489
493 return MUON_SMEAR_CMS_RUN1(m);
494 }
495
497
498
499
502
510 inline double TAU_EFF_ATLAS_RUN1(const Particle& t) {
511 if (t.abseta() > 2.5) return 0; //< hmm... mostly
512 if (inRange(t.abseta(), 1.37, 1.52)) return 0; //< crack region
513 double pThadvis = 0;
514 Particles chargedhadrons;
515 for (const Particle& p : t.children()) {
516 if (p.isHadron()) {
517 pThadvis += p.pT(); //< right definition? Paper is unclear
518 if (p.charge3() != 0 && p.abseta() < 2.5 && p.pT() > 1*GeV) chargedhadrons += p;
519 }
520 }
521 if (chargedhadrons.empty()) return 0; //< leptonic tau
522 if (pThadvis < 20*GeV) return 0; //< below threshold
523 if (pThadvis < 40*GeV) {
524 if (chargedhadrons.size() == 1) return (t.abspid() == PID::TAU) ? 0.56 : 0; //1/20.;
525 if (chargedhadrons.size() == 3) return (t.abspid() == PID::TAU) ? 0.38 : 0; //1/100.;
526 } else {
527 if (chargedhadrons.size() == 1) return (t.abspid() == PID::TAU) ? 0.56 : 0; //1/25.;
528 if (chargedhadrons.size() == 3) return (t.abspid() == PID::TAU) ? 0.38 : 0; //1/400.;
529 }
530 return 0;
531 }
532
540 inline double TAUJET_EFF_ATLAS_RUN1(const Jet& j) {
541 if (j.abseta() > 2.5) return 0; //< hmm... mostly
542 if (inRange(j.abseta(), 1.37, 1.52)) return 0; //< crack region
543 double pThadvis = 0;
544 Particles chargedhadrons;
545 for (const Particle& p : j.particles()) {
546 if (p.isHadron()) {
547 pThadvis += p.pT(); //< right definition? Paper is unclear
548 if (p.charge3() != 0 && p.abseta() < 2.5 && p.pT() > 1*GeV) chargedhadrons += p;
549 }
550 }
551
552 if (chargedhadrons.empty()) return 0; //< leptonic tau?
553 if (pThadvis < 20*GeV) return 0; //< below threshold
554
555 const Particles ttags = j.tauTags(Cuts::pT > 10*GeV);
556 // MisID rates for jets without truth tau label
557 if (ttags.empty()) {
558 if (pThadvis < 40*GeV)
559 return chargedhadrons.size() == 1 ? 1/20. : chargedhadrons.size() == 3 ? 1/100. : 0; //< fake rates
560 else
561 return chargedhadrons.size() == 1 ? 1/25. : chargedhadrons.size() == 3 ? 1/400. : 0; //< fake rates
562 }
563 // Efficiencies for jets with a truth tau label
564 const Particles prongs = ttags[0].stableDescendants(Cuts::charge3 > 0 && Cuts::pT > 1*GeV && Cuts::abseta < 2.5);
565 return prongs.size() == 1 ? 0.56 : 0.38;
566 }
567
568
574 inline double TAU_EFF_ATLAS_RUN2(const Particle& t) {
575 if (t.abspid() != PID::TAU) return 0;
576 if (t.abseta() > 2.5) return 0; //< hmm... mostly
577 if (inRange(t.abseta(), 1.37, 1.52)) return 0; //< crack region
578 double pThadvis = 0;
579 Particles chargedhadrons;
580 for (const Particle& p : t.children()) {
581 if (p.isHadron()) {
582 pThadvis += p.pT(); //< right definition? Paper is unclear
583 if (p.charge3() != 0 && p.abseta() < 2.5 && p.pT() > 1*GeV) chargedhadrons += p;
584 }
585 }
586 if (chargedhadrons.empty()) return 0; //< leptonic tau
587 if (pThadvis < 20*GeV) return 0; //< below threshold
588 if (chargedhadrons.size() == 1) return (t.abspid() == PID::TAU) ? 0.55 : 0; //1/50.;
589 if (chargedhadrons.size() == 3) return (t.abspid() == PID::TAU) ? 0.40 : 0; //1/110.;
590 return 0;
591 }
592
598 inline double TAUJET_EFF_ATLAS_RUN2(const Jet& j) {
599 if (j.abseta() > 2.5) return 0; //< hmm... mostly
600 if (inRange(j.abseta(), 1.37, 1.52)) return 0; //< crack region
601 double pThadvis = 0;
602 Particles chargedhadrons;
603 for (const Particle& p : j.particles()) {
604 if (p.isHadron()) {
605 pThadvis += p.pT(); //< right definition? Paper is unclear
606 if (p.charge3() != 0 && p.abseta() < 2.5 && p.pT() > 1*GeV) chargedhadrons += p;
607 }
608 }
609 if (chargedhadrons.empty()) return 0;
610 if (pThadvis < 20*GeV) return 0; //< below threshold
611 const Particles ttags = j.tauTags(Cuts::pT > 10*GeV);
612 // if (ttags.empty()) {
613 // if (pThadvis < 40*GeV)
614 // return chargedhadrons.size() == 1 ? 1/50. : 1/110.; //< fake rates
615 // else
616 // return chargedhadrons.size() == 1 ? 1/25. : 1/400.; //< fake rates
617 // }
618 if (ttags.empty()) return chargedhadrons.size() == 1 ? 1/50. : chargedhadrons.size() == 3 ? 1/110. : 0; //< fake rates
619 const Particles prongs = ttags[0].stableDescendants(Cuts::charge3 > 0 && Cuts::pT > 1*GeV && Cuts::abseta < 2.5);
620 return prongs.size() == 1 ? 0.55 : 0.40;
621 }
622
623
627 // // Const fractional resolution for now
628 // static const double resolution = 0.03;
629
630 // // Smear by a Gaussian centered on 1 with width given by the (fractional) resolution
631 // /// @todo Is this the best way to smear? Should we preserve the energy, or pT, or direction?
632 // const double fsmear = max(randnorm(1., resolution), 0.);
633 // const double mass = t.mass2() > 0 ? t.mass() : 0; //< numerical carefulness...
634 // return Particle(t.pid(), FourMomentum::mkXYZM(t.px()*fsmear, t.py()*fsmear, t.pz()*fsmear, mass));
635
636 // Jet energy resolution lookup
637 // Implemented by Matthias Danninger for GAMBIT, based roughly on
638 // https://atlas.web.cern.ch/Atlas/GROUPS/PHYSICS/CONFNOTES/ATLAS-CONF-2015-017/
639 // Parameterisation can be still improved, but eta dependence is minimal
641 static const vector<double> binedges_pt = {0., 50., 70., 100., 150., 200., 1000., 10000.};
642 static const vector<double> jer = {0.145, 0.115, 0.095, 0.075, 0.07, 0.05, 0.04, 0.04}; //< note overflow value
643 const int ipt = binIndex(t.pT()/GeV, binedges_pt, true);
644 if (ipt < 0) return t;
645 const double resolution = jer.at(ipt);
646
647 // Smear by a Gaussian centered on 1 with width given by the (fractional) resolution
649 const double fsmear = max(randnorm(1., resolution), 0.);
650 const double mass = t.mass2() > 0 ? t.mass() : 0; //< numerical carefulness...
651 Particle rtn(PID::TAU, FourMomentum::mkXYZM(t.px()*fsmear, t.py()*fsmear, t.pz()*fsmear, mass));
652 //if (deltaPhi(t, rtn) > 0.01) cout << "jdphi: " << deltaPhi(t, rtn) << endl;
653 return rtn;
654 }
655
656
660 return TAU_SMEAR_ATLAS_RUN1(t);
661 }
662
663
667 inline double TAU_EFF_CMS_RUN1(const Particle& t) {
668 if (t.abspid() != PID::TAU) return 0;
669 return (t.abspid() == PID::TAU) ? 0.6 : 0;
670 }
671
675 inline double TAU_EFF_CMS_RUN2(const Particle& t) {
676 if (t.abspid() != PID::TAU) return 0;
677 return (t.abspid() == PID::TAU) ? 0.6 : 0;
678 }
679
680
684 return TAU_SMEAR_ATLAS_RUN1(t);
685 }
686
687
691 return TAU_SMEAR_CMS_RUN1(t);
692 }
693
695
696
697
700
702 inline double JET_BTAG_ATLAS_RUN1(const Jet& j) {
704 if (j.abseta() > 2.5) return 0;
705 const auto ftagsel = [&](const Particle& p){ return p.pT() > 5*GeV && deltaR(p,j) < 0.3; };
706 if (j.bTagged(ftagsel)) return 0.80*tanh(0.003*j.pT()/GeV)*(30/(1+0.0860*j.pT()/GeV));
707 if (j.cTagged(ftagsel)) return 0.20*tanh(0.020*j.pT()/GeV)*( 1/(1+0.0034*j.pT()/GeV));
708 return 0.002 + 7.3e-6*j.pT()/GeV;
709 }
710
712 inline double JET_BTAG_ATLAS_RUN2_MV2C20(const Jet& j) {
713 if (j.abseta() > 2.5) return 0;
714 if (j.bTagged(Cuts::pT > 5*GeV)) return 0.77;
715 if (j.cTagged(Cuts::pT > 5*GeV)) return 1/4.5;
716 return 1/140.;
717 }
718
720 inline double JET_BTAG_ATLAS_RUN2_MV2C10(const Jet& j) {
721 if (j.abseta() > 2.5) return 0;
722 if (j.bTagged(Cuts::pT > 5*GeV)) return 0.77;
723 if (j.cTagged(Cuts::pT > 5*GeV)) return 1/6.0;
724 return 1/134.;
725 }
726
727
729 inline Jet JET_SMEAR_ATLAS_RUN1(const Jet& j) {
730 // Jet energy resolution lookup
731 // Implemented by Matthias Danninger for GAMBIT, based roughly on
732 // https://atlas.web.cern.ch/Atlas/GROUPS/PHYSICS/CONFNOTES/ATLAS-CONF-2015-017/
733 // Parameterisation can be still improved, but eta dependence is minimal
735 static const vector<double> binedges_pt = {0., 50., 70., 100., 150., 200., 1000., 10000.};
736 static const vector<double> jer = {0.145, 0.115, 0.095, 0.075, 0.07, 0.05, 0.04, 0.04}; //< note overflow value
737 const int ipt = binIndex(j.pT()/GeV, binedges_pt, true);
738 if (ipt < 0) return j;
739 const double resolution = jer.at(ipt);
740
741 // Smear by a Gaussian centered on 1 with width given by the (fractional) resolution
743 const double fsmear = max(randnorm(1., resolution), 0.);
744 const double mass = j.mass2() > 0 ? j.mass() : 0; //< numerical carefulness...
745 Jet rtn(FourMomentum::mkXYZM(j.px()*fsmear, j.py()*fsmear, j.pz()*fsmear, mass));
746 //if (deltaPhi(j, rtn) > 0.01) cout << "jdphi: " << deltaPhi(j, rtn) << endl;
747 return rtn;
748 }
749
752 inline Jet JET_SMEAR_ATLAS_RUN2(const Jet& j) {
753 return JET_SMEAR_ATLAS_RUN1(j);
754 }
755
758 inline Jet JET_SMEAR_CMS_RUN1(const Jet& j) {
759 return JET_SMEAR_ATLAS_RUN1(j);
760 }
761
764 inline Jet JET_SMEAR_CMS_RUN2(const Jet& j) {
765 return JET_SMEAR_CMS_RUN1(j);
766 }
767
769
770
773
774 inline Vector3 MET_SMEAR_IDENTITY(const Vector3& met, double) { return met; }
775
779 inline Vector3 MET_SMEAR_ATLAS_RUN1(const Vector3& met, double set) {
780 Vector3 smeared_met = met;
781
782 // Linearity offset (Fig 14)
783 if (met.mod() < 25*GeV) smeared_met *= 1.05;
784 else if (met.mod() < 40*GeV) smeared_met *= (1.05 - (0.04/15)*(met.mod()/GeV - 25)); //< linear decrease
785 else smeared_met *= 1.01;
786
787 // Smear by a Gaussian with width given by the resolution(sumEt) ~ 0.45 sqrt(sumEt) GeV
788 const double resolution = 0.45 * sqrt(set/GeV) * GeV;
789 //const double metsmear = max(randnorm(smeared_met.mod(), resolution), 0.);
790 const double metsmear = fabs(randnorm(smeared_met.mod(), resolution)); //< better to reflect than to create a peak at 0
791 smeared_met = metsmear * smeared_met.unit();
792
793 return smeared_met;
794 }
795
799 inline Vector3 MET_SMEAR_ATLAS_RUN2(const Vector3& met, double set) {
800 Vector3 smeared_met = met;
801
802 // Linearity offset (Fig 6)
803 if (met.mod() < 25*GeV) smeared_met *= 1.5;
804 else smeared_met *= (1 + exp(-(met.mod() - 25*GeV)/(10*GeV)) - 0.02); //< exp approx to Fig 6 curve, approaching -0.02
805
806 // Resolution(sumEt) ~ 0.45 sqrt(sumEt) GeV
807 // above SET = 180 GeV, and with linear trend from SET = 180 -> 0 to resolution = 0 (Fig 7)
808 const double resolution1 = (set < 180*GeV ? set/180. : 1) * 0.45 * sqrt(max(set/GeV, 180)) * GeV;
810
811 // Resolution(MET_true) (Fig 9)
812 const double resolution2 = 15*GeV + 0.5*sqrt(met.mod()/GeV)*GeV;
813
814 // Smear by a Gaussian with width given by the minimum resolution estimator (should mean low-MET events
815 // with high SET do not get a large smearing, and will be dominated by the linearity effect).
816 const double resolution = min(resolution1, resolution2);
817 //const double metsmear = max(randnorm(smeared_met.mod(), resolution), 0.);
818 const double metsmear = fabs(randnorm(smeared_met.mod(), resolution)); //< better to reflect than to create a peak at 0
819 smeared_met = metsmear * smeared_met.unit();
820
821 return smeared_met;
822 }
823
826 inline Vector3 MET_SMEAR_CMS_RUN1(const Vector3& met, double set) {
827 Vector3 smeared_met = met;
828
829 // Calculate parallel and perpendicular resolutions and combine in quadrature (?)
830 const double resolution_x = (1.1 + 0.6*sqrt(set/GeV)) * GeV;
831 const double resolution_y = (1.4 + 0.6*sqrt(set/GeV)) * GeV;
832 const double resolution = sqrt(sqr(resolution_x) + sqr(resolution_y));
833
834 // Smear by a Gaussian with width given by the resolution
835 // const double metsmear = max(randnorm(smeared_met.mod(), resolution), 0.);
836 const double metsmear = fabs(randnorm(smeared_met.mod(), resolution)); //< better to reflect than to create a peak at 0
837 smeared_met = metsmear * smeared_met.unit();
838
839 return smeared_met;
840 }
841
844 inline Vector3 MET_SMEAR_CMS_RUN2(const Vector3& met, double set) {
845 Vector3 smeared_met = met;
846
847 // Calculate parallel and perpendicular resolutions and combine in quadrature (?)
848 const double resolution_para = ( 2.0 + 0.64*sqrt(set/GeV)) * GeV;
849 const double resolution_perp = (-1.5 + 0.68*sqrt(set/GeV)) * GeV;
850 const double resolution = sqrt(sqr(resolution_para) + sqr(resolution_perp));
851
852 // Smear by a Gaussian with width given by the resolution
853 // const double metsmear = max(randnorm(smeared_met.mod(), resolution), 0.);
854 const double metsmear = fabs(randnorm(smeared_met.mod(), resolution)); //< better to reflect than to create a peak at 0
855 smeared_met = metsmear * smeared_met.unit();
856
857 return smeared_met;
858 }
859
861
862
865
867 inline double TRK_EFF_ATLAS_RUN1(const Particle& p) {
868 if (p.charge3() == 0) return 0;
869 if (p.abseta() > 2.5) return 0;
870 if (p.pT() < 0.1*GeV) return 0;
871
872 if (p.abspid() == PID::ELECTRON) {
873 if (p.abseta() < 1.5) {
874 if (p.pT() < 1*GeV) return 0.73;
875 if (p.pT() < 100*GeV) return 0.95;
876 return 0.99;
877 } else {
878 if (p.pT() < 1*GeV) return 0.50;
879 if (p.pT() < 100*GeV) return 0.83;
880 else return 0.90;
881 }
882 } else if (p.abspid() == PID::MUON) {
883 if (p.abseta() < 1.5) {
884 return (p.pT() < 1*GeV) ? 0.75 : 0.99;
885 } else {
886 return (p.pT() < 1*GeV) ? 0.70 : 0.98;
887 }
888 } else { // charged hadrons
889 if (p.abseta() < 1.5) {
890 return (p.pT() < 1*GeV) ? 0.70 : 0.95;
891 } else {
892 return (p.pT() < 1*GeV) ? 0.60 : 0.85;
893 }
894 }
895 }
896
899 inline double TRK_EFF_ATLAS_RUN2(const Particle& p) {
900 return TRK_EFF_ATLAS_RUN1(p);
901 }
902
903
905 inline double TRK_EFF_CMS_RUN1(const Particle& p) {
906 if (p.charge3() == 0) return 0;
907 if (p.abseta() > 2.5) return 0;
908 if (p.pT() < 0.1*GeV) return 0;
909
910 if (p.abspid() == PID::ELECTRON) {
911 if (p.abseta() < 1.5) {
912 if (p.pT() < 1*GeV) return 0.73;
913 if (p.pT() < 100*GeV) return 0.95;
914 return 0.99;
915 } else {
916 if (p.pT() < 1*GeV) return 0.50;
917 if (p.pT() < 100*GeV) return 0.83;
918 else return 0.90;
919 }
920 } else if (p.abspid() == PID::MUON) {
921 if (p.abseta() < 1.5) {
922 return (p.pT() < 1*GeV) ? 0.75 : 0.99;
923 } else {
924 return (p.pT() < 1*GeV) ? 0.70 : 0.98;
925 }
926 } else { // charged hadrons
927 if (p.abseta() < 1.5) {
928 return (p.pT() < 1*GeV) ? 0.70 : 0.95;
929 } else {
930 return (p.pT() < 1*GeV) ? 0.60 : 0.85;
931 }
932 }
933 }
934
937 inline double TRK_EFF_CMS_RUN2(const Particle& p) {
938 return TRK_EFF_CMS_RUN1(p);
939 }
940
948 inline double ATLAS_JVT_EFF_LOOSE(const Jet & j){
949 if (j.abseta() > 2.4) return 1.0;
950 // No data for jets pt < 20, hopefully not relevant:
951 if (j.pt() <= 20*GeV || j.pt() >= 60*GeV) return 1.0;
952
953 const static vector<double> binedges_pt = {20*GeV,25*GeV,30*GeV,35*GeV,40*GeV,45*GeV,50*GeV,55*GeV,60*GeV};
954 const static vector<double> binvals = {0.9, 0.93, 0.94, 0.95, 0.96, 0.96, 0.97, 0.97};
955
956 const size_t bini = binIndex(j.pt(), binedges_pt);
957 return binvals[bini];
958 }
959
967 inline double ATLAS_JVT_EFF_MEDIUM(const Jet & j){
968 if (j.abseta() > 2.4) return 1.0;
969 // No data for jets pt < 20, hopefully not relevant:
970 if (j.pt() <= 20*GeV || j.pt() >= 60*GeV) return 1.0;
971
972 const static vector<double> binedges_pt = {20*GeV,25*GeV,30*GeV,35*GeV,40*GeV,45*GeV,50*GeV,55*GeV,60*GeV};
973 const static vector<double> binvals = {0.86, 0.9, 0.92, 0.93, 0.94, 0.95, 0.95, 0.96};
974
975 const size_t bini = binIndex(j.pt(), binedges_pt);
976 return binvals[bini];
977 }
978
986 inline double ATLAS_JVT_EFF_TIGHT(const Jet & j){
987 if (j.abseta() > 2.4) return 1.0;
988 // No data for jets pt < 20, hopefully not relevant:
989 if (j.pt() <= 20*GeV || j.pt() >= 60*GeV) return 1.0;
990
991 const static vector<double> binedges_pt = {20*GeV,25*GeV,30*GeV,35*GeV,40*GeV,45*GeV,50*GeV,55*GeV,60*GeV};
992 const static vector<double> binvals = {0.81, 0.84, 0.87, 0.90, 0.91, 0.92, 0.93, 0.94};
993
994 const size_t bini = binIndex(j.pt(), binedges_pt);
995 return binvals[bini];
996 }
997
999
1001
1002
1003}
1004
1005#endif
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:752
Representation of a clustered jet of particles.
Definition Jet.hh:42
Particles tauTags(const Cut &c=Cuts::open()) const
Tau particles which have been tag-matched to this jet (and pass an optional Cut)
bool cTagged(const Cut &c=Cuts::open()) const
Does this jet have at least one c-tag (that passes an optional Cut)?
Definition Jet.hh:147
bool bTagged(const Cut &c=Cuts::open()) const
Does this jet have at least one b-tag (that passes an optional Cut)?
Definition Jet.hh:134
Particles & particles()
Get the particles in this jet.
Definition Jet.hh:71
double py() const
y component of momentum.
Definition ParticleBase.hh:122
double pT() const
Get the directly (alias).
Definition ParticleBase.hh:63
double mass2() const
Get the mass**2 directly.
Definition ParticleBase.hh:82
double abseta() const
Get the directly (alias).
Definition ParticleBase.hh:91
double mass() const
Get the mass directly.
Definition ParticleBase.hh:80
double pz() const
z component of momentum.
Definition ParticleBase.hh:124
double pt() const
Get the directly.
Definition ParticleBase.hh:61
double px() const
x component of momentum.
Definition ParticleBase.hh:120
double Et() const
Get the directly.
Definition ParticleBase.hh:75
double E() const
Get the energy directly.
Definition ParticleBase.hh:51
double E2() const
Get the energy-squared.
Definition ParticleBase.hh:56
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:45
PdgId pid() const
This Particle's PDG ID code.
Definition Particle.hh:191
PdgId abspid() const
Absolute value of the PDG ID code.
Definition Particle.hh:193
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:40
Vector3 unit() const
Synonym for unitVec.
Definition Vector3.hh:124
double mod() const
Calculate the modulus of a vector. .
Definition VectorN.hh:95
double mass(const FourMomentum &a, const FourMomentum &b)
Calculate mass of two 4-vectors.
Definition Vector4.hh:1461
double ELECTRON_EFF_ATLAS_RUN1_MEDIUM(const Particle &e)
ATLAS Run 1 'medium' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:67
double ELECTRON_EFF_ATLAS_RUN1_TIGHT(const Particle &e)
ATLAS Run 1 'tight' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:123
double ELECTRON_EFF_ATLAS_RUN2_LOOSE(const Particle &e)
ATLAS Run 2 'loose' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:47
double ELECTRON_EFF_CMS_RUN1(const Particle &e)
CMS Run 1 electron reconstruction efficiency.
Definition ExptSmearingFunctions.hh:232
Particle ELECTRON_SMEAR_ATLAS_RUN1(const Particle &e)
ATLAS Run 1 electron reco smearing.
Definition ExptSmearingFunctions.hh:191
double ELECTRON_EFF_ATLAS_RUN2_TIGHT(const Particle &e)
ATLAS Run 2 'tight' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:172
double ELECTRON_RECOEFF_ATLAS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:30
Particle ELECTRON_SMEAR_CMS_RUN1(const Particle &e)
CMS electron energy smearing, preserving direction.
Definition ExptSmearingFunctions.hh:254
double ELECTRON_EFF_CMS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:242
double ELECTRON_EFF_ATLAS_RUN2_MEDIUM(const Particle &e)
ATLAS Run 2 'medium' electron reco+identification efficiency.
Definition ExptSmearingFunctions.hh:116
Particle ELECTRON_SMEAR_ATLAS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:222
double ELECTRON_RECOEFF_ATLAS_RUN1(const Particle &e)
Definition ExptSmearingFunctions.hh:20
Particle ELECTRON_SMEAR_CMS_RUN2(const Particle &e)
Definition ExptSmearingFunctions.hh:277
Jet JET_SMEAR_ATLAS_RUN2(const Jet &j)
Definition ExptSmearingFunctions.hh:752
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:712
Jet JET_SMEAR_ATLAS_RUN1(const Jet &j)
ATLAS Run 1 jet smearing.
Definition ExptSmearingFunctions.hh:729
Jet JET_SMEAR_CMS_RUN1(const Jet &j)
Definition ExptSmearingFunctions.hh:758
Jet JET_SMEAR_CMS_RUN2(const Jet &j)
Definition ExptSmearingFunctions.hh:764
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:720
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:702
Vector3 MET_SMEAR_ATLAS_RUN2(const Vector3 &met, double set)
Definition ExptSmearingFunctions.hh:799
Vector3 MET_SMEAR_CMS_RUN1(const Vector3 &met, double set)
Definition ExptSmearingFunctions.hh:826
Vector3 MET_SMEAR_ATLAS_RUN1(const Vector3 &met, double set)
ATLAS Run 1 ETmiss smearing.
Definition ExptSmearingFunctions.hh:779
Vector3 MET_SMEAR_CMS_RUN2(const Vector3 &met, double set)
Definition ExptSmearingFunctions.hh:844
FourMomentum P4_SMEAR_E_GAUSS(const FourMomentum &p, double resolution)
Definition MomentumSmearingFunctions.hh:45
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:52
Particle MUON_SMEAR_ATLAS_RUN1(const Particle &m)
ATLAS Run 1 muon reco smearing.
Definition ExptSmearingFunctions.hh:415
Particle MUON_SMEAR_CMS_RUN1(const Particle &m)
CMS Run 1 muon reco smearing.
Definition ExptSmearingFunctions.hh:465
double MUON_EFF_CMS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:458
double MUON_EFF_ATLAS_RUN1(const Particle &m)
ATLAS Run 1 muon reco efficiency.
Definition ExptSmearingFunctions.hh:378
Particle MUON_SMEAR_ATLAS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:437
double MUON_RECOEFF_ATLAS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:388
double MUON_EFF_ATLAS_RUN2(const Particle &m)
ATLAS Run 2 muon reco+ID efficiency.
Definition ExptSmearingFunctions.hh:400
double MUON_EFF_CMS_RUN1(const Particle &m)
CMS Run 1 muon reco efficiency.
Definition ExptSmearingFunctions.hh:449
Particle MUON_SMEAR_CMS_RUN2(const Particle &m)
Definition ExptSmearingFunctions.hh:492
Particle PHOTON_SMEAR_ATLAS_RUN1(const Particle &y)
Definition ExptSmearingFunctions.hh:365
double PHOTON_EFF_ATLAS_RUN1(const Particle &y)
ATLAS Run 2 photon reco efficiency.
Definition ExptSmearingFunctions.hh:291
double PHOTON_EFF_CMS_RUN2(const Particle &y)
Definition ExptSmearingFunctions.hh:358
double PHOTON_EFF_CMS_RUN1(const Particle &y)
Definition ExptSmearingFunctions.hh:350
double PHOTON_EFF_ATLAS_RUN2(const Particle &y)
ATLAS Run 2 photon reco efficiency.
Definition ExptSmearingFunctions.hh:321
double TAUJET_EFF_ATLAS_RUN1(const Jet &j)
ATLAS Run 1 8 TeV tau misID rates (medium working point)
Definition ExptSmearingFunctions.hh:540
double TAU_EFF_ATLAS_RUN1(const Particle &t)
ATLAS Run 1 8 TeV tau efficiencies (medium working point)
Definition ExptSmearingFunctions.hh:510
Particle TAU_SMEAR_CMS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:683
Particle TAU_SMEAR_CMS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:690
double TAU_EFF_ATLAS_RUN2(const Particle &t)
ATLAS Run 2 13 TeV tau efficiencies (medium working point)
Definition ExptSmearingFunctions.hh:574
Particle TAU_SMEAR_ATLAS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:626
double TAUJET_EFF_ATLAS_RUN2(const Jet &j)
ATLAS Run 2 13 TeV tau misID rate (medium working point)
Definition ExptSmearingFunctions.hh:598
double TAU_EFF_CMS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:675
double TAU_EFF_CMS_RUN1(const Particle &t)
Definition ExptSmearingFunctions.hh:667
Particle TAU_SMEAR_ATLAS_RUN2(const Particle &t)
Definition ExptSmearingFunctions.hh:659
double ATLAS_JVT_EFF_MEDIUM(const Jet &j)
Return the efficiency of the ATLAS JVT tagger at > 0.4 W.P.
Definition ExptSmearingFunctions.hh:967
double TRK_EFF_CMS_RUN2(const Particle &p)
Definition ExptSmearingFunctions.hh:937
double ATLAS_JVT_EFF_TIGHT(const Jet &j)
Return the efficiency of the ATLAS JVT tagger at > 0.7 W.P.
Definition ExptSmearingFunctions.hh:986
double TRK_EFF_CMS_RUN1(const Particle &p)
CMS Run 1 tracking efficiency.
Definition ExptSmearingFunctions.hh:905
double ATLAS_JVT_EFF_LOOSE(const Jet &j)
Return the efficiency of the ATLAS JVT tagger at > 0.2 W.P.
Definition ExptSmearingFunctions.hh:948
double TRK_EFF_ATLAS_RUN1(const Particle &p)
ATLAS Run 1 tracking efficiency.
Definition ExptSmearingFunctions.hh:867
double TRK_EFF_ATLAS_RUN2(const Particle &p)
Definition ExptSmearingFunctions.hh:899
Definition MC_CENT_PPB_Projections.hh:10
double deltaR(double rap1, double phi1, double rap2, double phi2)
Definition MathUtils.hh:698
static const double SQRT2
A pre-defined value of .
Definition MathConstants.hh:22
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type max(N1 a, N2 b)
Get the maximum of two numbers.
Definition MathUtils.hh:111
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type add_quad(NUM a, NUM b)
Named number-type addition in quadrature operation.
Definition MathUtils.hh:231
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type min(N1 a, N2 b)
Get the minimum of two numbers.
Definition MathUtils.hh:102
double randnorm(double loc, double scale)
Return a random number sampled from a Gaussian/normal distribution.
std::enable_if< std::is_arithmetic< NUM1 >::value &&std::is_arithmetic< NUM2 >::value, int >::type 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:455
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type 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:133
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type sqr(NUM a)
Named number-type squaring operation.
Definition MathUtils.hh:219