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

#include <CommonDiTauSmearingTool.h>

Inheritance diagram for TauAnalysisTools::CommonDiTauSmearingTool:
Collaboration diagram for TauAnalysisTools::CommonDiTauSmearingTool:

Public Member Functions

 CommonDiTauSmearingTool (const std::string &sName)
 Create a proper constructor for Athena. More...
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual CP::CorrectionCode applyCorrection (xAOD::DiTauJet &xDiTau) override
 Declare the interface that the class provides. More...
 
virtual CP::CorrectionCode correctedCopy (const xAOD::DiTauJet &xDiTau, xAOD::DiTauJet *&xDiTauCopy) override
 Create a corrected copy from a constant ditau. More...
 
virtual CP::CorrectionCode applyCorrection (xAOD::TauJet &xTau) const
 Apply the correction on a modifiable object. More...
 
virtual CP::CorrectionCode correctedCopy (const xAOD::TauJet &xTau, xAOD::TauJet *&xTauCopy) const
 Create a corrected copy from a constant ditau. More...
 
virtual CP::CorrectionCode applyCorrection (xAOD::TauJet &xTau) const
 Apply the correction on a modifyable object. More...
 
virtual CP::CorrectionCode correctedCopy (const xAOD::TauJet &xTau, xAOD::TauJet *&xTauCopy) const
 Create a corrected copy from a constant tau. 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 void print () const =0
 Print the state of the tool. More...
 
virtual void print () const
 Print the state of the tool. More...
 
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena. 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 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, V, H > &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 Member Functions

template<class T >
void ReadInputs (TFile *fFile, std::map< std::string, T > &mMap)
 
virtual CP::CorrectionCode getValue (const std::string &sHistName, const xAOD::DiTauJet &xDiTau, double &dCorrectionFactor) const
 
void generateSystematicSets ()
 
