ATLAS Offline Software
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
TauAnalysisTools::CommonEfficiencyTool Class Referenceabstract

#include <CommonEfficiencyTool.h>

Inheritance diagram for TauAnalysisTools::CommonEfficiencyTool:
Collaboration diagram for TauAnalysisTools::CommonEfficiencyTool:

Public Member Functions

 CommonEfficiencyTool (const std::string &sName)
 Create a proper constructor for Athena. More...
 
 ~CommonEfficiencyTool ()
 
virtual StatusCode initialize ()
 Dummy implementation of the initialisation function. More...
 
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. More...
 
virtual CP::CorrectionCode applyEfficiencyScaleFactor (const xAOD::TauJet &xTau, unsigned int iRunNumber=0, unsigned int iMu=0)
 Decorate the tau with its efficiency. More...
 
virtual bool isAffectedBySystematic (const CP::SystematicVariation &systematic) const
 returns: whether this tool is affected by the given systematics More...
 
virtual CP::SystematicSet affectingSystematics () const
 returns: the list of all systematics this tool can be affected by More...
 
virtual CP::SystematicSet recommendedSystematics () const
 returns: the list of all systematics this tool recommends to use More...
 
virtual StatusCode applySystematicVariation (const CP::SystematicSet &sSystematicSet)
 configure this tool for the given list of systematic variations. More...
 
virtual bool isSupportedRunNumber (int) const
 check if run number is supported in recommendations More...
 
virtual void print () const =0
 Print the state of the tool. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Types

typedef std::tuple< TObject *, CP::CorrectionCode(*)(const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[]) > tTupleObjectFunc
 
typedef std::map< std::string, tTupleObjectFunctSFMAP
 

Protected Member Functions

std::string ConvertProngToString (const int iProngness) const
 
std::string ConvertMuToString (const int iMu) const
 
std::string GetMcCampaignString (const int iMu) const
 
std::string ConvertDecayModeToString (const int iDecayMode) const
 
void ReadInputs (const TFile &fFile)
 
void addHistogramToSFMap (TKey *kKey, const std::string &sKeyName)
 
virtual CP::CorrectionCode getValue (const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
 
void generateSystematicSets ()
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Static Protected Member Functions

static CP::CorrectionCode getValueTH1 (const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
 
static CP::CorrectionCode getValueTH2 (const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
 
static CP::CorrectionCode getValueTH3 (const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
 
static CP::CorrectionCode getValueTF1 (const TObject *oObject, double &dEfficiencyScaleFactor, double dVars[])
 

Protected Attributes

std::unique_ptr< tSFMAPm_mSF
 
std::unordered_map< CP::SystematicSet, std::string > m_mSystematicSets
 
const CP::SystematicSetm_sSystematicSet
 
std::map< std::string, int > m_mSystematics
 
std::map< std::string, std::string > m_mSystematicsHistNames
 
std::function< double(const xAOD::TauJet &xTau)> m_fX
 
std::function< double(const xAOD::TauJet &xTau)> m_fY
 
CP::SystematicSet m_sAffectingSystematics
 
CP::SystematicSet m_sRecommendedSystematics
 
std::string m_sInputFilePath
 
std::string m_sInputFileName
 
std::string m_sWP
 
std::string m_sVarName
 
std::string m_sSFHistName
 
bool m_bSkipTruthMatchCheck
 
bool m_bUseHighPtUncert
 
bool m_bNoMultiprong
 
bool m_bUseTauSubstructure
 
int m_iJetIDLevel
 
int m_iEleIDLevel
 
TruthMatchedParticleType m_eCheckTruth
 
bool m_bSFIsAvailable
 
bool m_bSFIsAvailableChecked
 
bool m_bSplitMu
 
bool m_bSplitMCCampaign
 
std::string m_sMCCampaign
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 36 of file CommonEfficiencyTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ tSFMAP

typedef std::map<std::string, tTupleObjectFunc > TauAnalysisTools::CommonEfficiencyTool::tSFMAP
protected

Definition at line 89 of file CommonEfficiencyTool.h.

◆ tTupleObjectFunc

typedef std::tuple<TObject*, CP::CorrectionCode (*)(const TObject* oObject, double& dEfficiencyScaleFactor, double dVars[] ) > TauAnalysisTools::CommonEfficiencyTool::tTupleObjectFunc
protected

Definition at line 88 of file CommonEfficiencyTool.h.

Constructor & Destructor Documentation

◆ CommonEfficiencyTool()

CommonEfficiencyTool::CommonEfficiencyTool ( const std::string &  sName)

Create a proper constructor for Athena.

Definition at line 74 of file CommonEfficiencyTool.cxx.

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)
83  , m_bSFIsAvailable(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 }

◆ ~CommonEfficiencyTool()

CommonEfficiencyTool::~CommonEfficiencyTool ( )

Definition at line 102 of file CommonEfficiencyTool.cxx.

103 {
104  if (m_mSF)
105  for (auto mEntry : *m_mSF)
106  delete std::get<0>(mEntry.second);
107 }

Member Function Documentation

◆ addHistogramToSFMap()

void CommonEfficiencyTool::addHistogramToSFMap ( TKey *  kKey,
const std::string &  sKeyName 
)
protected

Definition at line 581 of file CommonEfficiencyTool.cxx.

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 }

◆ affectingSystematics()

CP::SystematicSet CommonEfficiencyTool::affectingSystematics ( ) const
virtual

returns: the list of all systematics this tool can be affected by

Implements CP::IReentrantSystematicsTool.

Definition at line 321 of file CommonEfficiencyTool.cxx.

322 {
324 }

◆ applyEfficiencyScaleFactor()

CP::CorrectionCode CommonEfficiencyTool::applyEfficiencyScaleFactor ( const xAOD::TauJet xTau,
unsigned int  iRunNumber = 0,
unsigned int  iMu = 0 
)
virtual

Decorate the tau with its efficiency.

Implements TauAnalysisTools::ITauEfficiencyCorrectionsTool.

Definition at line 279 of file CommonEfficiencyTool.cxx.

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 }

◆ applySystematicVariation()

StatusCode CommonEfficiencyTool::applySystematicVariation ( const CP::SystematicSet sSystematicSet)
virtual

configure this tool for the given list of systematic variations.

any requested systematics that are not affecting this tool will be silently ignored

Implements CP::ISystematicsTool.

Reimplemented in TauAnalysisTools::TauEfficiencyTriggerTool.

Definition at line 346 of file CommonEfficiencyTool.cxx.

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 }

