ATLAS Offline Software
Loading...
Searching...
No Matches
CommonDiTauSmearingTool.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 modifiable object

Create a corrected copy from a constant ditau

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 CommonDiTauSmearingTool.h.

35{
36
37class CommonDiTauSmearingTool
38 : public virtual IDiTauSmearingTool
40{
42 ASG_TOOL_CLASS( CommonDiTauSmearingTool, TauAnalysisTools::IDiTauSmearingTool )
43
44public:
45
46 CommonDiTauSmearingTool(const std::string& sName);
47
48 virtual StatusCode initialize();
49
51 virtual CP::CorrectionCode applyCorrection( xAOD::DiTauJet& xDiTau ) const;
53 virtual CP::CorrectionCode correctedCopy( const xAOD::DiTauJet& xDiTau,
54 xAOD::DiTauJet*& xDiTauCopy) const;
55
57 virtual bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const;
58
60 virtual CP::SystematicSet affectingSystematics() const;
61
63 virtual CP::SystematicSet recommendedSystematics() const;
64
67 virtual StatusCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet);
68
69protected:
70
71 std::map<std::string, TH3*> m_mDTSF;
72 std::unordered_map < CP::SystematicSet, std::string > m_mSystematicSets;
73 const CP::SystematicSet* m_sSystematicSet;
74 std::map<std::string, int> m_mSystematics;
75 std::map<std::string, std::string> m_mSystematicsHistNames;
76
77 double (*m_fX)(const xAOD::DiTauJet& xDiTau);
78 double (*m_fY)(const xAOD::DiTauJet& xDiTau);
79 double (*m_fZ)(const xAOD::DiTauJet& xDiTau);
80
81 template<class T>
82 void ReadInputs(TFile* fFile, std::map<std::string, T>& mMap);
83 virtual CP::CorrectionCode getValue(const std::string& sHistName,
84 const xAOD::DiTauJet& xDiTau,
85 double& dCorrectionFactor) const;
86 void generateSystematicSets();
87
88 Gaudi::Property<std::string> m_sInputFilePath{this, "InputFilePath", ""};
89 Gaudi::Property<bool> m_bSkipTruthMatchCheck{this, "SkipTruthMatchCheck", false};
90
91 bool m_bIsData;
92 bool m_bIsConfigured;
93
95 CP::SystematicSet m_sAffectingSystematics;
96 CP::SystematicSet m_sRecommendedSystematics;
97
98private:
99
100 // Execute at each event
101 virtual StatusCode beginEvent();
102
103};
104} // 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.
DiTauJet_v1 DiTauJet
Definition of the current version.
Definition DiTauJet.h:17