virtual CP::CorrectionCode getValue (const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
 
std::string ConvertProngToString (const int iProngness) const
 
virtual CP::CorrectionCode getValue (const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
 
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...
 

Protected Attributes

std::map< std::string, TH3 * > m_mDTSF
 
double(* m_fX )(const xAOD::DiTauJet &xDiTau)
 
double(* m_fY )(const xAOD::DiTauJet &xDiTau)
 
double(* m_fZ )(const xAOD::DiTauJet &xDiTau)
 
std::map< std::string, TH1 * > m_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
 
Gaudi::Property< std::string > m_sInputFilePath {this, "InputFilePath", ""}
 
Gaudi::Property< bool > m_bSkipTruthMatchCheck {this, "SkipTruthMatchCheck", false}
 
Gaudi::Property< bool > m_bApplyFading {this, "ApplyFading", true}
 
Gaudi::Property< bool > m_bMVATESQualityCheck {this, "MVATESQualityCheck", true}
 
Gaudi::Property< bool > m_bApplyInsituCorrection {this, "ApplyInsituCorrection", true}
 
bool m_bIsData
 
bool m_bIsConfigured
 
asg::AnaToolHandle< ITauToolBasem_tTauCombinedTES
 
TruthMatchedParticleType m_eCheckTruth
 
CP::SystematicSet m_sAffectingSystematics
 
CP::SystematicSet m_sRecommendedSystematics
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual StatusCode beginEvent ()
 Function called when a new events is loaded. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

MetaStore_t m_inputMetaStore
 Object accessing the input metadata store. More...
 
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store. More...
 
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file. More...
 
bool m_useIncidents
 
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
 

Callback functions helping in metadata reading/writing

void setUseIncidents (const bool flag)
 
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent. More...
 
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened. More...
 
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed. More...
 
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata. More...
 

Detailed Description

Definition at line 34 of file CommonDiTauSmearingTool.h.

Member Typedef Documentation

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CommonDiTauSmearingTool()

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

Create a proper constructor for Athena.

Definition at line 21 of file CommonDiTauSmearingTool.cxx.

22  : CommonSmearingTool( sName )
23  , m_fX(&TruthLeadPt)
25  , m_fZ(&TruthDeltaR)
26 {}

Member Function Documentation

◆ affectingSystematics()

CP::SystematicSet CommonSmearingTool::affectingSystematics ( ) const
virtualinherited

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

Implements CP::IReentrantSystematicsTool.

Definition at line 274 of file CommonSmearingTool.cxx.

275 {
277 }

◆ applyCorrection() [1/3]

CP::CorrectionCode CommonDiTauSmearingTool::applyCorrection ( xAOD::DiTauJet xDiTau)
overridevirtual

Declare the interface that the class provides.

Apply the correction on a modifiable object

Implements TauAnalysisTools::IDiTauSmearingTool.

Definition at line 66 of file CommonDiTauSmearingTool.cxx.

67 {
68  // step out here if we run on data
69  if (m_bIsData)
71 
72  // check which true state is requested
74  {
76  }
77 
78  double dCorrection = 1.;
79  // get standard scale factor
80  CP::CorrectionCode tmpCorrectionCode = getValue("sf",
81  xDiTau,
82  dCorrection);
83  // return correction code if histogram is not available
84  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
85  return tmpCorrectionCode;
86 
87  // skip further process if systematic set is empty
88  if (m_sSystematicSet->size() > 0)
89  {
90  // get uncertainties summed in quadrature
91  double dTotalSystematic2 = 0;
92  double dDirection = 0;
93  for (auto syst : *m_sSystematicSet)
94  {
95  // check if systematic is available
96  auto it = m_mSystematicsHistNames.find(syst.basename());
97 
98  // get uncertainty value
99  double dUncertaintySyst = 0;
100  tmpCorrectionCode = getValue(it->second,
101  xDiTau,
102  dUncertaintySyst);
103 
104  // return correction code if histogram is not available
105  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
106  return tmpCorrectionCode;
107 
108  // needed for up/down decision
109  dDirection = syst.parameter();
110 
111  // scale uncertainty with direction, i.e. +/- n*sigma
112  dUncertaintySyst *= dDirection;
113 
114  // square uncertainty and add to total uncertainty
115  dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
116  }
117 
118  // now use dDirection to use up/down uncertainty
119  dDirection = (dDirection > 0) ? +1 : -1;
120 
121  // finally apply uncertainty (eff * ( 1 +/- \sum )
122  dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
123  }
124 
125  // finally apply correction
126  xDiTau.setP4( xDiTau.pt() * dCorrection,
127  xDiTau.eta(), xDiTau.phi(), xDiTau.m());
128  return CP::CorrectionCode::Ok;
129 }

◆ applyCorrection() [2/3]

CP::CorrectionCode CommonSmearingTool::applyCorrection

Apply the correction on a modifiable object.

Definition at line 60 of file CommonSmearingTool.cxx.

143 {
144  // optional consistency check between calo-only pt ("ptTauEnergyScale") and MVA pt ("ptFinalCalib" i.e. "pt", MVA TES is the default calibration)
145  // not recommended until validated in R22: MVA TES always has better resolution than calo-only TES for true taus
146  // in practice this check mostly discards muons faking taus with large track momentum but little energy deposit in the calorimeter:
147  // when enforcing calo-only pt, the muon will likely fail the tau pt cut applied by TauSelectionTool
148 
149  if (m_bMVATESQualityCheck) {
150  bool compatibility = true;
151  static const SG::ConstAccessor<float> accPtTauEnergyScale ("ptTauEnergyScale");
152  if(accPtTauEnergyScale.isAvailable(xTau)) {
153  const auto combinedTEStool = dynamic_cast<const TauCombinedTES*>(m_tTauCombinedTES.get());
154  compatibility = combinedTEStool->getTESCompatibility(xTau);
155  }
156  static const SG::Accessor<char> accTESCompatibility("TESCompatibility");
157  accTESCompatibility(xTau) = char(compatibility);
158  }
159 
160  // step out here if we run on data
161  if (m_bIsData)
162  return CP::CorrectionCode::Ok;
163 
164  // check which true state is requested
166  return CP::CorrectionCode::Ok;
167  }
168 
169  // skip taus which are not 1 or 3 prong
170  if( xTau.nTracks() != 1 && xTau.nTracks() != 3) {
171  return CP::CorrectionCode::Ok;
172  }
173 
174  // get prong extension for histogram name
175  std::string sProng = ConvertProngToString(xTau.nTracks());
176 
177  double dCorrection = 1.;
178  CP::CorrectionCode tmpCorrectionCode;
180  {
181  // get standard scale factor
182  tmpCorrectionCode = getValue("sf"+sProng,
183  xTau,
184  dCorrection);
185  // return correction code if histogram is not available
186  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
187  return tmpCorrectionCode;
188  }
189 
190  // skip further process if systematic set is empty
191  if (!m_sSystematicSet->empty())
192  {
193  // get uncertainties summed in quadrature
194  double dTotalSystematic2 = 0.;
195  double dDirection = 0.;
196  for (auto& syst : *m_sSystematicSet)
197  {
198  // check if systematic is available
199  auto it = m_mSystematicsHistNames.find(syst.basename());
200 
201  // get uncertainty value
202  double dUncertaintySyst = 0.;
203  tmpCorrectionCode = getValue(it->second+sProng,
204  xTau,
205  dUncertaintySyst);
206  // return correction code if histogram is not available
207  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
208  return tmpCorrectionCode;
209 
210  // needed for up/down decision
211  dDirection = syst.parameter();
212 
213  // scale uncertainty with direction, i.e. +/- n*sigma
214  dUncertaintySyst *= dDirection;
215 
216  // square uncertainty and add to total uncertainty
217  dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
218  }
219 
220  // now use dDirection to use up/down uncertainty
221  dDirection = (dDirection > 0.) ? 1. : -1.;
222 
223  // finally apply uncertainty (eff * ( 1 +/- \sum )
224  dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
225  }
226 
227  // finally apply correction
228  // in-situ TES is applied w.r.t. ptFinalCalib, use explicit calibration for pt to avoid irreproducibility upon re-calibration (PHYSLITE)
229  // not required for eta/phi/m that we don't correct (only ptFinalCalib and etaFinalCalib are stored in DAODs)
230  xTau.setP4( xTau.ptFinalCalib() * dCorrection,
231  xTau.eta(), xTau.phi(), xTau.m());
232  return CP::CorrectionCode::Ok;
233 }

◆ applyCorrection() [3/3]

CP::CorrectionCode CommonSmearingTool::applyCorrection ( xAOD::TauJet xTau) const
virtualinherited

Apply the correction on a modifyable object.

Implements TauAnalysisTools::ITauSmearingTool.

Definition at line 142 of file CommonSmearingTool.cxx.

143 {
144  // optional consistency check between calo-only pt ("ptTauEnergyScale") and MVA pt ("ptFinalCalib" i.e. "pt", MVA TES is the default calibration)
145  // not recommended until validated in R22: MVA TES always has better resolution than calo-only TES for true taus
146  // in practice this check mostly discards muons faking taus with large track momentum but little energy deposit in the calorimeter:
147  // when enforcing calo-only pt, the muon will likely fail the tau pt cut applied by TauSelectionTool
148 
149  if (m_bMVATESQualityCheck) {
150  bool compatibility = true;
151  static const SG::ConstAccessor<float> accPtTauEnergyScale ("ptTauEnergyScale");
152  if(accPtTauEnergyScale.isAvailable(xTau)) {
153  const auto combinedTEStool = dynamic_cast<const TauCombinedTES*>(m_tTauCombinedTES.get());
154  compatibility = combinedTEStool->getTESCompatibility(xTau);
155  }
156  static const SG::Accessor<char> accTESCompatibility("TESCompatibility");
157  accTESCompatibility(xTau) = char(compatibility);
158  }
159 
160  // step out here if we run on data
161  if (m_bIsData)
162  return CP::CorrectionCode::Ok;
163 
164  // check which true state is requested
166  return CP::CorrectionCode::Ok;
167  }
168 
169  // skip taus which are not 1 or 3 prong
170  if( xTau.nTracks() != 1 && xTau.nTracks() != 3) {
171  return CP::CorrectionCode::Ok;
172  }
173 
174  // get prong extension for histogram name
175  std::string sProng = ConvertProngToString(xTau.nTracks());
176 
177  double dCorrection = 1.;
178  CP::CorrectionCode tmpCorrectionCode;
180  {
181  // get standard scale factor
182  tmpCorrectionCode = getValue("sf"+sProng,
183  xTau,
184  dCorrection);
185  // return correction code if histogram is not available
186  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
187  return tmpCorrectionCode;
188  }
189 
190  // skip further process if systematic set is empty
191  if (!m_sSystematicSet->empty())
192  {
193  // get uncertainties summed in quadrature
194  double dTotalSystematic2 = 0.;
195  double dDirection = 0.;
196  for (auto& syst : *m_sSystematicSet)
197  {
198  // check if systematic is available
199  auto it = m_mSystematicsHistNames.find(syst.basename());
200 
201  // get uncertainty value
202  double dUncertaintySyst = 0.;
203  tmpCorrectionCode = getValue(it->second+sProng,
204  xTau,
205  dUncertaintySyst);
206  // return correction code if histogram is not available
207  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
208  return tmpCorrectionCode;
209 
210  // needed for up/down decision
211  dDirection = syst.parameter();
212 
213  // scale uncertainty with direction, i.e. +/- n*sigma
214  dUncertaintySyst *= dDirection;
215 
216  // square uncertainty and add to total uncertainty
217  dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
218  }
219 
220  // now use dDirection to use up/down uncertainty
221  dDirection = (dDirection > 0.) ? 1. : -1.;
222 
223  // finally apply uncertainty (eff * ( 1 +/- \sum )
224  dCorrection *= 1 + dDirection * std::sqrt(dTotalSystematic2);
225  }
226 
227  // finally apply correction
228  // in-situ TES is applied w.r.t. ptFinalCalib, use explicit calibration for pt to avoid irreproducibility upon re-calibration (PHYSLITE)
229  // not required for eta/phi/m that we don't correct (only ptFinalCalib and etaFinalCalib are stored in DAODs)
230  xTau.setP4( xTau.ptFinalCalib() * dCorrection,
231  xTau.eta(), xTau.phi(), xTau.m());
232  return CP::CorrectionCode::Ok;
233 }