◆ ConvertDecayModeToString()

std::string CommonEfficiencyTool::ConvertDecayModeToString ( const int  iDecayMode) const
protected

Definition at line 441 of file CommonEfficiencyTool.cxx.

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 }

◆ ConvertMuToString()

std::string CommonEfficiencyTool::ConvertMuToString ( const int  iMu) const
protected

Definition at line 407 of file CommonEfficiencyTool.cxx.

408 {
409  if (iMu > 35 )
410  return "_highMu";
411 
412  return "_lowMu";
413 }

◆ ConvertProngToString()

std::string CommonEfficiencyTool::ConvertProngToString ( const int  iProngness) const
protected

Definition at line 397 of file CommonEfficiencyTool.cxx.

398 {
399  return fProngness == 1 ? "_1p" : "_3p";
400 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ generateSystematicSets()

void CommonEfficiencyTool::generateSystematicSets ( )
protected

Definition at line 632 of file CommonEfficiencyTool.cxx.

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 }

◆ getEfficiencyScaleFactor()

CP::CorrectionCode CommonEfficiencyTool::getEfficiencyScaleFactor ( const xAOD::TauJet xTau,
double &  eff,
unsigned int  iRunNumber = 0,
unsigned int  iMu = 0 
)
virtual

Declare the interface that the class provides.

Get the tau efficiency scale factor

Implements TauAnalysisTools::ITauEfficiencyCorrectionsTool.

Reimplemented in TauAnalysisTools::TauEfficiencyTriggerTool.

Definition at line 158 of file CommonEfficiencyTool.cxx.

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 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ GetMcCampaignString()

std::string CommonEfficiencyTool::GetMcCampaignString ( const int  iMu) const
protected

Definition at line 420 of file CommonEfficiencyTool.cxx.

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 }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getValue()

CP::CorrectionCode CommonEfficiencyTool::getValue ( const std::string &  sHistName,
const xAOD::TauJet xTau,
double &  dEfficiencyScaleFactor 
) const
protectedvirtual

Definition at line 695 of file CommonEfficiencyTool.cxx.

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 }

◆ getValueTF1()

CP::CorrectionCode CommonEfficiencyTool::getValueTF1 ( const TObject *  oObject,
double &  dEfficiencyScaleFactor,
double  dVars[] 
)
staticprotected

Definition at line 827 of file CommonEfficiencyTool.cxx.

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 }

◆ getValueTH1()

CP::CorrectionCode CommonEfficiencyTool::getValueTH1 ( const TObject *  oObject,
double &  dEfficiencyScaleFactor,
double  dVars[] 
)
staticprotected

Definition at line 730 of file CommonEfficiencyTool.cxx.

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 }

