ATLAS Offline Software
Loading...
Searching...
No Matches
CommonSmearingTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TAUANALYSISTOOLS_COMMONSMEARINGTOOL_H
6#define TAUANALYSISTOOLS_COMMONSMEARINGTOOL_H
7
8/*
9 author: Dirk Duschinger
10 mail: dirk.duschinger@cern.ch
11 documentation in: ../README.rst
12*/
13
14// Framework include(s):
18
19// EDM include(s):
20#include "xAODTau/TauJet.h"
23
25
26// Local include(s):
30
31// tauRecTools include(s)
33#include <map>
34
35class TFile;
36
37namespace TauAnalysisTools
38{
39
41 : public virtual ITauSmearingTool
43{
46
47public:
48
49 CommonSmearingTool(const std::string& sName);
50
52
53 virtual StatusCode initialize();
54
55 // CommonSmearingTool pure virtual public functionality
56 //__________________________________________________________________________
57
59 virtual CP::CorrectionCode applyCorrection( xAOD::TauJet& xTau ) const;
60
63 xAOD::TauJet*& xTauCopy) const;
64
66 virtual bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const;
67
70
73
76 virtual StatusCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet);
77
78protected:
79
80 std::string ConvertProngToString(const int iProngness) const;
81
82 std::map<std::string, TH1*> m_mSF;
83 std::unordered_map < CP::SystematicSet, std::string > m_mSystematicSets;
85 std::map<std::string, int> m_mSystematics;
86 std::map<std::string, std::string> m_mSystematicsHistNames;
87
88 // std::function<double> m_fX;
89 double (*m_fX)(const xAOD::TauJet& xTau);
90 double (*m_fY)(const xAOD::TauJet& xTau);
91
92 template<class T>
93 void ReadInputs(TFile* fFile, std::map<std::string, T>& mMap);
94
95 virtual CP::CorrectionCode getValue(const std::string& sHistName,
96 const xAOD::TauJet& xTau,
97 double& dEfficiencyScaleFactor) const;
98
100
101 Gaudi::Property<std::string> m_sInputFilePath{this, "InputFilePath", ""};
102 Gaudi::Property<bool> m_bSkipTruthMatchCheck{this, "SkipTruthMatchCheck", false};
103 Gaudi::Property<bool> m_bApplyFading{this, "ApplyFading", true};
104 Gaudi::Property<bool> m_bMVATESQualityCheck{this, "MVATESQualityCheck", true};
105 Gaudi::Property<bool> m_bApplyInsituCorrection{this, "ApplyInsituCorrection", true};
106
109
111
115
116private:
117
119
120 // Execute at each event
121 virtual StatusCode beginEvent();
122
123};
124} // namespace TauAnalysisTools
125
126#endif // TAUANALYSISTOOLS_COMMONSMEARINGTOOL_H
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Return value from object correction CP tools.
Class to wrap a set of SystematicVariations.
Cached value with atomic update.
Definition CachedValue.h:55
std::unordered_map< CP::SystematicSet, std::string > m_mSystematicSets
std::map< std::string, int > m_mSystematics
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
std::map< std::string, TH1 * > m_mSF
double(* m_fX)(const xAOD::TauJet &xTau)
CxxUtils::CachedValue< bool > m_bIsTESCompatibilityCheckAvailable
virtual StatusCode applySystematicVariation(const CP::SystematicSet &sSystematicSet)
configure this tool for the given list of systematic variations.
Gaudi::Property< bool > m_bMVATESQualityCheck
asg::AnaToolHandle< ITauToolBase > m_tTauCombinedTES
virtual StatusCode beginEvent()
Function called when a new events is loaded.
void ReadInputs(TFile *fFile, std::map< std::string, T > &mMap)
CommonSmearingTool(const std::string &sName)
Create a proper constructor for Athena.
Gaudi::Property< bool > m_bSkipTruthMatchCheck
Gaudi::Property< std::string > m_sInputFilePath
std::string ConvertProngToString(const int iProngness) const
Gaudi::Property< bool > m_bApplyInsituCorrection
virtual CP::SystematicSet recommendedSystematics() const
returns: the list of all systematics this tool recommends to use
virtual bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const
returns: whether this tool is affected by the given systematics
double(* m_fY)(const xAOD::TauJet &xTau)
std::map< std::string, std::string > m_mSystematicsHistNames
virtual CP::CorrectionCode applyCorrection(xAOD::TauJet &xTau) const
Apply the correction on a modifyable object.
virtual CP::CorrectionCode correctedCopy(const xAOD::TauJet &xTau, xAOD::TauJet *&xTauCopy) const
Create a corrected copy from a constant tau.
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
const CP::SystematicSet * m_sSystematicSet
virtual CP::SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by
a modified tool handle that allows its owner to configure new tools from the C++ side
Base class for dual-use tools that provide file metadata access.
TauJet_v3 TauJet
Definition of the current "tau version".
Definition TauJet.h:17