◆ applySystematicVariation()

StatusCode CommonSmearingTool::applySystematicVariation ( const CP::SystematicSet sSystematicSet)
virtualinherited

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.

Definition at line 299 of file CommonSmearingTool.cxx.

300 {
301  // first check if we already know this systematic configuration
302  auto itSystematicSet = m_mSystematicSets.find(sSystematicSet);
303  if (itSystematicSet != m_mSystematicSets.end())
304  {
305  m_sSystematicSet = &itSystematicSet->first;
306  return StatusCode::SUCCESS;
307  }
308 
309  // sanity checks if systematic set is supported
310  double dDirection = 0.;
311  CP::SystematicSet sSystematicSetAvailable;
312  for (auto& sSyst : sSystematicSet)
313  {
314  // check if systematic is available
315  auto it = m_mSystematicsHistNames.find(sSyst.basename());
316  if (it == m_mSystematicsHistNames.end())
317  {
318  ATH_MSG_VERBOSE("unsupported systematic variation: "<< sSyst.basename()<<"; skipping this one");
319  continue;
320  }
321 
322  if (sSyst.parameter() * dDirection < 0)
323  {
324  ATH_MSG_ERROR("unsupported set of systematic variations, you should either use only \"UP\" or only \"DOWN\" systematics in one set!");
325  ATH_MSG_ERROR("systematic set will not be applied");
326  return StatusCode::FAILURE;
327  }
328  dDirection = sSyst.parameter();
329 
330  if ((m_sRecommendedSystematics.find(sSyst.basename()) != m_sRecommendedSystematics.end()) and sSystematicSet.size() > 1)
331  {
332  ATH_MSG_ERROR("unsupported set of systematic variations, you should not combine \"TAUS_{TRUE|FAKE}_SME_TOTAL\" with other systematic variations!");
333  ATH_MSG_ERROR("systematic set will not be applied");
334  return StatusCode::FAILURE;
335  }
336 
337  // finally add the systematic to the set of systematics to process
338  sSystematicSetAvailable.insert(sSyst);
339  }
340 
341  // store this calibration for future use, and make it current
342  m_sSystematicSet = &m_mSystematicSets.insert(std::pair<CP::SystematicSet,std::string>(sSystematicSetAvailable, sSystematicSet.name())).first->first;
343 
344  return StatusCode::SUCCESS;
345 }

◆ beginEvent()

StatusCode CommonSmearingTool::beginEvent ( )
privatevirtualinherited

Function called when a new events is loaded.

Dummy implementation that can be overridden by the derived tool.

Reimplemented from asg::AsgMetadataTool.

Definition at line 354 of file CommonSmearingTool.cxx.

355 {
356  if (m_bIsConfigured)
357  return StatusCode::SUCCESS;
358 
359  const xAOD::EventInfo* xEventInfo = nullptr;
360  ATH_CHECK(evtStore()->retrieve(xEventInfo,"EventInfo"));
362  m_bIsConfigured = true;
363 
364  return StatusCode::SUCCESS;
365 }

◆ beginInputFile()

StatusCode asg::AsgMetadataTool::beginInputFile ( )
protectedvirtualinherited

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, PMGTools::PMGTruthWeightTool, BookkeeperTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.

Definition at line 185 of file AsgMetadataTool.cxx.

185  {
186 
187  // Return gracefully:
188  return StatusCode::SUCCESS;
189  }

◆ ConvertProngToString()

std::string CommonSmearingTool::ConvertProngToString ( const int  iProngness) const
protectedinherited

Definition at line 368 of file CommonSmearingTool.cxx.

