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 TauAnalysisTools
35{
36
38 : public virtual IDiTauSmearingTool
40{
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
61
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;
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;
87
88 Gaudi::Property<std::string> m_sInputFilePath{this, "InputFilePath", ""};
89 Gaudi::Property<bool> m_bSkipTruthMatchCheck{this, "SkipTruthMatchCheck", false};
90
93
97
98private:
99
100 // Execute at each event
101 virtual StatusCode beginEvent();
102
103};
104} // namespace 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.
double(* m_fY)(const xAOD::DiTauJet &xDiTau)
CommonDiTauSmearingTool(const std::string &sName)
Create a proper constructor for Athena.
virtual CP::SystematicSet recommendedSystematics() const
returns: the list of all systematics this tool recommends to use
virtual CP::CorrectionCode applyCorrection(xAOD::DiTauJet &xDiTau) const
Apply the correction on a modifiable object.
std::unordered_map< CP::SystematicSet, std::string > m_mSystematicSets
std::map< std::string, std::string > m_mSystematicsHistNames
double(* m_fX)(const xAOD::DiTauJet &xDiTau)
virtual CP::CorrectionCode correctedCopy(const xAOD::DiTauJet &xDiTau, xAOD::DiTauJet *&xDiTauCopy) const
Create a corrected copy from a constant ditau.
virtual bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const
returns: whether this tool is affected by the given systematics
double(* m_fZ)(const xAOD::DiTauJet &xDiTau)
virtual StatusCode applySystematicVariation(const CP::SystematicSet &sSystematicSet)
configure this tool for the given list of systematic variations.
virtual CP::SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::DiTauJet &xDiTau, double &dCorrectionFactor) const
void ReadInputs(TFile *fFile, std::map< std::string, T > &mMap)
Gaudi::Property< std::string > m_sInputFilePath
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Base class for dual-use tools that provide file metadata access.
DiTauJet_v1 DiTauJet
Definition of the current version.
Definition DiTauJet.h:17