ATLAS Offline Software
Loading...
Searching...
No Matches
CommonDiTauSmearingTool.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_COMMONDITAUSMEARINGTOOL_H
6#define TAUANALYSISTOOLS_COMMONDITAUSMEARINGTOOL_H
7
8/*
9 author: David Kirchmeier
10 mail: david.kirchmeier@cern.ch
11 documentation in: ../doc/README-DiTauSmearingTool.rst
12*/
13
14// Framework include(s):
17
18// EDM include(s):
19#include "xAODTau/DiTauJet.h"
21
22// Local include(s):
27#include <map>
28#include <unordered_map>
29#include <string>
30
31class TH3;
32class TFile;
33
34namespace ADD_CMODE(TauAnalysisTools)
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)
105
106#endif // TAUANALYSISTOOLS_COMMONEFFICIENCYTOOL_H
107
108
109
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Return value from object correction CP tools.
Class to wrap a set of SystematicVariations.
Base class for dual-use tools that provide file metadata access.
::StatusCode StatusCode
StatusCode definition for legacy code.
DiTauJet_v1 DiTauJet
Definition of the current version.
Definition DiTauJet.h:17
void initialize()