ATLAS Offline Software
CommonEfficiencyTool.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 // Framework include(s):
7 
8 // local include(s)
13 
14 // ROOT include(s)
15 #include "TF1.h"
16 #include "TH1.h"
17 #include "TH2.h"
18 #include "TH3.h"
19 #include "TROOT.h"
20 #include "TClass.h"
21 #include <utility>
22 
23 using namespace TauAnalysisTools;
24 
25 /*
26  This tool acts as a common tool to apply efficiency scale factors and
27  uncertainties. By default, only nominal scale factors without systematic
28  variations are applied. Unavailable systematic variations are ignored, meaning
29  that the tool only returns the nominal value. In case the one available
30  systematic is requested, the smeared scale factor is computed as:
31  - sf = sf_nominal +/- n * uncertainty
32 
33  where n is in general 1 (representing a 1 sigma smearing), but can be any
34  arbitrary value. In case multiple systematic variations are passed they are
35  added in quadrature. Note that it's currently only supported if all are up or
36  down systematics.
37 
38  The tool reads in root files including TH2 histograms which need to fullfil a
39  predefined structure:
40 
41  scale factors:
42  - sf_<workingpoint>_<prongness>p
43  uncertainties:
44  - <NP>_<up/down>_<workingpoint>_<prongness>p (for asymmetric uncertainties)
45  - <NP>_<workingpoint>_<prongness>p (for symmetric uncertainties)
46 
47  where the <workingpoint> (e.g. loose/medium/tight) fields may be
48  optional. <prongness> represents either 1 or 3, whereas 3 is currently used
49  for multiprong in general. The <NP> fields are names for the type of nuisance
50  parameter (e.g. STAT or SYST), note the tool decides whethe the NP is a
51  recommended or only an available systematic based on the first character:
52  - uppercase -> recommended
53  - lowercase -> available
54  This magic happens here:
55  - CommonEfficiencyTool::generateSystematicSets()
56 
57  In addition the root input file can also contain objects of type TF1 that can
58  be used to provide kind of unbinned scale factors or systematics. The major
59  usecase for now is the high-pt uncertainty for the tau ID and tau
60  reconstruction.
61 
62  The files may also include TNamed objects which is used to define how x and
63  y-axes should be treated. By default the x-axis is given in units of tau-pT in
64  GeV and the y-axis is given as tau-eta. If there is for example a TNamed
65  object with name "Yaxis" and title "|eta|" the y-axis is treated in units of
66  absolute tau eta. All this is done in:
67  - void CommonEfficiencyTool::ReadInputs(TFile* fFile)
68 
69  Other tools for scale factors may build up on this tool and overwrite or add
70  praticular functionality (one example is the TauEfficiencyTriggerTool).
71 */
72 
73 //______________________________________________________________________________
75  : asg::AsgTool( sName )
76  , m_mSF(nullptr)
77  , m_sSystematicSet(nullptr)
78  , m_fX(&finalTauPt)
79  , m_fY(&finalTauEta)
80  , m_sSFHistName("sf")
81  , m_bNoMultiprong(false)
82  , m_eCheckTruth(TauAnalysisTools::Unknown)
83  , m_bSFIsAvailable(false)
84  , m_bSFIsAvailableChecked(false)
85 {
86  declareProperty( "InputFilePath", m_sInputFilePath = "" );
87  declareProperty( "VarName", m_sVarName = "" );
88  declareProperty( "WP", m_sWP = "" );
89  declareProperty( "UseHighPtUncert", m_bUseHighPtUncert = false );
90  declareProperty( "SkipTruthMatchCheck", m_bSkipTruthMatchCheck = false );
91  declareProperty( "JetIDLevel", m_iJetIDLevel = (int)JETIDNONE );
92  declareProperty( "EleIDLevel", m_iEleIDLevel = (int)ELEIDNONE );
93  declareProperty( "SplitMu", m_bSplitMu = false );
94  declareProperty( "SplitMCCampaign", m_bSplitMCCampaign = false );
95  declareProperty( "MCCampaign", m_sMCCampaign = "");
96  declareProperty( "UseTauSubstructure", m_bUseTauSubstructure = false);
97 }
98 
99 /*
100  need to clear the map of histograms cause we have the ownership, not ROOT
101 */
103 {
104  if (m_mSF)
105  for (auto mEntry : *m_mSF)
106  delete std::get<0>(mEntry.second);
107 }
108 
109 /*
110  - Find the root files with scale factor inputs on cvmfs using PathResolver
111  (more info here:
112  https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/PathResolver)
113  - Call further functions to process and define NP strings and so on
114  - Configure to provide nominal scale factors by default
115 */
117 {
118  ATH_MSG_INFO( "Initializing CommonEfficiencyTool" );
119  // only read in histograms once
120  if (m_mSF==nullptr)
121  {
122  std::string sInputFilePath = PathResolverFindCalibFile(m_sInputFilePath);
123 
124  m_mSF = std::make_unique< tSFMAP >();
125  std::unique_ptr< TFile > fSF( TFile::Open( sInputFilePath.c_str(), "READ" ) );
126  if(!fSF)
127  {
128  ATH_MSG_FATAL("Could not open file " << sInputFilePath.c_str());
129  return StatusCode::FAILURE;
130  }
131  ReadInputs(*fSF);
132  fSF->Close();
133  }
134 
135  // needed later on in generateSystematicSets(), maybe move it there
136  std::vector<std::string> vInputFilePath;
137  split(m_sInputFilePath,'/',vInputFilePath);
138  m_sInputFileName = vInputFilePath.back();
139 
141 
142  if (!m_sWP.empty())
143  m_sSFHistName = "sf_"+m_sWP;
144 
145  // load empty systematic variation by default
146  if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS )
147  return StatusCode::FAILURE;
148 
149  return StatusCode::SUCCESS;
150 }
151 
152 /*
153  Retrieve the scale factors and if requested the values for the NP's and add
154  this stuff in quadrature. Finally return sf_nom +/- n*uncertainty
155 */
156 
157 //______________________________________________________________________________
159  double& dEfficiencyScaleFactor, unsigned int iRunNumber, unsigned int iMu)
160 {
161  // check which true state is requested
163  {
164  dEfficiencyScaleFactor = 1.;
165  return CP::CorrectionCode::Ok;
166  }
167 
168  // check if 1 prong
169  if (m_bNoMultiprong && xTau.nTracks() != 1)
170  {
171  dEfficiencyScaleFactor = 1.;
172  return CP::CorrectionCode::Ok;
173  }
174 
175  // get decay mode or prong extension for histogram name
176  std::string sMode;
178  {
179  int iDecayMode = -1;
181  sMode = ConvertDecayModeToString(iDecayMode);
182  if (sMode.empty())
183  {
184  ATH_MSG_WARNING("Found tau with unknown decay mode. Skip efficiency correction.");
186  }
187  }
188  else
189  {
190  // skip taus which are not 1 or 3 prong
191  if( xTau.nTracks() != 1 && xTau.nTracks() != 3) {
192  dEfficiencyScaleFactor = 1.;
193  return CP::CorrectionCode::Ok;
194  }
195 
196  sMode = ConvertProngToString(xTau.nTracks());
197  }
198 
199  std::string sMu = "";
200  std::string sMCCampaign = "";
201 
202  if (m_bSplitMu) sMu = ConvertMuToString(iMu);
203  if (m_bSplitMCCampaign) sMCCampaign = GetMcCampaignString(iRunNumber);
204  std::string sHistName = m_sSFHistName + sMode + sMu + sMCCampaign;
205 
206  // get standard scale factor
207  CP::CorrectionCode tmpCorrectionCode = getValue(sHistName,
208  xTau,
209  dEfficiencyScaleFactor);
210  // return correction code if histogram is not available
211  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
212  return tmpCorrectionCode;
213 
214  // skip further process if systematic set is empty
215  if (m_sSystematicSet->empty())
216  return CP::CorrectionCode::Ok;
217 
218  // get uncertainties summed in quadrature
219  double dTotalSystematic2 = 0.;
220  double dDirection = 0.;
221  for (auto syst : *m_sSystematicSet)
222  {
223  // check if systematic is available
224  auto it = m_mSystematicsHistNames.find(syst.basename());
225 
226  // get uncertainty value
227  double dUncertaintySyst = 0.;
228 
229  // needed for up/down decision
230  dDirection = syst.parameter();
231 
232  // build up histogram name
233  sHistName = it->second;
234  if (dDirection>0.) sHistName+="_up";
235  else sHistName+="_down";
236  if (!m_sWP.empty()) sHistName+="_"+m_sWP;
237  sHistName += sMode + sMu + sMCCampaign;
238 
239  // filter unwanted combinations
240  if( (sHistName.find("3P") != std::string::npos && sHistName.find("1p") != std::string::npos) ||
241  (sHistName.find("1P") != std::string::npos && sHistName.find("3p") != std::string::npos))
242  continue;
243 
244  // get the uncertainty from the histogram
245  tmpCorrectionCode = getValue(sHistName,
246  xTau,
247  dUncertaintySyst);
248 
249  // return correction code if histogram is not available
250  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
251  return tmpCorrectionCode;
252 
253  // scale uncertainty with direction, i.e. +/- n*sigma
254  dUncertaintySyst *= dDirection;
255 
256  // square uncertainty and add to total uncertainty
257  dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
258  }
259 
260  // now use dDirection to use up/down uncertainty
261  dDirection = (dDirection > 0.) ? 1. : -1.;
262 
263  // finally apply uncertainty (eff * ( 1 +/- \sum )
264  dEfficiencyScaleFactor *= 1. + dDirection * std::sqrt(dTotalSystematic2);
265 
266  return CP::CorrectionCode::Ok;
267 }
268 
269 /*
270  Get scale factor from getEfficiencyScaleFactor and decorate it to the
271  tau. Note that this can only be done if the variable name is not already used,
272  e.g. if the variable was already decorated on a previous step (enured by the
273  m_bSFIsAvailableChecked check).
274 
275  Technical note: cannot use `static SG::Decorator` as we will have
276  multiple instances of this tool with different decoration names.
277 */
278 //______________________________________________________________________________
280  unsigned int iRunNumber, unsigned int iMu)
281 {
282  double dSf = 0.;
283 
286  {
287  m_bSFIsAvailable = decor.isAvailable(xTau);
289  if (m_bSFIsAvailable)
290  {
291  ATH_MSG_DEBUG(m_sVarName << " decoration is available on first tau processed, switched off applyEfficiencyScaleFactor for further taus.");
292  ATH_MSG_DEBUG("If an application of efficiency scale factors needs to be redone, please pass a shallow copy of the original tau.");
293  }
294  }
295  if (m_bSFIsAvailable)
296  return CP::CorrectionCode::Ok;
297 
298  // retrieve scale factor
299  CP::CorrectionCode tmpCorrectionCode = getEfficiencyScaleFactor(xTau, dSf, iRunNumber, iMu);
300  // adding scale factor to tau as decoration
301  decor(xTau) = dSf;
302 
303  return tmpCorrectionCode;
304 }
305 
306 /*
307  standard check if a systematic is available
308 */
309 //______________________________________________________________________________
311 {
313  return sys.find(systematic) != sys.end();
314 }
315 
316 /*
317  standard way to return systematics that are available (including recommended
318  systematics)
319 */
320 //______________________________________________________________________________
322 {
324 }
325 
326 /*
327  standard way to return systematics that are recommended
328 */
329 //______________________________________________________________________________
331 {
333 }
334 
335 /*
336  Configure the tool to use a systematic variation for further usage, until the
337  tool is reconfigured with this function. The passed systematic set is checked
338  for sanity:
339  - unsupported systematics are skipped
340  - only combinations of up or down supported systematics is allowed
341  - don't mix recommended systematics with other available systematics, cause
342  sometimes recommended are a quadratic sum of the other variations,
343  e.g. TOTAL=(SYST^2 + STAT^2)^0.5
344 */
345 //______________________________________________________________________________
347 {
348 
349  // first check if we already know this systematic configuration
350  auto itSystematicSet = m_mSystematicSets.find(sSystematicSet);
351  if (itSystematicSet != m_mSystematicSets.end())
352  {
353  m_sSystematicSet = &itSystematicSet->first;
354  return StatusCode::SUCCESS;
355  }
356 
357  // sanity checks if systematic set is supported
358  double dDirection = 0.;
359  CP::SystematicSet sSystematicSetAvailable;
360  for (auto sSyst : sSystematicSet)
361  {
362  // check if systematic is available
363  auto it = m_mSystematicsHistNames.find(sSyst.basename());
364  if (it == m_mSystematicsHistNames.end())
365  {
366  ATH_MSG_VERBOSE("unsupported systematic variation: "<< sSyst.basename()<<"; skipping this one");
367  continue;
368  }
369 
370 
371  if (sSyst.parameter() * dDirection < 0)
372  {
373  ATH_MSG_ERROR("unsupported set of systematic variations, you should either use only \"UP\" or only \"DOWN\" systematics in one set!");
374  ATH_MSG_ERROR("systematic set will not be applied");
375  return StatusCode::FAILURE;
376  }
377  dDirection = sSyst.parameter();
378 
379  if ((m_sRecommendedSystematics.find(sSyst.basename()) != m_sRecommendedSystematics.end()) and sSystematicSet.size() > 1)
380  {
381  ATH_MSG_ERROR("unsupported set of systematic variations, you should not combine \"TAUS_{TRUE|FAKE}_EFF_*_TOTAL\" with other systematic variations!");
382  ATH_MSG_ERROR("systematic set will not be applied");
383  return StatusCode::FAILURE;
384  }
385 
386  // finally add the systematic to the set of systematics to process
387  sSystematicSetAvailable.insert(sSyst);
388  }
389 
390  // store this calibration for future use, and make it current
391  m_sSystematicSet = &m_mSystematicSets.insert(std::pair<CP::SystematicSet,std::string>(sSystematicSetAvailable, sSystematicSet.name())).first->first;
392 
393  return StatusCode::SUCCESS;
394 }
395 
396 //=================================PRIVATE-PART=================================
397 std::string CommonEfficiencyTool::ConvertProngToString(const int fProngness) const
398 {
399  return fProngness == 1 ? "_1p" : "_3p";
400 }
401 
402 /*
403  mu converter, returns "_highMu" for average number of vertices higher than 35 and
404  "_lowMu" for everything below
405 */
406 //______________________________________________________________________________
407 std::string CommonEfficiencyTool::ConvertMuToString(const int iMu) const
408 {
409  if (iMu > 35 )
410  return "_highMu";
411 
412  return "_lowMu";
413 }
414 
415 /*
416  run number converter, first checks if m_sMCCampaign is set. If yes, use it.
417  If not, use random run number to determine MC campaign
418 */
419 //______________________________________________________________________________
420 std::string CommonEfficiencyTool::GetMcCampaignString(const int iRunNumber) const
421 {
422  if (m_sMCCampaign == "MC16a" || m_sMCCampaign == "MC16d")
423  return std::string("_")+m_sMCCampaign;
424  // FIXME?
425  else if (m_sMCCampaign == "MC16e")
426  return "_MC16d"; // MC16e recommendations not available yet, use MC16d instead
427  else if (m_sMCCampaign != "")
428  ATH_MSG_WARNING("unsupported mc campaign: " << m_sMCCampaign);
429 
430  // FIXME?
431  if (iRunNumber > 324320 )
432  return "_MC16d";
433 
434  return "_MC16a";
435 }
436 
437 /*
438  decay mode converter
439 */
440 //______________________________________________________________________________
441 std::string CommonEfficiencyTool::ConvertDecayModeToString(const int iDecayMode) const
442 {
443  switch(iDecayMode)
444  {
446  return "_r1p0n";
448  return "_r1p1n";
450  return "_r1pXn";
452  return "_r3p0n";
454  return "_r3pXn";
455  default:
456  return "";
457  }
458 }
459 
460 /*
461  Read in a root file and store all objects to a map of this type:
462  std::map<std::string, tTupleObjectFunc > (see header) It's basically a map of
463  the histogram name and a function pointer based on the TObject type (TH1F,
464  TH1D, TF1). This is resolved in the function:
465  - CommonEfficiencyTool::addHistogramToSFMap
466  Further this function figures out the axis definition (see description on the
467  top)
468 */
469 //______________________________________________________________________________
470 void CommonEfficiencyTool::ReadInputs(const TFile& fFile)
471 {
472  m_mSF->clear();
473 
474  // initialize function pointer
475  m_fX = &finalTauPt;
476  m_fY = &finalTauEta;
477 
478  TKey *kKey;
479  TIter itNext(fFile.GetListOfKeys());
480  while ((kKey = (TKey*)itNext()))
481  {
482  // parse file content for objects of type TNamed, check their title for
483  // known strings and reset funtion pointer
484  std::string sKeyName = kKey->GetName();
485  if (sKeyName == "Xaxis")
486  {
487  TNamed* tObj = (TNamed*)kKey->ReadObj();
488  std::string sTitle = tObj->GetTitle();
489  delete tObj;
490  if (sTitle == "P" || sTitle == "PFinalCalib")
491  {
492  m_fX = &finalTauP;
493  ATH_MSG_DEBUG("using full momentum for x-axis");
494  }
495  if (sTitle == "TruthDecayMode")
496  {
497  m_fX = &truthDecayMode;
498  ATH_MSG_DEBUG("using truth decay mode for x-axis");
499  }
500  if (sTitle == "truth pt")
501  {
502  m_fX = &truthTauPt;
503  ATH_MSG_DEBUG("using truth pT for x-axis");
504  }
505  if (sTitle == "|eta|")
506  {
507  m_fX = &finalTauAbsEta;
508  ATH_MSG_DEBUG("using absolute tau eta for x-axis");
509  }
510 
511  continue;
512  }
513  else if (sKeyName == "Yaxis")
514  {
515  TNamed* tObj = (TNamed*)kKey->ReadObj();
516  std::string sTitle = tObj->GetTitle();
517  delete tObj;
518  if (sTitle == "track-eta")
519  {
521  ATH_MSG_DEBUG("using leading track eta for y-axis");
522  }
523  else if (sTitle == "|eta|")
524  {
525  m_fY = &finalTauAbsEta;
526  ATH_MSG_DEBUG("using absolute tau eta for y-axis");
527  }
528  else if (sTitle == "mu")
529  {
530  m_fY = [this](const xAOD::TauJet&) -> double {
531  const xAOD::EventInfo* xEventInfo = nullptr;
532  if (evtStore()->retrieve(xEventInfo,"EventInfo").isFailure()) {
533  return 0;
534  }
535  if (xEventInfo->runNumber()==284500)
536  {
537  return xEventInfo->averageInteractionsPerCrossing();
538  }
539  else if (xEventInfo->runNumber()==300000 || xEventInfo->runNumber()==310000)
540  {
541  return xEventInfo->actualInteractionsPerCrossing();
542  }
543  return 0;
544  };
545  ATH_MSG_DEBUG("using average mu for y-axis");
546  }
547  else if (sTitle == "truth |eta|")
548  {
549  m_fY = &truthTauAbsEta;
550  ATH_MSG_DEBUG("using absolute truth tau eta for y-axis");
551  }
552  continue;
553  }
554 
555  std::vector<std::string> vSplitName = {};
556  split(sKeyName,'_',vSplitName);
557  if (vSplitName[0] == "sf")
558  {
559  addHistogramToSFMap(kKey, sKeyName);
560  }
561  else
562  {
563  // std::string sDirection = vSplitName[1];
564  if (sKeyName.find("_up_") != std::string::npos or sKeyName.find("_down_") != std::string::npos)
565  addHistogramToSFMap(kKey, sKeyName);
566  else
567  {
568  size_t iPos = sKeyName.find('_');
569  addHistogramToSFMap(kKey, sKeyName.substr(0,iPos)+"_up"+sKeyName.substr(iPos));
570  addHistogramToSFMap(kKey, sKeyName.substr(0,iPos)+"_down"+sKeyName.substr(iPos));
571  }
572  }
573  }
574  ATH_MSG_INFO("data loaded from " << fFile.GetName());
575 }
576 
577 /*
578  Create the tuple objects for the map
579 */
580 //______________________________________________________________________________
581 void CommonEfficiencyTool::addHistogramToSFMap(TKey* kKey, const std::string& sKeyName)
582 {
583  // handling for the 3 different input types TH1F/TH1D/TF1, function pointer
584  // handle the access methods for the final scale factor retrieval
585  TClass *cClass = gROOT->GetClass(kKey->GetClassName());
586  if (cClass->InheritsFrom("TH2"))
587  {
588  TH1* oObject = (TH1*)kKey->ReadObj();
589  oObject->SetDirectory(0);
590  (*m_mSF)[sKeyName] = tTupleObjectFunc(oObject,&getValueTH2);
591  ATH_MSG_DEBUG("added histogram with name "<<sKeyName);
592  }
593  else if (cClass->InheritsFrom("TH3"))
594  {
595  TH1* oObject = (TH1*)kKey->ReadObj();
596  oObject->SetDirectory(0);
597  (*m_mSF)[sKeyName] = tTupleObjectFunc(oObject,&getValueTH3);
598  ATH_MSG_DEBUG("added histogram with name "<<sKeyName);
599  }else if (cClass->InheritsFrom("TH1"))
600  {
601  TH1* oObject = (TH1*)kKey->ReadObj();
602  oObject->SetDirectory(0);
603  (*m_mSF)[sKeyName] = tTupleObjectFunc(oObject,&getValueTH1);
604  ATH_MSG_DEBUG("added histogram with name "<<sKeyName);
605  }
606  else if (cClass->InheritsFrom("TF1"))
607  {
608  TObject* oObject = kKey->ReadObj();
609  (*m_mSF)[sKeyName] = tTupleObjectFunc(oObject,&getValueTF1);
610  ATH_MSG_DEBUG("added function with name "<<sKeyName);
611  }
612  else
613  {
614  ATH_MSG_DEBUG("ignored object with name "<<sKeyName);
615  }
616 }
617 
618 /*
619  This function parses the names of the obejects from the input file and
620  generates the systematic sets and defines which ones are recommended or only
621  available. It also checks, based on the root file name, on which tau it needs
622  to be applied, e.g. only on reco taus coming from true taus or on those faked
623  by true electrons...
624 
625  Examples:
626  filename: Reco_TrueHadTau_2016-ichep.root -> apply only to true taus
627  histname: sf_1p -> nominal 1p scale factor
628  histname: TOTAL_3p -> "total" 3p NP, recommended
629  histname: afii_1p -> "total" 3p NP, not recommended, but available
630 */
631 //______________________________________________________________________________
633 {
634  // creation of basic string for all NPs, e.g. "TAUS_TRUEHADTAU_EFF_RECO_"
635  std::vector<std::string> vSplitInputFilePath = {};
636  split(m_sInputFileName,'_',vSplitInputFilePath);
637  std::string sEfficiencyType = vSplitInputFilePath.at(0);
638  std::string sTruthType = vSplitInputFilePath.at(1);
639  std::transform(sEfficiencyType.begin(), sEfficiencyType.end(), sEfficiencyType.begin(), toupper);
640  std::transform(sTruthType.begin(), sTruthType.end(), sTruthType.begin(), toupper);
641  std::string sSystematicBaseString = "TAUS_"+sTruthType+"_EFF_"+sEfficiencyType+"_";
642 
643  // set truth type to check for in truth matching
644  if (sTruthType=="TRUEHADTAU") m_eCheckTruth = TauAnalysisTools::TruthHadronicTau;
645  else if (sTruthType=="TRUEELECTRON") m_eCheckTruth = TauAnalysisTools::TruthElectron;
646  else if (sTruthType=="TRUEMUON") m_eCheckTruth = TauAnalysisTools::TruthMuon;
647  else if (sTruthType=="TRUEJET") m_eCheckTruth = TauAnalysisTools::TruthJet;
648  else if (sTruthType=="TRUEHADDITAU") m_eCheckTruth = TauAnalysisTools::TruthHadronicDiTau;
649  // 3p eVeto, still need this to be measurable in T&P
650  if (sEfficiencyType=="ELERNN" || sEfficiencyType=="ELEOLR") m_bNoMultiprong = true;
651 
652  for (auto mSF : *m_mSF)
653  {
654  // parse for nuisance parameter in histogram name
655  std::vector<std::string> vSplitNP = {};
656  split(mSF.first,'_',vSplitNP);
657  std::string sNP = vSplitNP.at(0);
658  std::string sNPUppercase = vSplitNP.at(0);
659 
660  // skip nominal scale factors
661  if (sNP == "sf") continue;
662 
663  // skip if 3p histogram to avoid duplications (TODO: come up with a better solution)
664  //if (mSF.first.find("_3p") != std::string::npos) continue;
665 
666  // test if NP starts with a capital letter indicating that this should be recommended
667  bool bIsRecommended = false;
668  if (isupper(sNP.at(0)) || isupper(sNP.at(1)))
669  bIsRecommended = true;
670 
671  // make sNP uppercase and build final NP entry name
672  std::transform(sNPUppercase.begin(), sNPUppercase.end(), sNPUppercase.begin(), toupper);
673  std::string sSystematicString = sSystematicBaseString+sNPUppercase;
674 
675  // add all found systematics to the AffectingSystematics
677  m_sAffectingSystematics.insert(CP::SystematicVariation (sSystematicString, -1));
678  // only add found uppercase systematics to the RecommendedSystematics
679  if (bIsRecommended)
680  {
683  }
684 
685  ATH_MSG_DEBUG("connected base name " << sNP << " with systematic " <<sSystematicString);
686  m_mSystematicsHistNames.insert({sSystematicString,sNP});
687  }
688 }
689 
690 /*
691  return value from the tuple map object based on the pt/eta values (or the
692  corresponding value in case of configuration)
693 */
694 //______________________________________________________________________________
696  const xAOD::TauJet& xTau,
697  double& dEfficiencyScaleFactor) const
698 {
699  const tSFMAP& mSF = *m_mSF;
700  auto it = mSF.find (sHistName);
701  if (it == mSF.end())
702  {
703  ATH_MSG_ERROR("Object with name "<<sHistName<<" was not found in input file.");
704  ATH_MSG_DEBUG("Content of input file");
705  for (auto eEntry : mSF)
706  ATH_MSG_DEBUG(" Entry: "<<eEntry.first);
708  }
709 
710  // get a tuple (TObject*,functionPointer) from the scale factor map
711  tTupleObjectFunc tTuple = it->second;
712 
713  // get pt and eta (for x and y axis respectively)
714  double dPt = m_fX(xTau);
715  double dEta = m_fY(xTau);
716 
717  double dVars[2] = {dPt, dEta};
718 
719  // finally obtain efficiency scale factor from TH1F/TH1D/TF1, by calling the
720  // function pointer stored in the tuple from the scale factor map
721  return (std::get<1>(tTuple))(std::get<0>(tTuple), dEfficiencyScaleFactor, dVars);
722 }
723 
724 /*
725  find the particular value in TH1 depending on pt (or the
726  corresponding value in case of configuration)
727  Note: In case values are outside of bin ranges, the closest bin value is used
728 */
729 //______________________________________________________________________________
731  double& dEfficiencyScaleFactor, double dVars[])
732 {
733  double dPt = dVars[0];
734 
735  const TH1* hHist = dynamic_cast<const TH1*>(oObject);
736 
737  if (!hHist)
738  {
739  // ATH_MSG_ERROR("Problem with casting TObject of type "<<oObject->ClassName()<<" to TH2F");
741  }
742 
743  // protect values from underflow bins
744  dPt = std::max(dPt,hHist->GetXaxis()->GetXmin());
745  // protect values from overflow bins (times .999 to keep it inside last bin)
746  dPt = std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
747 
748  // get bin from TH2 depending on x and y values; finally set the scale factor
749  int iBin = hHist->FindFixBin(dPt);
750  dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
751  return CP::CorrectionCode::Ok;
752 }
753 
754 /*
755  find the particular value in TH2 depending on pt and eta (or the
756  corresponding value in case of configuration)
757  Note: In case values are outside of bin ranges, the closest bin value is used
758 */
759 //______________________________________________________________________________
761  double& dEfficiencyScaleFactor, double dVars[])
762 {
763  double dPt = dVars[0];
764  double dEta = dVars[1];
765 
766  const TH2* hHist = dynamic_cast<const TH2*>(oObject);
767 
768  if (!hHist)
769  {
770  // ATH_MSG_ERROR("Problem with casting TObject of type "<<oObject->ClassName()<<" to TH2F");
772  }
773 
774  // protect values from underflow bins
775  dPt = std::max(dPt,hHist->GetXaxis()->GetXmin());
776  dEta = std::max(dEta,hHist->GetYaxis()->GetXmin());
777  // protect values from overflow bins (times .999 to keep it inside last bin)
778  dPt = std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
779  dEta = std::min(dEta,hHist->GetYaxis()->GetXmax() * .999);
780 
781  // get bin from TH2 depending on x and y values; finally set the scale factor
782  int iBin = hHist->FindFixBin(dPt,dEta);
783  dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
784  return CP::CorrectionCode::Ok;
785 }
786 
787 /*
788  find the particular value in TH3 depending on x, y, z
789  Note: In case values are outside of bin ranges, the closest bin value is used
790 */
791 //______________________________________________________________________________
793  double& dEfficiencyScaleFactor, double dVars[])
794 {
795  double dX = dVars[0];
796  double dY = dVars[1];
797  double dZ = dVars[2];
798 
799  const TH3* hHist = dynamic_cast<const TH3*>(oObject);
800 
801  if (!hHist)
802  {
803  // ATH_MSG_ERROR("Problem with casting TObject of type "<<oObject->ClassName()<<" to TH2D");
805  }
806 
807  // protect values from underflow bins
808  dX = std::max(dX,hHist->GetXaxis()->GetXmin());
809  dY = std::max(dY,hHist->GetYaxis()->GetXmin());
810  dZ = std::max(dZ,hHist->GetZaxis()->GetXmin());
811  // protect values from overflow bins (times .999 to keep it inside last bin)
812  dX = std::min(dX,hHist->GetXaxis()->GetXmax() * .999);
813  dY = std::min(dY,hHist->GetYaxis()->GetXmax() * .999);
814  dZ = std::min(dZ,hHist->GetZaxis()->GetXmax() * .999);
815 
816  // get bin from TH2 depending on x and y values; finally set the scale factor
817  int iBin = hHist->FindFixBin(dX,dY,dZ);
818  dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
819  return CP::CorrectionCode::Ok;
820 }
821 
822 /*
823  Find the particular value in TF1 depending on pt and eta (or the corresponding
824  value in case of configuration)
825 */
826 //______________________________________________________________________________
828  double& dEfficiencyScaleFactor, double dVars[])
829 {
830  double dPt = dVars[0];
831  double dEta = dVars[1];
832 
833  const TF1* fFunc = static_cast<const TF1*>(oObject);
834 
835  if (!fFunc)
836  {
837  // ATH_MSG_ERROR("Problem with casting TObject of type "<<oObject->ClassName()<<" to TF1");
839  }
840 
841  // evaluate TFunction and set scale factor
842  dEfficiencyScaleFactor = fFunc->Eval(dPt, dEta);
843  return CP::CorrectionCode::Ok;
844 }
xAOD::TauJetParameters::Mode_1p0n
@ Mode_1p0n
Definition: TauDefs.h:386
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
xAOD::TauJetParameters::PanTau_DecayMode
@ PanTau_DecayMode
Definition: TauDefs.h:360
TauAnalysisTools::TruthElectron
@ TruthElectron
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:100
TauAnalysisTools::CommonEfficiencyTool::m_sMCCampaign
std::string m_sMCCampaign
Definition: CommonEfficiencyTool.h:156
TauAnalysisTools::CommonEfficiencyTool::m_eCheckTruth
TruthMatchedParticleType m_eCheckTruth
Definition: CommonEfficiencyTool.h:150
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TauAnalysisTools::CommonEfficiencyTool::ReadInputs
void ReadInputs(const TFile &fFile)
Definition: CommonEfficiencyTool.cxx:470
xAOD::TauJetParameters::Mode_1p1n
@ Mode_1p1n
Definition: TauDefs.h:387
TauAnalysisTools::CommonEfficiencyTool::m_bSplitMCCampaign
bool m_bSplitMCCampaign
Definition: CommonEfficiencyTool.h:155
max
#define max(a, b)
Definition: cfImp.cxx:41
TauAnalysisTools::truthTauAbsEta
double truthTauAbsEta(const xAOD::TauJet &xTau)
return truth match tau eta (if hadronic truth tau match)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:172
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TauAnalysisTools::CommonEfficiencyTool::getEfficiencyScaleFactor
virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::TauJet &tau, double &dEfficiencyScaleFactor, unsigned int iRunNumber=0, unsigned int iMu=0)
Declare the interface that the class provides.
Definition: CommonEfficiencyTool.cxx:158
TauAnalysisTools::CommonEfficiencyTool::m_bSkipTruthMatchCheck
bool m_bSkipTruthMatchCheck
Definition: CommonEfficiencyTool.h:143
TauAnalysisTools::TruthHadronicTau
@ TruthHadronicTau
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:97
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TauAnalysisTools::truthTauPt
double truthTauPt(const xAOD::TauJet &xTau)
return truth match tau pt in GeV (if hadronic truth tau match)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:158
TauAnalysisTools::CommonEfficiencyTool::m_sSystematicSet
const CP::SystematicSet * m_sSystematicSet
Definition: CommonEfficiencyTool.h:100
CP::SystematicSet::empty
bool empty() const
returns: whether the set is empty
Definition: SystematicSet.h:67
TruthParticleContainer.h
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:526
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TauAnalysisTools::CommonEfficiencyTool::ConvertProngToString
std::string ConvertProngToString(const int iProngness) const
Definition: CommonEfficiencyTool.cxx:397
asg
Definition: DataHandleTestTool.h:28
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
TauAnalysisTools::CommonEfficiencyTool::tSFMAP
std::map< std::string, tTupleObjectFunc > tSFMAP
Definition: CommonEfficiencyTool.h:89
CP::SystematicSet::name
std::string name() const
returns: the systematics joined into a single string.
Definition: SystematicSet.cxx:278
TauAnalysisTools::CommonEfficiencyTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const CP::SystematicSet &sSystematicSet)
configure this tool for the given list of systematic variations.
Definition: CommonEfficiencyTool.cxx:346
TauAnalysisTools::CommonEfficiencyTool::m_sVarName
std::string m_sVarName
Definition: CommonEfficiencyTool.h:141
xAOD::TauJet_v3::panTauDetail
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
Definition: TauJet_v3.cxx:367
TauAnalysisTools::finalTauPt
double finalTauPt(const xAOD::TauJet &xTau)
return MVA based tau pt in GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:113
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TauAnalysisTools::TruthJet
@ TruthJet
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:101
CP::SystematicVariation
Definition: SystematicVariation.h:47
TauAnalysisTools::Unknown
@ Unknown
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:96
TauAnalysisTools::CommonEfficiencyTool::getValueTH3
static CP::CorrectionCode getValueTH3(const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
Definition: CommonEfficiencyTool.cxx:792
TauAnalysisTools::JETIDNONE
@ JETIDNONE
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:14
TauAnalysisTools::CommonEfficiencyTool::tTupleObjectFunc
std::tuple< TObject *, CP::CorrectionCode(*)(const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[]) > tTupleObjectFunc
Definition: CommonEfficiencyTool.h:88
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
TauAnalysisTools::CommonEfficiencyTool::isAffectedBySystematic
virtual bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const
returns: whether this tool is affected by the given systematics
Definition: CommonEfficiencyTool.cxx:310
xAOD::TauJetParameters::Mode_1pXn
@ Mode_1pXn
Definition: TauDefs.h:388
TauAnalysisTools::CommonEfficiencyTool::~CommonEfficiencyTool
~CommonEfficiencyTool()
Definition: CommonEfficiencyTool.cxx:102
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TauAnalysisTools::CommonEfficiencyTool::m_mSystematicSets
std::unordered_map< CP::SystematicSet, std::string > m_mSystematicSets
Definition: CommonEfficiencyTool.h:99
TauAnalysisTools::finalTauP
double finalTauP(const xAOD::TauJet &xTau)
return MVA based tau P in GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:134
TauAnalysisTools::CommonEfficiencyTool::getValue
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
Definition: CommonEfficiencyTool.cxx:695
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
TauAnalysisTools::truthDecayMode
double truthDecayMode(const xAOD::TauJet &xTau)
return truth decay mode (if hadronic truth tau match)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:186
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:58
TauEfficiencyCorrectionsTool.h
TauAnalysisTools::ELEIDNONE
@ ELEIDNONE
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:32
TauAnalysisTools::CommonEfficiencyTool::recommendedSystematics
virtual CP::SystematicSet recommendedSystematics() const
returns: the list of all systematics this tool recommends to use
Definition: CommonEfficiencyTool.cxx:330
TauAnalysisTools::CommonEfficiencyTool::m_sWP
std::string m_sWP
Definition: CommonEfficiencyTool.h:140
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TauAnalysisTools::CommonEfficiencyTool::m_mSF
std::unique_ptr< tSFMAP > m_mSF
Definition: CommonEfficiencyTool.h:96
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
TH3
Definition: rootspy.cxx:440
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
CP::SystematicSet::end
const_iterator end() const
description: const iterator to the end of the set
Definition: SystematicSet.h:59
TauAnalysisTools::CommonEfficiencyTool::m_fX
std::function< double(const xAOD::TauJet &xTau)> m_fX
Definition: CommonEfficiencyTool.h:104
TauAnalysisTools::CommonEfficiencyTool::m_iJetIDLevel
int m_iJetIDLevel
Definition: CommonEfficiencyTool.h:147
TauAnalysisTools::CommonEfficiencyTool::m_bSFIsAvailable
bool m_bSFIsAvailable
Definition: CommonEfficiencyTool.h:152
TauAnalysisTools::CommonEfficiencyTool::getValueTH2
static CP::CorrectionCode getValueTH2(const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
Definition: CommonEfficiencyTool.cxx:760
xAOD::TauJetParameters::Mode_3p0n
@ Mode_3p0n
Definition: TauDefs.h:389
TauAnalysisTools::CommonEfficiencyTool::m_sSFHistName
std::string m_sSFHistName
Definition: CommonEfficiencyTool.h:142
min
#define min(a, b)
Definition: cfImp.cxx:40
TauAnalysisTools::TruthMuon
@ TruthMuon
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:99
TauAnalysisTools::CommonEfficiencyTool::m_sInputFilePath
std::string m_sInputFilePath
Definition: CommonEfficiencyTool.h:138
xAOD::EventInfo_v1::averageInteractionsPerCrossing
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
Definition: EventInfo_v1.cxx:397
TauAnalysisTools::CommonEfficiencyTool::generateSystematicSets
void generateSystematicSets()
Definition: CommonEfficiencyTool.cxx:632
PathResolver.h
TauAnalysisTools::CommonEfficiencyTool::m_sAffectingSystematics
CP::SystematicSet m_sAffectingSystematics
Definition: CommonEfficiencyTool.h:135
CommonEfficiencyTool.h
TauAnalysisTools::CommonEfficiencyTool::m_bUseTauSubstructure
bool m_bUseTauSubstructure
Definition: CommonEfficiencyTool.h:146
CP::SystematicSet::insert
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
Definition: SystematicSet.cxx:88
TauAnalysisTools::CommonEfficiencyTool::m_fY
std::function< double(const xAOD::TauJet &xTau)> m_fY
Definition: CommonEfficiencyTool.h:105
TauAnalysisTools::CommonEfficiencyTool::ConvertMuToString
std::string ConvertMuToString(const int iMu) const
Definition: CommonEfficiencyTool.cxx:407
TauAnalysisTools::CommonEfficiencyTool::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: CommonEfficiencyTool.cxx:116
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
TauAnalysisTools::CommonEfficiencyTool::addHistogramToSFMap
void addHistogramToSFMap(TKey *kKey, const std::string &sKeyName)
Definition: CommonEfficiencyTool.cxx:581
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
CP::SystematicSet::find
iterator find(const SystematicVariation &sys) const
description: find an element in the set
Definition: SystematicSet.h:63
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
TauAnalysisTools::finalTauAbsEta
double finalTauAbsEta(const xAOD::TauJet &xTau)
return MVA based absolute tau eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:127
TauAnalysisTools::CommonEfficiencyTool::m_bSFIsAvailableChecked
bool m_bSFIsAvailableChecked
Definition: CommonEfficiencyTool.h:153
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TauAnalysisTools::CommonEfficiencyTool::CommonEfficiencyTool
CommonEfficiencyTool(const std::string &sName)
Create a proper constructor for Athena.
Definition: CommonEfficiencyTool.cxx:74
SG::Decorator::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
TauAnalysisTools::tauLeadTrackEta
double tauLeadTrackEta(const xAOD::TauJet &xTau)
return leading charge tau track eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:141
TauAnalysisTools::CommonEfficiencyTool::ConvertDecayModeToString
std::string ConvertDecayModeToString(const int iDecayMode) const
Definition: CommonEfficiencyTool.cxx:441
TauAnalysisTools::getTruthParticleType
TruthMatchedParticleType getTruthParticleType(const xAOD::TauJet &xTau)
return TauJet match type
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:572
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
TauAnalysisTools::CommonEfficiencyTool::m_bUseHighPtUncert
bool m_bUseHighPtUncert
Definition: CommonEfficiencyTool.h:144
xAOD::TauJetParameters::Mode_3pXn
@ Mode_3pXn
Definition: TauDefs.h:390
TauAnalysisTools::CommonEfficiencyTool::GetMcCampaignString
std::string GetMcCampaignString(const int iMu) const
Definition: CommonEfficiencyTool.cxx:420
TauAnalysisTools::CommonEfficiencyTool::m_bNoMultiprong
bool m_bNoMultiprong
Definition: CommonEfficiencyTool.h:145
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:525
TauAnalysisTools::CommonEfficiencyTool::m_sInputFileName
std::string m_sInputFileName
Definition: CommonEfficiencyTool.h:139
TauAnalysisTools::CommonEfficiencyTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by
Definition: CommonEfficiencyTool.cxx:321
TauAnalysisTools::CommonEfficiencyTool::applyEfficiencyScaleFactor
virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::TauJet &xTau, unsigned int iRunNumber=0, unsigned int iMu=0)
Decorate the tau with its efficiency.
Definition: CommonEfficiencyTool.cxx:279
Decorator.h
Helper class to provide type-safe access to aux data.
TauAnalysisTools::CommonEfficiencyTool::m_bSplitMu
bool m_bSplitMu
Definition: CommonEfficiencyTool.h:154
TauAnalysisTools::CommonEfficiencyTool::m_mSystematicsHistNames
std::map< std::string, std::string > m_mSystematicsHistNames
Definition: CommonEfficiencyTool.h:102
TauAnalysisTools::CommonEfficiencyTool::getValueTH1
static CP::CorrectionCode getValueTH1(const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
Definition: CommonEfficiencyTool.cxx:730
TauAnalysisTools::TruthHadronicDiTau
@ TruthHadronicDiTau
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:102
TauAnalysisTools::CommonEfficiencyTool::getValueTF1
static CP::CorrectionCode getValueTF1(const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
Definition: CommonEfficiencyTool.cxx:827
TauAnalysisTools::CommonEfficiencyTool::m_sRecommendedSystematics
CP::SystematicSet m_sRecommendedSystematics
Definition: CommonEfficiencyTool.h:136
TauAnalysisTools::CommonEfficiencyTool::m_iEleIDLevel
int m_iEleIDLevel
Definition: CommonEfficiencyTool.h:148
TauAnalysisTools::finalTauEta
double finalTauEta(const xAOD::TauJet &xTau)
return MVA based tau eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:120
xAOD::EventInfo_v1::actualInteractionsPerCrossing
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
Definition: EventInfo_v1.cxx:380
TauAnalysisTools::split
void split(const std::string &sInput, const char cDelim, std::vector< std::string > &vOut)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:23