369 {
370  return fProngness == 1 ? "_1p" : "_3p";
371 }

◆ correctedCopy() [1/3]

CP::CorrectionCode CommonDiTauSmearingTool::correctedCopy ( const xAOD::DiTauJet input,
xAOD::DiTauJet *&  output 
)
overridevirtual

Create a corrected copy from a constant ditau.

Implements TauAnalysisTools::IDiTauSmearingTool.

Definition at line 136 of file CommonDiTauSmearingTool.cxx.

138 {
139 
140  // A sanity check:
141  if( xDiTauCopy )
142  {
143  ATH_MSG_WARNING( "Non-null pointer received. "
144  "There's a possible memory leak!" );
145  }
146 
147  // Create a new object:
148  xDiTauCopy = new xAOD::DiTauJet();
149  xDiTauCopy->makePrivateStore( xDiTau );
150 
151  // Use the other function to modify this object:
152  return applyCorrection( *xDiTauCopy );
153 }

◆ correctedCopy() [2/3]

CP::CorrectionCode CommonSmearingTool::correctedCopy

Create a corrected copy from a constant ditau.

Definition at line 63 of file CommonSmearingTool.cxx.

242 {
243 
244  // A sanity check:
245  if( xTauCopy )
246  {
247  ATH_MSG_WARNING( "Non-null pointer received. "
248  "There's a possible memory leak!" );
249  }
250 
251  // Create a new object:
252  xTauCopy = new xAOD::TauJet();
253  xTauCopy->makePrivateStore( xTau );
254 
255  // Use the other function to modify this object:
256  return applyCorrection( *xTauCopy );
257 }

◆ correctedCopy() [3/3]

CP::CorrectionCode CommonSmearingTool::correctedCopy ( const xAOD::TauJet xTau,
xAOD::TauJet *&  xTauCopy 
) const
virtualinherited

Create a corrected copy from a constant tau.

Implements TauAnalysisTools::ITauSmearingTool.

Definition at line 240 of file CommonSmearingTool.cxx.

242 {
243 
244  // A sanity check:
245  if( xTauCopy )
246  {
247  ATH_MSG_WARNING( "Non-null pointer received. "
248  "There's a possible memory leak!" );
249  }
250 
251  // Create a new object:
252  xTauCopy = new xAOD::TauJet();
253  xTauCopy->makePrivateStore( xTau );
254 
255  // Use the other function to modify this object:
256  return applyCorrection( *xTauCopy );
257 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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; }

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 193 of file AsgMetadataTool.cxx.

193  {
194 
195  // Return gracefully:
196  return StatusCode::SUCCESS;
197  }

◆ 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 CommonDiTauSmearingTool::generateSystematicSets ( )
protected

Definition at line 183 of file CommonDiTauSmearingTool.cxx.

184 {
185  std::vector<std::string> vInputFilePath;
186  split(m_sInputFilePath,'/',vInputFilePath);
187  std::string sInputFileName = vInputFilePath.back();
188 
189  // creation of basic string for all NPs, e.g. "TAUS_TRUEHADTAU_SME_TES_"
190  std::vector<std::string> vSplitInputFilePath = {};
191  split(sInputFileName,'_',vSplitInputFilePath);
192  std::string sEfficiencyType = vSplitInputFilePath.at(0);
193  std::string sTruthType = vSplitInputFilePath.at(1);
194  std::transform(sEfficiencyType.begin(), sEfficiencyType.end(), sEfficiencyType.begin(), toupper);
195  std::transform(sTruthType.begin(), sTruthType.end(), sTruthType.begin(), toupper);
196  std::string sSystematicBaseString = "TAUS_"+sTruthType+"_SME_"+sEfficiencyType+"_";
197 
198  // set truth type to check for in truth matching
199  if (sTruthType=="TRUEHADTAU") m_eCheckTruth = TauAnalysisTools::TruthHadronicTau;
200  if (sTruthType=="TRUEHADDITAU") m_eCheckTruth = TauAnalysisTools::TruthHadronicDiTau;
201 
202  for (auto mSF : m_mDTSF)
203  {
204  // parse for nuisance parameter in histogram name
205  std::vector<std::string> vSplitNP = {};
206  split(mSF.first,'_',vSplitNP);
207  std::string sNP = vSplitNP.at(0);
208  std::string sNPUppercase = vSplitNP.at(0);
209 
210  // skip nominal scale factors
211  if (sNP == "sf") continue;
212 
213  // test if NP starts with a capital letter indicating that this should be recommended
214  bool bIsRecommended = false;
215  if (isupper(sNP.at(0)))
216  bIsRecommended = true;
217 
218  // make sNP uppercase and build final NP entry name
219  std::transform(sNPUppercase.begin(), sNPUppercase.end(), sNPUppercase.begin(), toupper);
220  std::string sSystematicString = sSystematicBaseString+sNPUppercase;
221 
222  // add all found systematics to the AffectingSystematics
224  m_sAffectingSystematics.insert(CP::SystematicVariation (sSystematicString, -1));
225  // only add found uppercase systematics to the RecommendedSystematics
226  if (bIsRecommended)
227  {
230  }
231 
232  ATH_MSG_DEBUG("connected histogram base name " << sNP << " with systematic " <<sSystematicString);
233  m_mSystematicsHistNames.insert({sSystematicString,sNP});
234  }
235 }

◆ 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  }

◆ 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() [1/3]

CP::CorrectionCode CommonDiTauSmearingTool::getValue ( const std::string &  sHistName,
const xAOD::DiTauJet xDiTau,
double &  dCorrectionFactor 
) const
protectedvirtual

Definition at line 238 of file CommonDiTauSmearingTool.cxx.

