Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
egammaMVAFunctions.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 
8 #ifndef XAOD_STANDALONE
9 #include "GaudiKernel/SystemOfUnits.h"
10 using Gaudi::Units::GeV;
11 #else
12 #define GeV 1000
13 #endif
14 
15 #include <numbers>
16 
21 namespace egammaMVAFunctions
22 {
23 
24  // forward declarations
25  void initializeClusterFuncs(funcMap_t& funcLibrary,
26  const std::string& prefix,
27  bool useLayerCorrected);
28 
29  void initializeEgammaFuncs(funcMap_t& funcLibrary,
30  const std::string& prefix,
31  bool useLayerCorrected);
32 
34  std::unique_ptr<funcMap_t> initializeElectronFuncs(bool useLayerCorrected)
35  {
36  // rel21 uses a naming version of some variables without prefix, keep both for compatibility
37  auto funcLibraryPtr = std::make_unique<funcMap_t>();
38  funcMap_t& funcLibrary = *funcLibraryPtr;
39 
40  initializeClusterFuncs(funcLibrary, "el", useLayerCorrected);
41  initializeEgammaFuncs(funcLibrary, "el", useLayerCorrected);
42 
43  // specific functions only for electrons
44  funcLibrary["el_charge"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
45  { return compute_el_charge(*(static_cast<const xAOD::Electron*>(eg))); };
46  funcLibrary["el_tracketa"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
47  { return compute_el_tracketa(*(static_cast<const xAOD::Electron*>(eg))); };
48  funcLibrary["el_trackpt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
49  { return compute_el_trackpt(*(static_cast<const xAOD::Electron*>(eg))); };
50  funcLibrary["el_trackz0"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
51  { return compute_el_trackz0(*(static_cast<const xAOD::Electron*>(eg))); };
52  funcLibrary["el_refittedTrack_qoverp"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
53  { return compute_el_refittedTrack_qoverp(*(static_cast<const xAOD::Electron*>(eg))); };
54 
55  return funcLibraryPtr;
56  }
57 
59  std::unique_ptr<funcMap_t> initializeUnconvertedPhotonFuncs(bool useLayerCorrected)
60  {
61  auto funcLibraryPtr = std::make_unique<funcMap_t>();
62  funcMap_t& funcLibrary = *funcLibraryPtr;
63 
64  initializeClusterFuncs(funcLibrary, "ph", useLayerCorrected);
65  initializeEgammaFuncs(funcLibrary, "ph", useLayerCorrected);
66 
67  return funcLibraryPtr;
68  }
69 
70 
72  std::unique_ptr<funcMap_t> initializeConvertedPhotonFuncs(bool useLayerCorrected)
73  {
74  auto funcLibraryPtr = std::make_unique<funcMap_t>();
75  funcMap_t& funcLibrary = *funcLibraryPtr;
76 
77  initializeClusterFuncs(funcLibrary, "ph", useLayerCorrected);
78  initializeEgammaFuncs(funcLibrary, "ph", useLayerCorrected);
79 
80 
81  funcLibrary["ph_Rconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
82  { return xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(eg)); };
83 
84  funcLibrary["ph_convR"] = funcLibrary["convR"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
85  {
86  const auto *ph = static_cast<const xAOD::Photon*>(eg);
87  if (compute_ptconv(ph) > 3*GeV) {
89  }
90  return 799.0;
91 
92  };
93  funcLibrary["ph_zconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
94  {
95  const auto *vertex = static_cast<const xAOD::Photon*>(eg)->vertex();
96  return vertex ? vertex->position().z() : 9999;
97  };
98  funcLibrary["ph_pt1conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
99  { return compute_pt1conv(static_cast<const xAOD::Photon*>(eg)); };
100  funcLibrary["ph_pt2conv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
101  { return compute_pt2conv(static_cast<const xAOD::Photon*>(eg)); };
102  funcLibrary["ph_ptconv"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
103  { return compute_ptconv(static_cast<const xAOD::Photon*>(eg)); };
104 
105  funcLibrary["ph_convPtRatio"] = funcLibrary["convPtRatio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float
106  {
107  const auto *ph = static_cast<const xAOD::Photon*>(eg);
109  auto pt1 = compute_pt1conv(ph);
110  auto pt2 = compute_pt2conv(ph);
111  return std::max(pt1, pt2)/(pt1+pt2);
112  }
113  return 1.0f;
114  };
115 
116  if (useLayerCorrected) {
117  funcLibrary["ph_convEtOverPt"] = funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float
118  {
119  const auto *ph = static_cast<const xAOD::Photon*>(eg);
120 
121  float rv = 0.0;
124  }
125  return std::min(rv, 2.0f);
126  };
127  } else {
128  funcLibrary["ph_convEtOverPt"] = funcLibrary["convEtOverPt"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*cl)->float
129  {
130  const auto *ph = static_cast<const xAOD::Photon*>(eg);
131 
132  float rv = 0.0;
134  rv = std::max(0.0f, compute_rawcl_Eacc(*cl)/(std::cosh(compute_cl_eta(*cl))*compute_ptconv(ph)));
135  }
136  return std::min(rv, 2.0f);
137  };
138  }
139 
140  return funcLibraryPtr;
141  }
142 
143 
144  // Initialize the functions that just depend on the cluster.
145  // This helper function is not meant for external use.
147  const std::string& prefix,
148  bool useLayerCorrected)
149  {
150 
151  funcLibrary[prefix + "_cl_eta"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
152  { return compute_cl_eta(*cl); };
153  funcLibrary[prefix + "_cl_phi"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
154  { return compute_cl_phi(*cl); };
155  funcLibrary[prefix + "_cl_E"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
156  { return compute_cl_e(*cl); };
157  funcLibrary[prefix + "_cl_etaCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
158  { return compute_cl_etaCalo(*cl); };
159  funcLibrary[prefix + "_cl_phiCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
160  { return compute_cl_phiCalo(*cl); };
161  funcLibrary[prefix + "_cl_E_TileGap3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
162  { return cl->eSample(CaloSampling::TileGap3); };
163 
164  funcLibrary[prefix + "_cellIndexCalo"] = funcLibrary["cellIndexCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
165  { return std::floor(std::abs(compute_cl_etaCalo(*cl))/0.025); };
166  funcLibrary[prefix + "_phiModCalo"] = funcLibrary["phiModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
167  { return ((abs(compute_cl_eta(*cl)) < 1.425) ?
168  std::fmod(compute_cl_phiCalo(*cl), TMath::Pi() / 512) :
169  std::fmod(compute_cl_phiCalo(*cl), TMath::Pi() / 384));
170  };
171 
172  // improved version of phiModCalo, proposed by G. Unal, studied by L. Nasella
173  // see https://its.cern.ch/jira/browse/ATLASEG-325
174  // see https://indico.cern.ch/event/1364593/contributions/5843081/
175  funcLibrary[prefix + "_phiModCalo1"] = funcLibrary["phiModCalo1"] =
176  [](const xAOD::Egamma*, const xAOD::CaloCluster* cl) {
177  using std::numbers::pi;
178  const double eta = compute_cl_eta(*cl);
179  const double phi = compute_cl_phiCalo(*cl);
180  const double pi_divisor = std::abs(eta) < 1.425 ? 512. : 384.;
181 
182  if (eta > 0.) {
183  if (phi > 0.) return std::fmod(phi, pi / pi_divisor);
184  else return std::fmod((2 * pi + phi), pi / pi_divisor);
185  }
186  else return std::fmod((pi - phi), pi / pi_divisor);
187  };
188 
189  funcLibrary[prefix + "_phiModCell"] = funcLibrary["phiModCell"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
190  { return std::fmod(std::abs(compute_cl_phiCalo(*cl)), TMath::Pi() / 128); };
191  funcLibrary[prefix + "_etaModCalo"] = funcLibrary["etaModCalo"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
192  { return std::fmod(std::abs(compute_cl_etaCalo(*cl)), 0.025); };
193  funcLibrary["abs(" + prefix + "_cl_eta)"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
194  { return std::abs(compute_cl_eta(*cl)); };
195  funcLibrary[prefix + "_dPhiTG3"] = funcLibrary["dPhiTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
196  { return std::fmod(2.*TMath::Pi()+compute_cl_phi(*cl),TMath::Pi()/32.)-TMath::Pi()/64.0; };
197 
198  if (useLayerCorrected) {
199  funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
200  { return compute_correctedcl_Es0(*cl); };
201  funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
202  { return compute_correctedcl_Es1(*cl); };
203  funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
204  { return compute_correctedcl_Es2(*cl); };
205  funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
206  { return compute_correctedcl_Es3(*cl); };
207  funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
208  { return compute_correctedcl_Eacc(*cl); };
209  funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
210  { return compute_correctedcl_f0(*cl); };
211  funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
213  funcLibrary[prefix + "_R12"] = funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
215  funcLibrary[prefix + "_fTG3"] = funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
216  { return cl->eSample(CaloSampling::TileGap3)/compute_correctedcl_Eacc(*cl); };
217  } else {
218  funcLibrary[prefix + "_rawcl_Es0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
219  { return compute_rawcl_Es0(*cl); };
220  funcLibrary[prefix + "_rawcl_Es1"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
221  { return compute_rawcl_Es1(*cl); };
222  funcLibrary[prefix + "_rawcl_Es2"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
223  { return compute_rawcl_Es2(*cl); };
224  funcLibrary[prefix + "_rawcl_Es3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
225  { return compute_rawcl_Es3(*cl); };
226  funcLibrary[prefix + "_rawcl_Eacc"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
227  { return compute_rawcl_Eacc(*cl); };
228  funcLibrary[prefix + "_rawcl_f0"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
229  { return compute_rawcl_f0(*cl); };
230  funcLibrary[prefix + "_rawcl_calibHitsShowerDepth"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
232  funcLibrary[prefix + "_R12"] = funcLibrary["R12"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
233  { return compute_rawcl_Es1(*cl)/compute_rawcl_Es2(*cl); };
234  funcLibrary[prefix + "_fTG3"] = funcLibrary["fTG3"] = [](const xAOD::Egamma*, const xAOD::CaloCluster* cl)
235  { return cl->eSample(CaloSampling::TileGap3)/compute_rawcl_Eacc(*cl); };
236  }
237  }
238 
239  // Initialize the variables that just depend on egamma.
240  // This helper function is not meant for external use.
241  void initializeEgammaFuncs(funcMap_t& funcLibrary,
242  const std::string& prefix,
243  bool /* useLayerCorrected */)
244  {
245  funcLibrary[prefix + "_e011"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
246  { return eg->showerShapeValue(xAOD::EgammaParameters::e011); };
247  funcLibrary[prefix + "_e033"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
248  { return eg->showerShapeValue(xAOD::EgammaParameters::e033); };
249  funcLibrary[prefix + "_e132"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
250  { return eg->showerShapeValue(xAOD::EgammaParameters::e132); };
251  funcLibrary[prefix + "_e1152"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
252  { return eg->showerShapeValue(xAOD::EgammaParameters::e1152); };
253  funcLibrary[prefix + "_ethad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
254  { return eg->showerShapeValue(xAOD::EgammaParameters::ethad1); };
255  funcLibrary[prefix + "_ethad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
256  { return eg->showerShapeValue(xAOD::EgammaParameters::ethad); };
257  funcLibrary[prefix + "_f1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
258  { return eg->showerShapeValue(xAOD::EgammaParameters::f1); };
259  funcLibrary[prefix + "_f3"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
260  { return eg->showerShapeValue(xAOD::EgammaParameters::f3); };
261  funcLibrary[prefix + "_f1core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
262  { return eg->showerShapeValue(xAOD::EgammaParameters::f1core); };
263  funcLibrary[prefix + "_f3core"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
264  { return eg->showerShapeValue(xAOD::EgammaParameters::f3core); };
265  funcLibrary[prefix + "_e233"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
266  { return eg->showerShapeValue(xAOD::EgammaParameters::e233); };
267  funcLibrary[prefix + "_e235"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
268  { return eg->showerShapeValue(xAOD::EgammaParameters::e235); };
269  funcLibrary[prefix + "_e255"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
270  { return eg->showerShapeValue(xAOD::EgammaParameters::e255); };
271  funcLibrary[prefix + "_e237"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
272  { return eg->showerShapeValue(xAOD::EgammaParameters::e237); };
273  funcLibrary[prefix + "_e277"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
274  { return eg->showerShapeValue(xAOD::EgammaParameters::e277); };
275  funcLibrary[prefix + "_e333"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
276  { return eg->showerShapeValue(xAOD::EgammaParameters::e333); };
277  funcLibrary[prefix + "_e335"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
278  { return eg->showerShapeValue(xAOD::EgammaParameters::e335); };
279  funcLibrary[prefix + "_e337"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
280  { return eg->showerShapeValue(xAOD::EgammaParameters::e337); };
281  funcLibrary[prefix + "_e377"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
282  { return eg->showerShapeValue(xAOD::EgammaParameters::e377); };
283  funcLibrary[prefix + "_weta1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
284  { return eg->showerShapeValue(xAOD::EgammaParameters::weta1); };
285  funcLibrary[prefix + "_weta2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
286  { return eg->showerShapeValue(xAOD::EgammaParameters::weta2); };
287  funcLibrary[prefix + "_e2ts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
288  { return eg->showerShapeValue(xAOD::EgammaParameters::e2ts1); };
289  funcLibrary[prefix + "_e2tsts1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
290  { return eg->showerShapeValue(xAOD::EgammaParameters::e2tsts1); };
291  funcLibrary[prefix + "_fracs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
292  { return eg->showerShapeValue(xAOD::EgammaParameters::fracs1); };
293  funcLibrary[prefix + "_widths1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
294  { return eg->showerShapeValue(xAOD::EgammaParameters::widths1); };
295  funcLibrary[prefix + "_widths2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
296  { return eg->showerShapeValue(xAOD::EgammaParameters::widths2); };
297  funcLibrary[prefix + "_poscs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
298  { return eg->showerShapeValue(xAOD::EgammaParameters::poscs1); };
299  funcLibrary[prefix + "_poscs2"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
300  { return eg->showerShapeValue(xAOD::EgammaParameters::poscs2); };
301  funcLibrary[prefix + "_asy1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
302  { return eg->showerShapeValue(xAOD::EgammaParameters::asy1); };
303  funcLibrary[prefix + "_pos"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
304  { return eg->showerShapeValue(xAOD::EgammaParameters::pos); };
305  funcLibrary[prefix + "_pos7"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
306  { return eg->showerShapeValue(xAOD::EgammaParameters::pos7); };
307  funcLibrary[prefix + "_barys1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
308  { return eg->showerShapeValue(xAOD::EgammaParameters::barys1); };
309  funcLibrary[prefix + "_wtots1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
310  { return eg->showerShapeValue(xAOD::EgammaParameters::wtots1); };
311  funcLibrary[prefix + "_emins1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
312  { return eg->showerShapeValue(xAOD::EgammaParameters::emins1); };
313  funcLibrary[prefix + "_emaxs1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
314  { return eg->showerShapeValue(xAOD::EgammaParameters::emaxs1); };
315  funcLibrary[prefix + "_r33over37allcalo"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
316  { return eg->showerShapeValue(xAOD::EgammaParameters::r33over37allcalo); };
317  funcLibrary[prefix + "_ecore"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
318  { return eg->showerShapeValue(xAOD::EgammaParameters::ecore); };
319  funcLibrary[prefix + "_Reta"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
320  { return eg->showerShapeValue(xAOD::EgammaParameters::Reta); };
321  funcLibrary[prefix + "_Rphi"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
322  { return eg->showerShapeValue(xAOD::EgammaParameters::Rphi); };
323  funcLibrary[prefix + "_Eratio"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
324  { return eg->showerShapeValue(xAOD::EgammaParameters::Eratio); };
325  funcLibrary[prefix + "_Rhad"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
326  { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad); };
327  funcLibrary[prefix + "_Rhad1"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
328  { return eg->showerShapeValue(xAOD::EgammaParameters::Rhad1); };
329  funcLibrary[prefix + "_DeltaE"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)
330  { return eg->showerShapeValue(xAOD::EgammaParameters::DeltaE); };
331 
332  }
333 }
egammaMVAFunctions::compute_el_trackz0
float compute_el_trackz0(const xAOD::Electron &el)
Definition: egammaMVAFunctions.h:139
egammaMVAFunctions::compute_rawcl_Eacc
float compute_rawcl_Eacc(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:94
egammaMVAFunctions::compute_cl_phiCalo
float compute_cl_phiCalo(const xAOD::CaloCluster &cluster)
Definition: egammaMVAFunctions.h:58
xAOD::EgammaParameters::e233
@ e233
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x3 (in cell units e...
Definition: EgammaEnums.h:68
egammaMVAFunctions::funcMap_t
std::unordered_map< std::string, std::function< float(const xAOD::Egamma *, const xAOD::CaloCluster *)> > funcMap_t
Define the map type since it's long.
Definition: egammaMVAFunctions.h:243
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
xAOD::EgammaParameters::e033
@ e033
uncalibrated energy (sum of cells) in presampler in a 3x3 window in cells in eta X phi
Definition: EgammaEnums.h:33
ParticleTest.eg
eg
Definition: ParticleTest.py:29
xAOD::EgammaParameters::Reta
@ Reta
e237/e277
Definition: EgammaEnums.h:154
xAOD::EgammaParameters::e2ts1
@ e2ts1
2nd max in strips calc by summing 3 strips
Definition: EgammaEnums.h:105
egammaMVAFunctions
These functions are for calculating variables used by the MVA calibration.
Definition: egammaMVAFunctions.h:44
xAOD::EgammaParameters::asy1
@ asy1
uncorr asymmetry in 3 strips in the 1st sampling
Definition: EgammaEnums.h:123
xAOD::EgammaParameters::e235
@ e235
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x5
Definition: EgammaEnums.h:71
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
egammaMVAFunctions::compute_cl_e
float compute_cl_e(const xAOD::CaloCluster &cluster)
Definition: egammaMVAFunctions.h:50
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
egammaMVAFunctions::compute_correctedcl_calibHitsShowerDepth
float compute_correctedcl_calibHitsShowerDepth(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:124
xAOD::EgammaParameters::ecore
@ ecore
core energy in em calo E(core) = E0(3x3) + E1(15x2) + E2(5x5) + E3(3x5)
Definition: EgammaEnums.h:152
egammaMVAFunctions::compute_ptconv
float compute_ptconv(const xAOD::Photon *ph)
This ptconv is the old one used by MVACalib.
Definition: egammaMVAFunctions.h:180
xAOD::EgammaParameters::ethad1
@ ethad1
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
Definition: EgammaEnums.h:42
egammaMVAFunctions::compute_el_trackpt
float compute_el_trackpt(const xAOD::Electron &el)
Definition: egammaMVAFunctions.h:138
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
xAOD::EgammaParameters::Rphi
@ Rphi
e233/e237
Definition: EgammaEnums.h:156
egammaMVAFunctions::compute_cl_eta
float compute_cl_eta(const xAOD::CaloCluster &cluster)
Definition: egammaMVAFunctions.h:48
xAOD::EgammaParameters::f1core
@ f1core
E1(3x1)/E = fraction of the energy reconstructed in the first longitudinal compartment of the electro...
Definition: EgammaEnums.h:60
xAOD::EgammaParameters::wtots1
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
Definition: EgammaEnums.h:140
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
egammaMVAFunctions::compute_correctedcl_Es0
float compute_correctedcl_Es0(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:77
pi
#define pi
Definition: TileMuonFitter.cxx:65
xAOD::EgammaParameters::e333
@ e333
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x3
Definition: EgammaEnums.h:83
xAOD::EgammaParameters::f3
@ f3
fraction of energy reconstructed in 3rd sampling
Definition: EgammaEnums.h:54
xAOD::EgammaParameters::e1152
@ e1152
uncalibrated energy (sum of cells) in strips in a 15x2 window in cells in eta X phi
Definition: EgammaEnums.h:39
xAOD::EgammaParameters::ethad
@ ethad
ET leakage into hadronic calorimeter with exclusion of energy in CaloSampling::TileGap3.
Definition: EgammaEnums.h:45
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
egammaMVAFunctions::initializeConvertedPhotonFuncs
std::unique_ptr< funcMap_t > initializeConvertedPhotonFuncs(bool useLayerCorrected)
A function to build the map for converted photons.
Definition: egammaMVAFunctions.cxx:72
xAOD::EgammaHelpers::numberOfSiTracks
std::size_t numberOfSiTracks(const xAOD::Photon *eg)
return the number of Si tracks in the conversion
Definition: PhotonxAODHelpers.cxx:58
egammaMVAFunctions::compute_pt2conv
float compute_pt2conv(const xAOD::Photon *ph)
Definition: egammaMVAFunctions.h:204
egammaMVAFunctions::compute_el_tracketa
float compute_el_tracketa(const xAOD::Electron &el)
Definition: egammaMVAFunctions.h:137
xAOD::EgammaParameters::f1
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition: EgammaEnums.h:52
egammaMVAFunctions::compute_correctedcl_Es2
float compute_correctedcl_Es2(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:85
egammaMVAFunctions::compute_correctedcl_f0
float compute_correctedcl_f0(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:98
xAOD::EgammaParameters::pos7
@ pos7
Difference between the track and the shower positions: sum_{i=i_m-7}^{i=i_m+7}E_i x (i-i_m) / sum_{i=...
Definition: EgammaEnums.h:133
xAOD::EgammaParameters::emins1
@ emins1
energy reconstructed in the strip with the minimal value between the first and second maximum
Definition: EgammaEnums.h:143
xAOD::EgammaParameters::poscs2
@ poscs2
relative position in eta within cell in 2nd sampling
Definition: EgammaEnums.h:121
egammaMVAFunctions::initializeClusterFuncs
void initializeClusterFuncs(funcMap_t &funcLibrary, const std::string &prefix, bool useLayerCorrected)
Definition: egammaMVAFunctions.cxx:146
xAOD::EgammaParameters::e011
@ e011
uncalibrated energy (sum of cells) in presampler in a 1x1 window in cells in eta X phi
Definition: EgammaEnums.h:30
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
egammaMVAFunctions::initializeUnconvertedPhotonFuncs
std::unique_ptr< funcMap_t > initializeUnconvertedPhotonFuncs(bool useLayerCorrected)
A function to build the map for uncoverted photons.
Definition: egammaMVAFunctions.cxx:59
egammaMVAFunctions::compute_el_refittedTrack_qoverp
float compute_el_refittedTrack_qoverp(const xAOD::Electron &el)
Definition: egammaMVAFunctions.h:140
hist_file_dump.f
f
Definition: hist_file_dump.py:135
egammaMVAFunctions::compute_rawcl_Es1
float compute_rawcl_Es1(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:73
egammaMVAFunctions::compute_rawcl_f0
float compute_rawcl_f0(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:95
egammaMVAFunctions::compute_cl_etaCalo
float compute_cl_etaCalo(const xAOD::CaloCluster &cluster)
Definition: egammaMVAFunctions.h:51
xAOD::EgammaParameters::Rhad1
@ Rhad1
ethad1/et
Definition: EgammaEnums.h:162
egammaMVAFunctions::compute_correctedcl_Eacc
float compute_correctedcl_Eacc(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:97
xAOD::EgammaParameters::e377
@ e377
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition: EgammaEnums.h:92
egammaMVAFunctions::compute_rawcl_calibHitsShowerDepth
float compute_rawcl_calibHitsShowerDepth(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:115
xAOD::EgammaParameters::poscs1
@ poscs1
relative position in eta within cell in 1st sampling
Definition: EgammaEnums.h:119
xAOD::EgammaHelpers::conversionRadius
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
Definition: PhotonxAODHelpers.cxx:77
egammaMVAFunctions::initializeElectronFuncs
std::unique_ptr< funcMap_t > initializeElectronFuncs(bool useLayerCorrected)
A function to build the map for electrons.
Definition: egammaMVAFunctions.cxx:34
xAOD::EgammaParameters::barys1
@ barys1
barycentre in sampling 1 calculated in 3 strips
Definition: EgammaEnums.h:135
xAOD::Electron_v1
Definition: Electron_v1.h:34
dq_make_web_display.rv
def rv
Definition: dq_make_web_display.py:219
egammaMVAFunctions.h
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
egammaMVAFunctions::compute_cl_phi
float compute_cl_phi(const xAOD::CaloCluster &cluster)
Definition: egammaMVAFunctions.h:49
egammaMVAFunctions::initializeEgammaFuncs
void initializeEgammaFuncs(funcMap_t &funcLibrary, const std::string &prefix, bool useLayerCorrected)
Definition: egammaMVAFunctions.cxx:241
xAOD::Photon_v1
Definition: Photon_v1.h:37
xAOD::EgammaParameters::e255
@ e255
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 5x5
Definition: EgammaEnums.h:74
xAOD::EgammaParameters::e337
@ e337
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x7
Definition: EgammaEnums.h:89
xAOD::EgammaParameters::r33over37allcalo
@ r33over37allcalo
1-ratio of energy in 3x3 over 3x7 cells; E(3x3) = E0(1x1) + E1(3x1) + E2(3x3) + E3(3x3); E(3x7) = E0(...
Definition: EgammaEnums.h:149
egammaMVAFunctions::compute_pt1conv
float compute_pt1conv(const xAOD::Photon *ph)
Definition: egammaMVAFunctions.h:191
egammaMVAFunctions::compute_correctedcl_Es3
float compute_correctedcl_Es3(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:89
xAOD::EgammaParameters::e277
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition: EgammaEnums.h:80
xAOD::EgammaParameters::widths1
@ widths1
same as egammaParameters::weta1 but without corrections on particle impact point inside the cell
Definition: EgammaEnums.h:114
xAOD::EgammaParameters::weta1
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
Definition: EgammaEnums.h:97
xAOD::EgammaParameters::e132
@ e132
uncalibrated energy (sum of cells) in strips in a 3x2 window in cells in eta X phi
Definition: EgammaEnums.h:36
egammaMVAFunctions::compute_correctedcl_Es1
float compute_correctedcl_Es1(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:81
xAOD::EgammaParameters::Eratio
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Definition: EgammaEnums.h:158
xAOD::EgammaParameters::e237
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
Definition: EgammaEnums.h:77
egammaMVAFunctions::compute_rawcl_Es2
float compute_rawcl_Es2(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:74
xAOD::EgammaParameters::f3core
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
Definition: EgammaEnums.h:65
egammaMVAFunctions::compute_rawcl_Es3
float compute_rawcl_Es3(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:75
xAOD::EgammaParameters::e2tsts1
@ e2tsts1
energy of the cell corresponding to second energy maximum in the first sampling
Definition: EgammaEnums.h:108
xAOD::EgammaParameters::Rhad
@ Rhad
ethad/et
Definition: EgammaEnums.h:160
xAOD::EgammaParameters::widths2
@ widths2
same as egammaParameters::weta2 but without corrections on particle impact point inside the cell
Definition: EgammaEnums.h:117
xAOD::EgammaParameters::DeltaE
@ DeltaE
e2tsts1-emins1
Definition: EgammaEnums.h:164
egammaMVAFunctions::compute_rawcl_Es0
float compute_rawcl_Es0(const xAOD::CaloCluster &cl)
Definition: egammaMVAFunctions.h:67
xAOD::EgammaParameters::e335
@ e335
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x5
Definition: EgammaEnums.h:86
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
xAOD::EgammaParameters::emaxs1
@ emaxs1
energy of strip with maximal energy deposit
Definition: EgammaEnums.h:145
xAOD::EgammaParameters::fracs1
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
Definition: EgammaEnums.h:111
xAOD::EgammaParameters::pos
@ pos
difference between shower cell and predicted track in +/- 1 cells
Definition: EgammaEnums.h:125
egammaMVAFunctions::compute_el_charge
float compute_el_charge(const xAOD::Electron &el)
Definition: egammaMVAFunctions.h:136
xAOD::EgammaParameters::weta2
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
Definition: EgammaEnums.h:103