◆ getValueTH2()

CP::CorrectionCode CommonEfficiencyTool::getValueTH2 ( const TObject *  oObject,
double &  dEfficiencyScaleFactor,
double  dVars[] 
)
staticprotected

Definition at line 760 of file CommonEfficiencyTool.cxx.

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 }

◆ getValueTH3()

CP::CorrectionCode CommonEfficiencyTool::getValueTH3 ( const TObject *  oObject,
double &  dEfficiencyScaleFactor,
double  dVars[] 
)
staticprotected

Definition at line 792 of file CommonEfficiencyTool.cxx.

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 }

◆ initialize()

StatusCode CommonEfficiencyTool::initialize ( )
virtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Reimplemented in TauAnalysisTools::CommonDiTauEfficiencyTool.

Definition at line 116 of file CommonEfficiencyTool.cxx.

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 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isAffectedBySystematic()

bool CommonEfficiencyTool::isAffectedBySystematic ( const CP::SystematicVariation systematic) const
virtual

returns: whether this tool is affected by the given systematics

Implements CP::ISystematicsTool.

Definition at line 310 of file CommonEfficiencyTool.cxx.

311 {
313  return sys.find(systematic) != sys.end();
314 }

◆ isSupportedRunNumber()

virtual bool TauAnalysisTools::CommonEfficiencyTool::isSupportedRunNumber ( int  iRunNumber) const
inlinevirtual

check if run number is supported in recommendations

Implements TauAnalysisTools::ITauEfficiencyCorrectionsTool.

Reimplemented in TauAnalysisTools::TauEfficiencyTriggerTool.

Definition at line 73 of file CommonEfficiencyTool.h.

74  {
75  return true;
76  };

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print() [1/2]

void asg::AsgTool::print ( ) const
virtualinherited

◆ print() [2/2]

virtual void asg::IAsgTool::print ( ) const
pure virtualinherited

◆ ReadInputs()

void CommonEfficiencyTool::ReadInputs ( const TFile &  fFile)
protected

Definition at line 470 of file CommonEfficiencyTool.cxx.

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 }

◆ recommendedSystematics()

CP::SystematicSet CommonEfficiencyTool::recommendedSystematics ( ) const
virtual

returns: the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

Definition at line 330 of file CommonEfficiencyTool.cxx.