241 {
242  TH3* hHist = m_mDTSF.at(sHistName);
243  if (!hHist)
244  {
245  ATH_MSG_ERROR("Histogram with name "<<sHistName<<" was not found in input file.");
247  }
248 
249  double dX = m_fX(xDiTau);
250  double dY = m_fY(xDiTau);
251  double dZ = m_fZ(xDiTau);
252 
253  // protect values from underflow bins
254  dX = std::max(dX,hHist->GetXaxis()->GetXmin());
255  dY = std::max(dY,hHist->GetYaxis()->GetXmin());
256  dZ = std::max(dZ,hHist->GetZaxis()->GetXmin());
257  // protect values from overflow bins (times .999 to keep it inside last bin)
258  dX = std::min(dX,hHist->GetXaxis()->GetXmax() * .999);
259  dY = std::min(dY,hHist->GetYaxis()->GetXmax() * .999);
260  dZ = std::min(dZ,hHist->GetZaxis()->GetXmax() * .999);
261 
262  int iBin = hHist->FindFixBin(dX,dY,dZ);
263  dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
264 
265  return CP::CorrectionCode::Ok;
266 }

◆ getValue() [2/3]

CP::CorrectionCode CommonSmearingTool::getValue
protected

Definition at line 96 of file CommonSmearingTool.cxx.

495 {
496  TH1* hHist = m_mSF.at(sHistName);
497  if (hHist == nullptr)
498  {
499  ATH_MSG_ERROR("Histogram with name " << sHistName << " was not found in input file.");
501  }
502 
503  double dPt = m_fX(xTau);
504  double dEta = m_fY(xTau);
505 
506  // protect values from underflow bins
507  dPt = std::max(dPt,hHist->GetXaxis()->GetXmin());
508  dEta = std::max(dEta,hHist->GetYaxis()->GetXmin());
509  // protect values from overflow bins (times .999 to keep it inside last bin)
510  dPt = std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
511  dEta = std::min(dEta,hHist->GetYaxis()->GetXmax() * .999);
512 
513  int iBin = hHist->FindFixBin(dPt,dEta);
514  dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
515 
516  if (m_bApplyFading)
517  {
518  std::string sTitle = hHist->GetTitle();
519  if (!sTitle.empty())
520  {
521  TF1 f("",sTitle.c_str(), 0, 1000);
522  if (sHistName.find("sf_") != std::string::npos)
523  dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1.) *f.Eval(m_fX(xTau)) + 1.;
524  else
525  dEfficiencyScaleFactor *= f.Eval(m_fX(xTau));
526  }
527  }
528  return CP::CorrectionCode::Ok;
529 }

◆ getValue() [3/3]

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

Definition at line 492 of file CommonSmearingTool.cxx.

495 {
496  TH1* hHist = m_mSF.at(sHistName);
497  if (hHist == nullptr)
498  {
499  ATH_MSG_ERROR("Histogram with name " << sHistName << " was not found in input file.");
501  }
502 
503  double dPt = m_fX(xTau);
504  double dEta = m_fY(xTau);
505 
506  // protect values from underflow bins
507  dPt = std::max(dPt,hHist->GetXaxis()->GetXmin());
508  dEta = std::max(dEta,hHist->GetYaxis()->GetXmin());
509  // protect values from overflow bins (times .999 to keep it inside last bin)
510  dPt = std::min(dPt,hHist->GetXaxis()->GetXmax() * .999);
511  dEta = std::min(dEta,hHist->GetYaxis()->GetXmax() * .999);
512 
513  int iBin = hHist->FindFixBin(dPt,dEta);
514  dEfficiencyScaleFactor = hHist->GetBinContent(iBin);
515 
516  if (m_bApplyFading)
517  {
518  std::string sTitle = hHist->GetTitle();
519  if (!sTitle.empty())
520  {
521  TF1 f("",sTitle.c_str(), 0, 1000);
522  if (sHistName.find("sf_") != std::string::npos)
523  dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1.) *f.Eval(m_fX(xTau)) + 1.;
524  else
525  dEfficiencyScaleFactor *= f.Eval(m_fX(xTau));
526  }
527  }
528  return CP::CorrectionCode::Ok;
529 }

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident &  inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 135 of file AsgMetadataTool.cxx.

135  {
136 
137  // Tell the user what's happening:
138  ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
139 
140  // Call the appropriate member function:
141  if( inc.type() == IncidentType::BeginInputFile ) {
142  m_beginInputFileCalled = true;
143  if( beginInputFile().isFailure() ) {
144  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
145  throw std::runtime_error( "Couldn't call beginInputFile()" );
146  }
147  } else if( inc.type() == IncidentType::EndInputFile ) {
148  if( endInputFile().isFailure() ) {
149  ATH_MSG_FATAL( "Failed to call endInputFile()" );
150  throw std::runtime_error( "Couldn't call endInputFile()" );
151  }
152  } else if( inc.type() == IncidentType::BeginEvent ) {
153  // If the tool didn't catch the begin input file incident for the
154  // first input file of the job, then call the appropriate function
155  // now.
156  if( ! m_beginInputFileCalled ) {
157  m_beginInputFileCalled = true;
158  if( beginInputFile().isFailure() ) {
159  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
160  throw std::runtime_error( "Couldn't call beginInputFile()" );
161  }
162  }
163  if( beginEvent().isFailure() ) {
164  ATH_MSG_FATAL( "Failed to call beginEvent()" );
165  throw std::runtime_error( "Couldn't call beginEvent()" );
166  }
167 
168  #ifdef XAOD_STANDALONE
169  } else if( inc.type() == IncidentType::MetaDataStop ) {
170  if( metaDataStop().isFailure() ) {
171  ATH_MSG_FATAL( "Failed to call metaDataStop()" );
172  throw std::runtime_error( "Couldn't call metaDataStop()" );
173  }
174 
175  #endif // XAOD_STANDALONE
176  } else {
177  ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
178  }
179 
180  return;
181  }

◆ initialize()

StatusCode CommonDiTauSmearingTool::initialize ( )
overridevirtual

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 TauAnalysisTools::CommonSmearingTool.

Definition at line 33 of file CommonDiTauSmearingTool.cxx.

