ATLAS Offline Software
TForwardElectronLikelihoodTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "TROOT.h"
7 #include "TSystem.h"
8 #include <cmath>
9 
10 const double Root::TForwardElectronLikelihoodTool::fIpBounds[IP_FBINS + 1] = {
11  0.,
12  500.
13 };
14 // These are the variables availalble in the likelihood.
15 const std::string
17  "el_secondLambda", "el_lateral", "el_longitudinal", "el_centerLambda",
18  "el_fracMax", "el_secondR", "el_significance", "el_secondDensity"
19  };
20 
22  const char* name)
23  : asg::AsgMessaging(std::string(name))
24  , m_doPileupCorrection(false)
25  , m_variableNames("")
26  , m_pdfFileName("")
27  , m_variableBitMask(0x0)
28  , m_cutPosition_kinematicEta(-9)
29  , m_cutPosition_kinematicEt(-9)
30  , m_cutPosition_LH(-9)
31 {
32  for (unsigned int varIndex = 0; varIndex < s_fnVariables; varIndex++) {
33  for (auto & fPDFbin : fPDFbins) {
34  for (auto & ip : fPDFbin) {
35  for (unsigned int et = 0; et < s_fnEtBinsHist; et++) {
36  for (unsigned int eta = 0; eta < s_fnEtaBins; eta++) {
37  ip[et][eta][varIndex] = nullptr;
38  }
39  }
40  }
41  }
42  }
43 }
44 
45 //=============================================================================
46 // Destructor
47 //=============================================================================
49 {
50  for (unsigned int varIndex = 0; varIndex < s_fnVariables; varIndex++) {
51  for (auto & fPDFbin : fPDFbins) {
52  for (auto & ip : fPDFbin) {
53  for (unsigned int et = 0; et < s_fnEtBinsHist; et++) {
54  for (unsigned int eta = 0; eta < s_fnEtaBins; eta++) {
55  delete ip[et][eta][varIndex];
56  ip[et][eta][varIndex] = nullptr;
57  }
58  }
59  }
60  }
61  }
62 }
63 
66 {
67  ATH_MSG_DEBUG("TForwardElectronLikelihoodTool initialize.");
68  // use an int as a StatusCode
69  StatusCode sc(StatusCode::SUCCESS);
70 
71  // Check that all needed variables are setup
72  if (m_pdfFileName.empty()) {
74  "You need to specify the input PDF file name before you call "
75  "initialize() with setPDFFileName('your/file/name.root') ");
76  sc = StatusCode::FAILURE;
77  }
78 
79  unsigned int number_of_expected_bin = s_fnDiscEtBins * s_fnEtaBins;
80  if (m_cutLikelihood.size() != number_of_expected_bin) {
81  ATH_MSG_ERROR("Configuration issue : CutLikelihood expected size "
82  << number_of_expected_bin << " input size "
83  << m_cutLikelihood.size());
85  "Could NOT initialize! Please fix the errors mentioned above...");
86  sc = StatusCode::FAILURE;
87  return sc;
88  }
89 
90  // --------------------------------------------------------------------------
91  // Register the cuts and check that the registration worked:
92 
93  // Cut position for the kineatic pre-selection, separately for eta/Et
94  m_cutPosition_kinematicEta =
95  m_acceptInfo.addCut("kinematicEta", "pass kinematic eta");
96  if (m_cutPosition_kinematicEta < 0)
97  sc = StatusCode::FAILURE;
98  m_cutPosition_kinematicEt =
99  m_acceptInfo.addCut("kinematicEt", "pass kinematic Et ");
100  if (m_cutPosition_kinematicEt < 0)
101  sc = StatusCode::FAILURE;
102 
103  // Cut position for the likelihood selection - DO NOT CHANGE ORDER!
104  m_cutPosition_LH = m_acceptInfo.addCut("passLH", "pass Likelihood");
105  if (m_cutPosition_LH < 0) {
106  sc = StatusCode::FAILURE;
107  }
108 
109  // Check that we got everything OK
110  if (sc == StatusCode::FAILURE) {
112  "! Something went wrong with the setup of the return objects...");
113  return sc;
114  }
115 
116  // Get the correct bit mask for the current likelihood operating point
117  m_variableBitMask = getLikelihoodBitmask(m_variableNames);
118 
119  //----------File/Histo operation------------------------------------
120  // Load the ROOT file containing the PDFs
121  TString tmpString(m_pdfFileName);
122  gSystem->ExpandPathName(tmpString);
123  std::string fname(tmpString.Data());
124  m_pdfFile = TFile::Open(fname.c_str(), "READ");
125  // Check that we could load the ROOT file
126  if (!m_pdfFile) {
127  ATH_MSG_ERROR(" No ROOT file found here: " << m_pdfFileName);
128  return StatusCode::FAILURE;
129  }
130 
131  // Load the histograms
132  for (unsigned int varIndex = 0; varIndex < s_fnVariables; varIndex++) {
133  const std::string& vstr = fVariables[varIndex];
134  // Skip the loading of PDFs for variables we don't care about for this
135  // operating point. If the string is empty (which is true in the default
136  // 2012 case), load all of them.
137  if (m_variableNames.find(vstr) == std::string::npos &&
138  !m_variableNames.empty()) {
139  continue;
140  }
141  loadVarHistograms(vstr, varIndex);
142  }
143 
144  // TFile close does not free the memory
145  m_pdfFile->Close();
146  // We need the destructor to be called
147  delete m_pdfFile;
148  //----------End File/Histo operation------------------------------------
149 
150  ATH_MSG_DEBUG("Initialization complete for a LH tool with these specs:"
151  << "\n - PdfFileName : "
152  << m_pdfFileName
153  << "\n - Variable bitmask : "
154  << m_variableBitMask
155  << "\n - VariableNames : "
156  << m_variableNames);
157  return sc;
158 }
159 
160 int
162  unsigned int varIndex)
163 {
164  for (unsigned int s_or_b = 0; s_or_b < 2; ++s_or_b) {
165  for (unsigned int ip = 0; ip < IP_FBINS; ++ip) {
166  for (unsigned int et = 0; et < s_fnEtBinsHist; ++et) {
167  for (unsigned int eta = 0; eta < s_fnEtaBins; ++eta) {
168 
169  std::string sig_bkg = (s_or_b == 0) ? "sig" : "bkg";
170  // For the fwd LH PDFs and optimisation have matching eta bin
171  // boundaries unsigned int eta_tmp = (eta > 0) ? eta-1 : eta ;
172  unsigned int eta_tmp = eta;
173  unsigned int et_tmp = et;
174  char binname[200];
175  getBinName(binname, et_tmp, eta_tmp, ip, m_ipBinning);
176 
177  char pdfdir[500];
178  snprintf(pdfdir, 500, "%s/%s", vstr.c_str(), sig_bkg.c_str());
179  char pdf[500];
180  snprintf(pdf,
181  500,
182  "%s_%s_smoothed_hist_from_KDE_%s",
183  vstr.c_str(),
184  sig_bkg.c_str(),
185  binname);
186 
187  if (!m_pdfFile->GetListOfKeys()->Contains(vstr.c_str())) {
188  ATH_MSG_INFO("Warning: skipping variable "
189  << vstr << " because the folder does not exist.");
190  return 1;
191  }
192  if (!((TDirectory*)m_pdfFile->Get(vstr.c_str()))
193  ->GetListOfKeys()
194  ->Contains(sig_bkg.c_str())) {
195  ATH_MSG_INFO("Warning: skipping variable "
196  << vstr << " because the folder does not exist.");
197  return 1;
198  }
199  // Use the first Et bin given in the root file for all Et ranges below
200  if (et == 0 && !((TDirectory*)m_pdfFile->Get(pdfdir))
201  ->GetListOfKeys()
202  ->Contains(pdf)) {
203  ATH_MSG_INFO("using lowest GeV bin in place of all below.");
204  getBinName(binname, et_tmp + 1, eta_tmp, ip, m_ipBinning);
205  snprintf(pdf,
206  500,
207  "%s_%s_smoothed_hist_from_KDE_%s",
208  vstr.c_str(),
209  sig_bkg.c_str(),
210  binname);
211  }
212  if (((TDirectory*)m_pdfFile->Get(pdfdir))
213  ->GetListOfKeys()
214  ->Contains(pdf)) {
215  TH1F* hist =
216  (TH1F*)(((TDirectory*)m_pdfFile->Get(pdfdir))->Get(pdf));
217  fPDFbins[s_or_b][ip][et][eta][varIndex] =
219  delete hist;
220  } else {
221  ATH_MSG_INFO("Warning: Object " << pdf << " does not exist.");
222  ATH_MSG_INFO("Skipping all other histograms with this variable.");
223  return 1;
224  }
225  }
226  }
227  }
228  }
229  return 1;
230 }
231 
234  double eta,
235  double eT,
236  double ip) const
237 {
239 
240  vars.likelihood = likelihood;
241  vars.eta = eta;
242  vars.eT = eT;
243  vars.ip = ip;
244 
245  return accept(vars);
246 }
247 
248 // This method calculates if the current electron passes the requested
249 // likelihood cut
252  LikeEnumForward::LHAcceptVars_t& vars_struct) const
253 {
254  // Setup return accept with AcceptInfo
255  asg::AcceptData acceptData(&m_acceptInfo);
256 
257  // Set up the individual cuts
258  bool passKineEta(true);
259  bool passKineEt(true);
260  bool passLH(true);
261 
262  if (fabs(vars_struct.eta) < 2.5) {
263  ATH_MSG_DEBUG("This forward electron has"
264  << vars_struct.eta
265  << ", which is fabs(eta)<2.5 Returning False.");
266  passKineEta = false;
267  }
268  // Return if the kinematic requirements are not fulfilled
269  acceptData.setCutResult(m_cutPosition_kinematicEta, passKineEta);
270  if (!passKineEta) {
271  return acceptData;
272  }
273 
274  unsigned int etbin = getLikelihoodEtHistBin(vars_struct.eT);
275  unsigned int etabin = getLikelihoodEtaBin(vars_struct.eta);
276 
277  if (etbin >= s_fnDiscEtBins) {
278  ATH_MSG_WARNING("Cannot evaluate likelihood for Et "
279  << vars_struct.eT << ". Returning false..");
280  passKineEt = false;
281  }
282 
283  // Return if the kinematic requirements are not fulfilled
284  acceptData.setCutResult(m_cutPosition_kinematicEt, passKineEt);
285  if (!passKineEt) {
286  return acceptData;
287  }
288 
289  double cutDiscriminant = -999.;
290  unsigned int ibin_combined = etbin * s_fnEtaBins + etabin;
291 
292  if (!m_cutLikelihood.empty()) {
293 
294  cutDiscriminant = m_cutLikelihood[ibin_combined];
295  // If doPileupCorrection, then correct the discriminant itself instead of
296  // the cut value
297  if (m_doPileupCorrection) {
298  cutDiscriminant +=
299  vars_struct.ip * m_cutLikelihoodPileupCorrectionA[ibin_combined] +
300  m_cutLikelihoodPileupCorrectionB[ibin_combined];
301  }
302  }
303 
304  // Determine if the calculated likelihood value passes the cut
305  ATH_MSG_DEBUG("Likelihood macro: Discriminant: ");
306  if (vars_struct.likelihood < cutDiscriminant) {
307  ATH_MSG_DEBUG("Likelihood macro: Disciminant Cut Failed.");
308  passLH = false;
309  }
310  acceptData.setCutResult(m_cutPosition_LH, passLH);
311  return acceptData;
312 }
313 
314 double
316  double eT,
317  double secondLambda,
318  double lateral,
319  double longitudinal,
320  double centerLambda,
321  double fracMax,
322  double secondR,
323  double significance,
324  double secondDensity,
325  double ip) const
326 {
328  vars.eta = eta;
329  vars.eT = eT;
330  vars.secondLambda = secondLambda;
331  vars.lateral = lateral;
332  vars.longitudinal = longitudinal;
333  vars.centerLambda = centerLambda;
334  vars.fracMax = fracMax;
335  vars.secondR = secondR;
336  vars.significance = significance;
337  vars.secondDensity = secondDensity;
338  vars.ip = ip;
339  return calculate(vars);
340 }
341 
342 // The main public method to actually calculate the likelihood value
343 double
345  LikeEnumForward::LHCalcVars_t& vars_struct) const
346 {
347  // Reset the results to defaul values
348  double result = -999;
349  double arr[] = { vars_struct.secondLambda, vars_struct.lateral,
350  vars_struct.longitudinal, vars_struct.centerLambda,
351  vars_struct.fracMax, vars_struct.secondR,
352  vars_struct.significance, vars_struct.secondDensity };
353  std::vector<double> vec(arr, arr + sizeof(arr) / sizeof(double));
354 
355  // Calculate the actual likelihood value and fill the return object
356  result = this->evaluateLikelihood(
357  vec, vars_struct.eT, vars_struct.eta, vars_struct.ip);
358  return result;
359 }
360 
361 double
363  std::vector<float>& varVector,
364  double et,
365  double eta,
366  double ip) const
367 {
368  std::vector<double> vec;
369  for (unsigned int var = 0; var < s_fnVariables; var++) {
370  vec.push_back(varVector[var]);
371  }
372  return evaluateLikelihood(vec, et, eta, ip);
373 }
374 
375 double
377  std::vector<double>& varVector,
378  double et,
379  double eta,
380  double ip) const
381 {
382  // const double GeV = 1000;
383  unsigned int etbin = getLikelihoodEtHistBin(et);
384  unsigned int etabin = getLikelihoodEtaBin(eta);
385  unsigned int ipbin = getIpBin(ip);
386 
387  if (etbin >= s_fnEtBinsHist) {
388  ATH_MSG_WARNING("skipping etbin " << etbin << ", et " << et);
389  return -999.;
390  }
391  if (etabin >= s_fnEtaBins) {
392  ATH_MSG_WARNING("skipping etabin " << etabin << ", eta " << eta);
393  return -999.;
394  }
395 
396  if (varVector.size() != s_fnVariables) {
397  ATH_MSG_WARNING("Error! Variable vector size mismatch! Check your vector!");
398  return -999.;
399  }
400 
401  double SigmaS = 1.;
402  double SigmaB = 1.;
403 
404  for (unsigned int var = 0; var < s_fnVariables; var++) {
405 
406  std::string varstr = fVariables[var];
407 
408  // Skip variables that are masked off (not used) in the likelihood
409  if (!(m_variableBitMask & (0x1 << var))) {
410  continue;
411  }
412 
413  for (unsigned int s_or_b = 0; s_or_b < 2; s_or_b++) {
414 
415  int bin =
416  fPDFbins[s_or_b][ipbin][etbin][etabin][var]->FindBin(varVector[var]);
417  double prob = 0;
418 
419  double integral =
420  double(fPDFbins[s_or_b][ipbin][etbin][etabin][var]->Integral());
421  if (integral == 0) { // currently, the crack always has integral == 0
423  "Error! PDF integral == 0!"); // changed it to debug message since we
424  // intend to run the tool in the
425  // derivations
426  return -1.35;
427  }
428 
429  prob = double(fPDFbins[s_or_b][ipbin][etbin][etabin][var]->GetBinContent(
430  bin)) /
431  integral;
432 
433  if (s_or_b == 0)
434  SigmaS *= prob;
435  else if (s_or_b == 1)
436  SigmaB *= prob;
437  }
438  }
439 
440  return TransformLikelihoodOutput(SigmaS, SigmaB);
441 }
442 
443 // --------------------------------------------
444 double
446  double pb) const
447 {
448  // returns transformed or non-transformed output
449  // (Taken mostly from TMVA likelihood code)
450  double fEpsilon = 1e-99;
451  // If both signal and bkg are 0, we want it to fail.
452  if (ps < fEpsilon)
453  ps = 0;
454  if (pb < fEpsilon)
455  pb = fEpsilon;
456  double disc = ps / double(ps + pb);
457 
458  if (disc >= 1.0)
459  disc = 1. - 1.e-15;
460  else if (disc <= 0.0)
461  disc = fEpsilon;
462 
463  double tau = 15.0;
464  disc = -log(1.0 / disc - 1.0) * (1. / double(tau));
465 
466  ATH_MSG_DEBUG("disc is " << disc);
467  return disc;
468 }
469 
470 // Gets the IP bin
471 unsigned int
473 {
474  for (unsigned int ipBin = 0; ipBin < IP_FBINS; ++ipBin) {
475  if (ip < fIpBounds[ipBin + 1])
476  return ipBin;
477  }
478  return 0;
479 }
480 
481 // Gets the Eta bin given the eta . Binning uses uper bound
482 unsigned int
484 {
485  const unsigned int nEtaBins = s_fnEtaBins;
486  const double etaBins[nEtaBins] = { 2.6, 2.7, 2.8, 2.9, 3.0,
487  3.1, 3.16, 3.35, 3.6, 4.9 };
488  for (unsigned int etaBin = 0; etaBin < nEtaBins; ++etaBin) {
489  if (fabs(eta) < etaBins[etaBin])
490  return etaBin;
491  }
492  return (nEtaBins - 1);
493 }
494 // Gets the histogram Et bin given the et (MeV). Binning uses upper bound
495 unsigned int
497 {
498  const double GeV = 1000;
499  const unsigned int nEtBins = s_fnDiscEtBins;
500  const double eTBins[nEtBins] = {
501  30 * GeV, 40 * GeV, 50 * GeV, 7000 * GeV
502  }; // removed 20 GeV bin since we're upper bound oriented
503  for (unsigned int eTBin = 0; eTBin < nEtBins; ++eTBin) {
504  if (eT < eTBins[eTBin]) {
505  return eTBin;
506  }
507  }
508  return (nEtBins - 1); // Return the last bin if > the last bin.
509 }
510 
511 // Gets the bin name. Given the HISTOGRAM bin naming used in the input file
512 // which seems to be lower bound oriented ...
513 void
515  char* buffer,
516  int etbin,
517  int etabin,
518  int ipbin,
519  const std::string& iptype)
520 {
521  double eta_bounds[s_fnEtaBins] = { 2.5, 2.6, 2.7, 2.8, 2.9,
522  3.0, 3.1, 3.16, 3.35, 3.6 };
523  int et_bounds[s_fnEtBinsHist] = { 20, 30, 40, 50 };
524  if (!iptype.empty()) {
525  snprintf(buffer,
526  200,
527  "%s%det%02deta%0.2f",
528  iptype.c_str(),
529  int(fIpBounds[ipbin]),
530  et_bounds[etbin],
531  eta_bounds[etabin]);
532  } else {
533  snprintf(buffer, 200, "et%deta%0.2f", et_bounds[etbin], eta_bounds[etabin]);
534  }
535 }
536 
537 unsigned int
539  const std::string& vars) const
540 {
541  unsigned int mask = 0x0;
542  ATH_MSG_DEBUG("Variables to be used: ");
543  for (unsigned int var = 0; var < s_fnVariables; var++) {
544  if (vars.find(fVariables[var]) != std::string::npos) {
545  ATH_MSG_DEBUG(fVariables[var]);
546  mask = mask | 0x1 << var;
547  }
548  }
549  ATH_MSG_DEBUG("mask: " << mask);
550  return mask;
551 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
Root::EGSelectors::SafeTH1
Definition: SafeTH1.h:12
LikeEnumForward::LHCalcVars_t::secondDensity
double secondDensity
Definition: TForwardElectronLikelihoodTool.h:78
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
et
Extra patterns decribing particle interation process.
LikeEnumForward::LHCalcVars_t::secondLambda
double secondLambda
Definition: TForwardElectronLikelihoodTool.h:72
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
get_generator_info.result
result
Definition: get_generator_info.py:21
Root::TForwardElectronLikelihoodTool::getBinName
static void getBinName(char *buffer, int etbin, int etabin, int ipbin, const std::string &iptype)
Definition: TForwardElectronLikelihoodTool.cxx:514
Root::TForwardElectronLikelihoodTool::s_fnEtBinsHist
static const unsigned int s_fnEtBinsHist
Definition: TForwardElectronLikelihoodTool.h:238
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TCS::KFMET::nEtaBins
constexpr unsigned nEtaBins
Definition: KalmanMETCorrectionConstants.h:18
Root::TForwardElectronLikelihoodTool::TransformLikelihoodOutput
double TransformLikelihoodOutput(double ps, double pb) const
Apply a transform to zoom into the LH output peaks.
Definition: TForwardElectronLikelihoodTool.cxx:445
integral
double integral(TH1 *h)
Definition: computils.cxx:57
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
LikeEnumForward::LHAcceptVars_t::eta
double eta
Definition: TForwardElectronLikelihoodTool.h:63
LikeEnumForward::LHCalcVars_t::eta
double eta
Definition: TForwardElectronLikelihoodTool.h:70
Root::TForwardElectronLikelihoodTool::loadVarHistograms
int loadVarHistograms(const std::string &vstr, unsigned int varIndex)
Load the variable histograms from the pdf file.
Definition: TForwardElectronLikelihoodTool.cxx:161
LikeEnumForward::LHCalcVars_t::longitudinal
double longitudinal
Definition: TForwardElectronLikelihoodTool.h:74
plotmaker.hist
hist
Definition: plotmaker.py:148
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
LikeEnumForward::LHCalcVars_t::eT
double eT
Definition: TForwardElectronLikelihoodTool.h:71
ConvertOldUJHistosToNewHistos.etaBins
list etaBins
Definition: ConvertOldUJHistosToNewHistos.py:145
asg
Definition: DataHandleTestTool.h:28
bin
Definition: BinsDiffFromStripMedian.h:43
Root::TForwardElectronLikelihoodTool::accept
asg::AcceptData accept() const
Return dummy accept with only info.
Definition: TForwardElectronLikelihoodTool.h:115
LikeEnumForward::LHAcceptVars_t::ip
double ip
Definition: TForwardElectronLikelihoodTool.h:65
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
covarianceTool.prob
prob
Definition: covarianceTool.py:678
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
Root::TForwardElectronLikelihoodTool::calculate
double calculate(LikeEnumForward::LHCalcVars_t &vars_struct) const
Definition: TForwardElectronLikelihoodTool.cxx:344
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
Root::TForwardElectronLikelihoodTool::getIpBin
static unsigned int getIpBin(double ip)
Definition: TForwardElectronLikelihoodTool.cxx:472
xAOD::etaBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap etaBin
Definition: L2StandAloneMuon_v1.cxx:148
createCoolChannelIdFile.buffer
buffer
Definition: createCoolChannelIdFile.py:12
Root::TForwardElectronLikelihoodTool::fVariables
static const std::string fVariables[s_fnVariables]
Definition: TForwardElectronLikelihoodTool.h:244
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IDTPM::eT
float eT(const U &p)
Accessor utility function for getting the value of Tranverse energy.
Definition: TrackParametersHelper.h:120
Root::TForwardElectronLikelihoodTool::fIpBounds
static const double fIpBounds[IP_FBINS+1]
Definition: TForwardElectronLikelihoodTool.h:237
TForwardElectronLikelihoodTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LikeEnumForward::LHCalcVars_t::lateral
double lateral
Definition: TForwardElectronLikelihoodTool.h:73
LikeEnumForward::LHCalcVars_t::ip
double ip
Definition: TForwardElectronLikelihoodTool.h:80
LikeEnumForward::LHCalcVars_t::significance
double significance
Definition: TForwardElectronLikelihoodTool.h:79
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Root::TForwardElectronLikelihoodTool::getLikelihoodEtaBin
static unsigned int getLikelihoodEtaBin(double eta)
Eta binning for pdfs and discriminant cuts.
Definition: TForwardElectronLikelihoodTool.cxx:483
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Root::TForwardElectronLikelihoodTool::getLikelihoodEtHistBin
static unsigned int getLikelihoodEtHistBin(double eT)
Coarse Et binning. Used for the likelihood and discriminant pdfs.
Definition: TForwardElectronLikelihoodTool.cxx:496
EMFourMomBuilder::calculate
void calculate(xAOD::Electron &electron)
Definition: EMFourMomBuilder.cxx:68
Root::TForwardElectronLikelihoodTool::TForwardElectronLikelihoodTool
TForwardElectronLikelihoodTool(const char *name="TForwardElectronLikelihoodTool")
Standard constructor.
Definition: TForwardElectronLikelihoodTool.cxx:21
Root::TForwardElectronLikelihoodTool::~TForwardElectronLikelihoodTool
~TForwardElectronLikelihoodTool()
Standard destructor.
Definition: TForwardElectronLikelihoodTool.cxx:48
Root::TForwardElectronLikelihoodTool::s_fnVariables
static const unsigned int s_fnVariables
Definition: TForwardElectronLikelihoodTool.h:243
LikeEnumForward::LHAcceptVars_t::eT
double eT
Definition: TForwardElectronLikelihoodTool.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LikeEnumForward::LHCalcVars_t::fracMax
double fracMax
Definition: TForwardElectronLikelihoodTool.h:75
Root::TForwardElectronLikelihoodTool::s_fnEtaBins
static const unsigned int s_fnEtaBins
Definition: TForwardElectronLikelihoodTool.h:242
Root::TForwardElectronLikelihoodTool::fPDFbins
EGSelectors::SafeTH1 * fPDFbins[2][IP_FBINS][s_fnEtBinsHist][s_fnEtaBins][s_fnVariables]
Definition: TForwardElectronLikelihoodTool.h:247
LikeEnumForward::LHAcceptVars_t
Definition: TForwardElectronLikelihoodTool.h:61
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
Root::TForwardElectronLikelihoodTool::getLikelihoodBitmask
unsigned int getLikelihoodBitmask(const std::string &vars) const
Mask out the variables ,out of all possible ones, that are not employed in the current configuration ...
Definition: TForwardElectronLikelihoodTool.cxx:538
asg::AcceptData::setCutResult
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:134
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LikeEnumForward::LHCalcVars_t::centerLambda
double centerLambda
Definition: TForwardElectronLikelihoodTool.h:76
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
PowhegPythia8EvtGen_jetjet.pdf
pdf
Definition: PowhegPythia8EvtGen_jetjet.py:4
LikeEnumForward::LHCalcVars_t::secondR
double secondR
Definition: TForwardElectronLikelihoodTool.h:77
LikeEnumForward::LHAcceptVars_t::likelihood
double likelihood
Definition: TForwardElectronLikelihoodTool.h:62
LikeEnumForward::LHCalcVars_t
Definition: TForwardElectronLikelihoodTool.h:69
Root::TForwardElectronLikelihoodTool::evaluateLikelihood
double evaluateLikelihood(std::vector< double > &varVector, double et, double eta, double ip=0) const
Definition: TForwardElectronLikelihoodTool.cxx:376
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
asg::AcceptData
Definition: AcceptData.h:30
Root::TForwardElectronLikelihoodTool::initialize
StatusCode initialize()
Initialize this class.
Definition: TForwardElectronLikelihoodTool.cxx:65