ATLAS Offline Software
Loading...
Searching...
No Matches
CommonSmearingTool.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

namespace ADD_CMODE (TauAnalysisTools)

Function Documentation

◆ ADD_CMODE()

namespace ADD_CMODE ( TauAnalysisTools )

Create a proper constructor for Athena

Apply the correction on a modifyable object

Create a corrected copy from a constant tau

returns: whether this tool is affected by the given systematics

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

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

configure this tool for the given list of systematic variations. any requested systematics that are not affecting this tool will be silently ignored

Definition at line 1 of file CommonSmearingTool.h.

36{
37
38class CommonSmearingTool
39 : public virtual ITauSmearingTool
41{
43 ASG_TOOL_CLASS( CommonSmearingTool, TauAnalysisTools::ITauSmearingTool )
44
45public:
46
47 CommonSmearingTool(const std::string& sName);
48
49 ~CommonSmearingTool();
50
51 virtual StatusCode initialize();
52
53 // CommonSmearingTool pure virtual public functionality
54 //__________________________________________________________________________
55
57 virtual CP::CorrectionCode applyCorrection( xAOD::TauJet& xTau ) const;
58
60 virtual CP::CorrectionCode correctedCopy( const xAOD::TauJet& xTau,
61 xAOD::TauJet*& xTauCopy) const;
62
64 virtual bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const;
65
67 virtual CP::SystematicSet affectingSystematics() const;
68
70 virtual CP::SystematicSet recommendedSystematics() const;
71
74 virtual StatusCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet);
75
76protected:
77
78 std::string ConvertProngToString(const int iProngness) const;
79
80 std::map<std::string, TH1*> m_mSF;
81 std::unordered_map < CP::SystematicSet, std::string > m_mSystematicSets;
82 const CP::SystematicSet* m_sSystematicSet;
83 std::map<std::string, int> m_mSystematics;
84 std::map<std::string, std::string> m_mSystematicsHistNames;
85
86 // std::function<double> m_fX;
87 double (*m_fX)(const xAOD::TauJet& xTau);
88 double (*m_fY)(const xAOD::TauJet& xTau);
89
90 template<class T>
91 void ReadInputs(TFile* fFile, std::map<std::string, T>& mMap);
92
93 virtual CP::CorrectionCode getValue(const std::string& sHistName,
94 const xAOD::TauJet& xTau,
95 double& dEfficiencyScaleFactor) const;
96
97 void generateSystematicSets();
98
99 Gaudi::Property<std::string> m_sInputFilePath{this, "InputFilePath", ""};
100 Gaudi::Property<bool> m_bSkipTruthMatchCheck{this, "SkipTruthMatchCheck", false};
101 Gaudi::Property<bool> m_bApplyFading{this, "ApplyFading", true};
102 Gaudi::Property<bool> m_bMVATESQualityCheck{this, "MVATESQualityCheck", true};
103 Gaudi::Property<bool> m_bApplyInsituCorrection{this, "ApplyInsituCorrection", true};
104
105 bool m_bIsData;
106 bool m_bIsConfigured;
107
108 asg::AnaToolHandle<TauAnalysisTools::ITauResolutionTool> m_tauResolutionTool;
109
111 CP::SystematicSet m_sAffectingSystematics;
112 CP::SystematicSet m_sRecommendedSystematics;
113
114private:
115
116 CxxUtils::CachedValue<bool> m_bIsTESCompatibilityCheckAvailable;
117
118 // Execute at each event
119 virtual StatusCode beginEvent();
120
121};
122} // namespace ADD_CMODE(TauAnalysisTools)
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Base class for dual-use tools that provide file metadata access.
virtual StatusCode beginEvent()
Function called when a new events is loaded.
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition AsgTool.h:133
::StatusCode StatusCode
StatusCode definition for legacy code.
TauJet_v3 TauJet
Definition of the current "tau version".
Definition TauJet.h:17