34 {
35  ATH_MSG_INFO( "Initializing CommonDiTauSmearingTool" );
36 
37  // only read in histograms once
38  if (m_mDTSF.empty())
39  {
40  std::string sInputFilePath = PathResolverFindCalibFile(m_sInputFilePath);
41  std::unique_ptr< TFile > fSF( TFile::Open(sInputFilePath.c_str(), "READ") );
42  if(fSF == nullptr)
43  {
44  ATH_MSG_FATAL("Could not open file " << sInputFilePath.c_str());
45  return StatusCode::FAILURE;
46  }
47  ReadInputs(fSF.get(), m_mDTSF);
48  fSF->Close();
49  }
50 
52 
53  // load empty systematic variation by default
54  if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS )
55  return StatusCode::FAILURE;
56 
57  return StatusCode::SUCCESS;
58 }

◆ 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.

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 93 of file AsgMetadataTool.cxx.

93  {
94 
95 #ifdef XAOD_STANDALONE
96  return &m_inputMetaStore;
97 #else // XAOD_STANDALONE
98  return m_inputMetaStore;
99 #endif // XAOD_STANDALONE
100  }

◆ isAffectedBySystematic()

bool CommonSmearingTool::isAffectedBySystematic ( const CP::SystematicVariation systematic) const
virtualinherited

returns: whether this tool is affected by the given systematics

Implements CP::ISystematicsTool.

Definition at line 263 of file CommonSmearingTool.cxx.

264 {
266  return sys.find(systematic) != sys.end();
267 }

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 209 of file AsgMetadataTool.cxx.

209  {
210 
211  // Return gracefully:
212  return StatusCode::SUCCESS;
213  }

◆ 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.

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 102 of file AsgMetadataTool.cxx.

102  {
103 
104 #ifdef XAOD_STANDALONE
105  return &m_outputMetaStore;
106 #else // XAOD_STANDALONE
107  return m_outputMetaStore;
108 #endif // XAOD_STANDALONE
109  }

◆ print() [1/2]

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

◆ print() [2/2]

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

◆ ReadInputs()

template<class T >
void CommonDiTauSmearingTool::ReadInputs ( TFile *  fFile,
std::map< std::string, T > &  mMap 
)
protected

Definition at line 158 of file CommonDiTauSmearingTool.cxx.

159 {
160  // initialize function pointer
161  m_fX = &TruthLeadPt;
162  m_fY = &TruthSubleadPt;
163  m_fZ = &TruthDeltaR;
164 
165  TKey *kKey;
166  TIter itNext(fFile->GetListOfKeys());
167  while ((kKey = (TKey*)itNext()))
168  {
169  TClass *cClass = gROOT->GetClass(kKey->GetClassName());
170  std::string sKeyName = kKey->GetName();
171 
172  if (!cClass->InheritsFrom("TH3"))
173  continue;
174 
175  T tObj = (T)kKey->ReadObj();
176  tObj->SetDirectory(0);
177  mMap[sKeyName] = tObj;
178  }
179  ATH_MSG_INFO("data loaded from " << fFile->GetName());
180 }

◆ recommendedSystematics()

CP::SystematicSet CommonSmearingTool::recommendedSystematics ( ) const
virtualinherited

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

Implements CP::IReentrantSystematicsTool.

Definition at line 283 of file CommonSmearingTool.cxx.

284 {
286 }

◆ 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  }

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool  flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133  {
135  }

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 115 of file AsgMetadataTool.cxx.

115  {
116 
117 #ifndef XAOD_STANDALONE
118  if (m_useIncidents) {
119  // Connect to the IncidentSvc:
120  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
121  ATH_CHECK( incSvc.retrieve() );
122 
123  // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
124  incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
125  }
126  // Let the base class do its thing:
127  ATH_CHECK( AlgTool::sysInitialize() );
128 
129 #endif // not XAOD_STANDALONE
130 
131  // Return gracefully:
132  return StatusCode::SUCCESS;
133  }

◆ 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_bApplyFading

Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bApplyFading {this, "ApplyFading", true}
protectedinherited

Definition at line 104 of file CommonSmearingTool.h.

◆ m_bApplyInsituCorrection

Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bApplyInsituCorrection {this, "ApplyInsituCorrection", true}
protectedinherited

Definition at line 106 of file CommonSmearingTool.h.

◆ m_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_bIsConfigured

bool TauAnalysisTools::CommonSmearingTool::m_bIsConfigured
protectedinherited

Definition at line 109 of file CommonSmearingTool.h.

◆ m_bIsData

bool TauAnalysisTools::CommonSmearingTool::m_bIsData
protectedinherited

Definition at line 108 of file CommonSmearingTool.h.

◆ m_bMVATESQualityCheck

Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bMVATESQualityCheck {this, "MVATESQualityCheck", true}
protectedinherited

Definition at line 105 of file CommonSmearingTool.h.

◆ m_bSkipTruthMatchCheck

Gaudi::Property<bool> TauAnalysisTools::CommonSmearingTool::m_bSkipTruthMatchCheck {this, "SkipTruthMatchCheck", false}
protectedinherited

Definition at line 103 of file CommonSmearingTool.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::CommonSmearingTool::m_eCheckTruth
protectedinherited

Definition at line 113 of file CommonSmearingTool.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

double(* TauAnalysisTools::CommonDiTauSmearingTool::m_fX) (const xAOD::DiTauJet &xDiTau)
protected

Definition at line 59 of file CommonDiTauSmearingTool.h.

◆ m_fY

double(* TauAnalysisTools::CommonDiTauSmearingTool::m_fY) (const xAOD::DiTauJet &xDiTau)
protected

Definition at line 60 of file CommonDiTauSmearingTool.h.

◆ m_fZ

double(* TauAnalysisTools::CommonDiTauSmearingTool::m_fZ) (const xAOD::DiTauJet &xDiTau)
protected

Definition at line 61 of file CommonDiTauSmearingTool.h.

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_mDTSF

std::map<std::string, TH3*> TauAnalysisTools::CommonDiTauSmearingTool::m_mDTSF
protected