331 {
333 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_bNoMultiprong

bool TauAnalysisTools::CommonEfficiencyTool::m_bNoMultiprong
protected

Definition at line 145 of file CommonEfficiencyTool.h.

◆ m_bSFIsAvailable

bool TauAnalysisTools::CommonEfficiencyTool::m_bSFIsAvailable
protected

Definition at line 152 of file CommonEfficiencyTool.h.

◆ m_bSFIsAvailableChecked

bool TauAnalysisTools::CommonEfficiencyTool::m_bSFIsAvailableChecked
protected

Definition at line 153 of file CommonEfficiencyTool.h.

◆ m_bSkipTruthMatchCheck

bool TauAnalysisTools::CommonEfficiencyTool::m_bSkipTruthMatchCheck
protected

Definition at line 143 of file CommonEfficiencyTool.h.

◆ m_bSplitMCCampaign

bool TauAnalysisTools::CommonEfficiencyTool::m_bSplitMCCampaign
protected

Definition at line 155 of file CommonEfficiencyTool.h.

◆ m_bSplitMu

bool TauAnalysisTools::CommonEfficiencyTool::m_bSplitMu
protected

Definition at line 154 of file CommonEfficiencyTool.h.

◆ m_bUseHighPtUncert

bool TauAnalysisTools::CommonEfficiencyTool::m_bUseHighPtUncert
protected

Definition at line 144 of file CommonEfficiencyTool.h.

◆ m_bUseTauSubstructure

bool TauAnalysisTools::CommonEfficiencyTool::m_bUseTauSubstructure
protected

Definition at line 146 of file CommonEfficiencyTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eCheckTruth

TruthMatchedParticleType TauAnalysisTools::CommonEfficiencyTool::m_eCheckTruth
protected

Definition at line 150 of file CommonEfficiencyTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fX

std::function<double(const xAOD::TauJet& xTau)> TauAnalysisTools::CommonEfficiencyTool::m_fX
protected

Definition at line 104 of file CommonEfficiencyTool.h.

◆ m_fY

std::function<double(const xAOD::TauJet& xTau)> TauAnalysisTools::CommonEfficiencyTool::m_fY
protected

Definition at line 105 of file CommonEfficiencyTool.h.

◆ m_iEleIDLevel

int TauAnalysisTools::CommonEfficiencyTool::m_iEleIDLevel
protected

Definition at line 148 of file CommonEfficiencyTool.h.

◆ m_iJetIDLevel

int TauAnalysisTools::CommonEfficiencyTool::m_iJetIDLevel
protected

Definition at line 147 of file CommonEfficiencyTool.h.

◆ m_mSF

std::unique_ptr< tSFMAP > TauAnalysisTools::CommonEfficiencyTool::m_mSF
protected

Definition at line 96 of file CommonEfficiencyTool.h.

◆ m_mSystematics

std::map<std::string, int> TauAnalysisTools::CommonEfficiencyTool::m_mSystematics
protected

Definition at line 101 of file CommonEfficiencyTool.h.

◆ m_mSystematicSets

std::unordered_map< CP::SystematicSet, std::string > TauAnalysisTools::CommonEfficiencyTool::m_mSystematicSets
protected

Definition at line 99 of file CommonEfficiencyTool.h.

◆ m_mSystematicsHistNames

std::map<std::string, std::string> TauAnalysisTools::CommonEfficiencyTool::m_mSystematicsHistNames
protected

Definition at line 102 of file CommonEfficiencyTool.h.

◆ m_sAffectingSystematics

CP::SystematicSet TauAnalysisTools::CommonEfficiencyTool::m_sAffectingSystematics
protected

Definition at line 135 of file CommonEfficiencyTool.h.

◆ m_sInputFileName

std::string TauAnalysisTools::CommonEfficiencyTool::m_sInputFileName
protected

Definition at line 139 of file CommonEfficiencyTool.h.

◆ m_sInputFilePath

std::string TauAnalysisTools::CommonEfficiencyTool::m_sInputFilePath
protected

Definition at line 138 of file CommonEfficiencyTool.h.

◆ m_sMCCampaign

std::string TauAnalysisTools::CommonEfficiencyTool::m_sMCCampaign
protected

Definition at line 156 of file CommonEfficiencyTool.h.

◆ m_sRecommendedSystematics

CP::SystematicSet TauAnalysisTools::CommonEfficiencyTool::m_sRecommendedSystematics
protected

Definition at line 136 of file CommonEfficiencyTool.h.

◆ m_sSFHistName

std::string TauAnalysisTools::CommonEfficiencyTool::m_sSFHistName
protected

Definition at line 142 of file CommonEfficiencyTool.h.

◆ m_sSystematicSet

const CP::SystematicSet* TauAnalysisTools::CommonEfficiencyTool::m_sSystematicSet
protected

Definition at line 100 of file CommonEfficiencyTool.h.

◆ m_sVarName

std::string TauAnalysisTools::CommonEfficiencyTool::m_sVarName
protected

Definition at line 141 of file CommonEfficiencyTool.h.

◆ m_sWP

std::string TauAnalysisTools::CommonEfficiencyTool::m_sWP
protected

Definition at line 140 of file CommonEfficiencyTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::TauJetParameters::Mode_1p0n
@ Mode_1p0n
Definition: TauDefs.h:386
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
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
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
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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
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
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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.
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
xAOD::TauJetParameters::Mode_1pXn
@ Mode_1pXn
Definition: TauDefs.h:388
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
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
AthCommonDataStore
Definition: AthCommonDataStore.h:52
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
TauAnalysisTools::ELEIDNONE
@ ELEIDNONE
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:32
TauAnalysisTools::CommonEfficiencyTool::m_sWP
std::string m_sWP
Definition: CommonEfficiencyTool.h:140
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
python.xAODType.dummy
dummy
Definition: xAODType.py:4
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
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
TauAnalysisTools::CommonEfficiencyTool::m_sAffectingSystematics
CP::SystematicSet m_sAffectingSystematics
Definition: CommonEfficiencyTool.h:135
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
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
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
a
TList * a
Definition: liststreamerinfos.cxx:10
h
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::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
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
TauAnalysisTools::CommonEfficiencyTool::m_bUseHighPtUncert
bool m_bUseHighPtUncert
Definition: CommonEfficiencyTool.h:144
xAOD::TauJetParameters::Mode_3pXn
@ Mode_3pXn
Definition: TauDefs.h:390
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
TauAnalysisTools::CommonEfficiencyTool::GetMcCampaignString
std::string GetMcCampaignString(const int iMu) const
Definition: CommonEfficiencyTool.cxx:420
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
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
SG::DataProxy
Definition: DataProxy.h:44
TauAnalysisTools::CommonEfficiencyTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by
Definition: CommonEfficiencyTool.cxx:321
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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
fitman.k
k
Definition: fitman.py:528
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