Definition at line 58 of file CommonDiTauSmearingTool.h.

◆ m_mSF

std::map<std::string, TH1*> TauAnalysisTools::CommonSmearingTool::m_mSF
protectedinherited

Definition at line 83 of file CommonSmearingTool.h.

◆ m_mSystematics

std::map<std::string, int> TauAnalysisTools::CommonSmearingTool::m_mSystematics
protectedinherited

Definition at line 86 of file CommonSmearingTool.h.

◆ m_mSystematicSets

std::unordered_map< CP::SystematicSet, std::string > TauAnalysisTools::CommonSmearingTool::m_mSystematicSets
protectedinherited

Definition at line 84 of file CommonSmearingTool.h.

◆ m_mSystematicsHistNames

std::map<std::string, std::string> TauAnalysisTools::CommonSmearingTool::m_mSystematicsHistNames
protectedinherited

Definition at line 87 of file CommonSmearingTool.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_sAffectingSystematics

CP::SystematicSet TauAnalysisTools::CommonSmearingTool::m_sAffectingSystematics
protectedinherited

Definition at line 114 of file CommonSmearingTool.h.

◆ m_sInputFilePath

Gaudi::Property<std::string> TauAnalysisTools::CommonSmearingTool::m_sInputFilePath {this, "InputFilePath", ""}
protectedinherited

Definition at line 102 of file CommonSmearingTool.h.

◆ m_sRecommendedSystematics

CP::SystematicSet TauAnalysisTools::CommonSmearingTool::m_sRecommendedSystematics
protectedinherited

Definition at line 115 of file CommonSmearingTool.h.

◆ m_sSystematicSet

const CP::SystematicSet* TauAnalysisTools::CommonSmearingTool::m_sSystematicSet
protectedinherited

Definition at line 85 of file CommonSmearingTool.h.

◆ m_tTauCombinedTES

asg::AnaToolHandle<ITauToolBase> TauAnalysisTools::CommonSmearingTool::m_tTauCombinedTES
protectedinherited

Definition at line 111 of file CommonSmearingTool.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TauAnalysisTools::CommonSmearingTool::m_bApplyFading
Gaudi::Property< bool > m_bApplyFading
Definition: CommonSmearingTool.h:104
xAOD::DiTauJet_v1::m
virtual double m() const
The invariant mass of the particle.
xAOD::DiTauJet_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
TauCombinedTES::getTESCompatibility
bool getTESCompatibility(const xAOD::TauJet &tau) const
Check if MVA TES and CaloTES are compatible, invoked by TauSmearing tool.
Definition: TauCombinedTES.cxx:181
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TauAnalysisTools::CommonSmearingTool::m_bSkipTruthMatchCheck
Gaudi::Property< bool > m_bSkipTruthMatchCheck
Definition: CommonSmearingTool.h:103
TauAnalysisTools::CommonDiTauSmearingTool::m_fX
double(* m_fX)(const xAOD::DiTauJet &xDiTau)
Definition: CommonDiTauSmearingTool.h:59
asg::AsgMetadataTool::beginEvent
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Definition: AsgMetadataTool.cxx:201
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TauAnalysisTools::TruthSubleadPt
double TruthSubleadPt(const xAOD::DiTauJet &xDiTau)
return the truth vis pT of the subleading pT matched particle.
Definition: CommonDiTauEfficiencyTool.cxx:328
xAOD::TauJet_v3::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
SG::Accessor< char >
TauAnalysisTools::TruthHadronicTau
@ TruthHadronicTau
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:99
CP::SystematicSet::size
size_t size() const
returns: size of the set
Definition: SystematicSet.h:71
xAOD::DiTauJet
DiTauJet_v1 DiTauJet
Definition of the current version.
Definition: DiTauJet.h:17
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
CP::SystematicSet::empty
bool empty() const
returns: whether the set is empty
Definition: SystematicSet.h:67
xAOD::TauJet_v3::m
virtual double m() const
The invariant mass of the particle.
TauCombinedTES
Definition: TauCombinedTES.h:21
xAOD::char
char
Definition: TrigDecision_v1.cxx:38
TauAnalysisTools::CommonSmearingTool::m_sSystematicSet
const CP::SystematicSet * m_sSystematicSet
Definition: CommonSmearingTool.h:85
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:488
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TauAnalysisTools::CommonDiTauSmearingTool::ReadInputs
void ReadInputs(TFile *fFile, std::map< std::string, T > &mMap)
Definition: CommonDiTauSmearingTool.cxx:158
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
TauAnalysisTools::CommonSmearingTool::m_sRecommendedSystematics
CP::SystematicSet m_sRecommendedSystematics
Definition: CommonSmearingTool.h:115
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::CommonSmearingTool::m_bApplyInsituCorrection
Gaudi::Property< bool > m_bApplyInsituCorrection
Definition: CommonSmearingTool.h:106
asg::AsgMetadataTool::m_beginInputFileCalled
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
Definition: AsgMetadataTool.h:126
SG::ConstAccessor< float >
asg::AsgMetadataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: AsgMetadataTool.cxx:193
asg::AsgMetadataTool::m_outputMetaStore
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
Definition: AsgMetadataTool.h:121
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::DiTauJet_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
CP::SystematicVariation
Definition: SystematicVariation.h:47
xAOD::DiTauJet_v1::setP4
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
Definition: DiTauJet_v1.cxx:39
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
TauAnalysisTools::TruthLeadPt
double TruthLeadPt(const xAOD::DiTauJet &xDiTau)
return the truth vis pT of the leading pT matched particle.
Definition: CommonDiTauEfficiencyTool.cxx:320
xAOD::TauJet_v3::setP4
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
Definition: TauJet_v3.cxx:171
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TauClusterVars::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
Definition: ConstituentLoaderTauCluster.cxx:114
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TauAnalysisTools::CommonSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::TauJet &xTau) const
Apply the correction on a modifyable object.
Definition: CommonSmearingTool.cxx:142
TauAnalysisTools::CommonDiTauSmearingTool::m_fZ
double(* m_fZ)(const xAOD::DiTauJet &xDiTau)
Definition: CommonDiTauSmearingTool.h:61
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TauAnalysisTools::CommonSmearingTool::m_sInputFilePath
Gaudi::Property< std::string > m_sInputFilePath
Definition: CommonSmearingTool.h:102
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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::CommonDiTauSmearingTool::getValue
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::DiTauJet &xDiTau, double &dCorrectionFactor) const
Definition: CommonDiTauSmearingTool.cxx:238
xAOD::TauJet_v3::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
xAOD::DiTauJet_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
AthCommonDataStore
Definition: AthCommonDataStore.h:52
TauAnalysisTools::CommonSmearingTool::m_eCheckTruth
TruthMatchedParticleType m_eCheckTruth
Definition: CommonSmearingTool.h:113
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TauAnalysisTools::CommonDiTauSmearingTool::m_fY
double(* m_fY)(const xAOD::DiTauJet &xDiTau)
Definition: CommonDiTauSmearingTool.h:60
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TauAnalysisTools::CommonSmearingTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const CP::SystematicSet &sSystematicSet)
configure this tool for the given list of systematic variations.
Definition: CommonSmearingTool.cxx:299
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
asg::AsgMetadataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: AsgMetadataTool.cxx:185
master.flag
bool flag
Definition: master.py:29
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
TauAnalysisTools::CommonSmearingTool::m_sAffectingSystematics
CP::SystematicSet m_sAffectingSystematics
Definition: CommonSmearingTool.h:114
asg::AsgMetadataTool::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition: AsgMetadataTool.cxx:209
CP::SystematicSet::end
const_iterator end() const
description: const iterator to the end of the set
Definition: SystematicSet.h:59
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
hist_file_dump.f
f
Definition: hist_file_dump.py:140
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition: Event/xAOD/xAODTau/xAODTau/TauJet.h:17
TauAnalysisTools::CommonSmearingTool::m_tTauCombinedTES
asg::AnaToolHandle< ITauToolBase > m_tTauCombinedTES
Definition: CommonSmearingTool.h:111
TauAnalysisTools::CommonSmearingTool::getValue
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
Definition: CommonSmearingTool.cxx:492
TauAnalysisTools::CommonDiTauSmearingTool::m_mDTSF
std::map< std::string, TH3 * > m_mDTSF
Definition: CommonDiTauSmearingTool.h:58
TauAnalysisTools::CommonDiTauSmearingTool::generateSystematicSets
void generateSystematicSets()
Definition: CommonDiTauSmearingTool.cxx:183
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::TruthDeltaR
double TruthDeltaR(const xAOD::DiTauJet &xDiTau)
return the dR of between the leading and subleading pT matched particle.
Definition: CommonDiTauEfficiencyTool.cxx:336
TauAnalysisTools::CommonSmearingTool::m_bIsData
bool m_bIsData
Definition: CommonSmearingTool.h:108
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
asg::AsgMetadataTool::m_inputMetaStore
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
Definition: AsgMetadataTool.h:119
CP::SystematicSet::insert
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
Definition: SystematicSet.cxx:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
TauAnalysisTools::CommonSmearingTool::m_bIsConfigured
bool m_bIsConfigured
Definition: CommonSmearingTool.h:109
TauAnalysisTools::CommonSmearingTool::m_fX
double(* m_fX)(const xAOD::TauJet &xTau)
Definition: CommonSmearingTool.h:90
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
TauAnalysisTools::CommonSmearingTool::m_fY
double(* m_fY)(const xAOD::TauJet &xTau)
Definition: CommonSmearingTool.h:91
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:321
TauAnalysisTools::CommonSmearingTool::m_mSF
std::map< std::string, TH1 * > m_mSF
Definition: CommonSmearingTool.h:83
CP::SystematicSet::find
iterator find(const SystematicVariation &sys) const
description: find an element in the set
Definition: SystematicSet.h:63
TauAnalysisTools::CommonSmearingTool::m_mSystematicSets
std::unordered_map< CP::SystematicSet, std::string > m_mSystematicSets
Definition: CommonSmearingTool.h:84
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TauAnalysisTools::getTruthParticleType
TruthMatchedParticleType getTruthParticleType(const xAOD::TauJet &xTau)
return TauJet match type
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:493
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
TauAnalysisTools::CommonSmearingTool::CommonSmearingTool
CommonSmearingTool(const std::string &sName)
Create a proper constructor for Athena.
Definition: CommonSmearingTool.cxx:73
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
TauAnalysisTools::CommonSmearingTool::m_mSystematicsHistNames
std::map< std::string, std::string > m_mSystematicsHistNames
Definition: CommonSmearingTool.h:87
TauAnalysisTools::CommonSmearingTool::ConvertProngToString
std::string ConvertProngToString(const int iProngness) const
Definition: CommonSmearingTool.cxx:368
TauAnalysisTools::CommonSmearingTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by
Definition: CommonSmearingTool.cxx:274
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
TauAnalysisTools::CommonSmearingTool::m_bMVATESQualityCheck
Gaudi::Property< bool > m_bMVATESQualityCheck
Definition: CommonSmearingTool.h:105
TauAnalysisTools::CommonDiTauSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::DiTauJet &xDiTau) override
Declare the interface that the class provides.
Definition: CommonDiTauSmearingTool.cxx:66
SG::DataProxy
Definition: DataProxy.h:45
xAOD::TauJet_v3::ptFinalCalib
double ptFinalCalib() const
asg::AnaToolHandle::get
T * get()
access the tool
TauAnalysisTools::TruthHadronicDiTau
@ TruthHadronicDiTau
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:104
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
fitman.k
k
Definition: fitman.py:528
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
ServiceHandle< IIncidentSvc >
TauAnalysisTools::split
void split(const std::string &sInput, const char cDelim, std::vector< std::string > &vOut)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:23
asg::AsgMetadataTool::m_useIncidents
bool m_useIncidents
Definition: AsgMetadataTool.h:128