ATLAS Offline Software
CommonDiTauSmearingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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):
16 #include "AsgTools/AnaToolHandle.h"
17 
18 // EDM include(s):
19 #include "xAODTau/DiTauJet.h"
21 
22 // Local include(s):
23 #include "TauAnalysisTools/Enums.h"
28 
29 #include "TH3.h"
30 
31 namespace TauAnalysisTools
32 {
33 
35  : public CommonSmearingTool
36  , public virtual IDiTauSmearingTool
37 {
40 
41 public:
42 
43  CommonDiTauSmearingTool(const std::string& sName);
44 
45  virtual StatusCode initialize() override;
46 
49  virtual CP::CorrectionCode applyCorrection( xAOD::DiTauJet& xDiTau ) override;
52  virtual CP::CorrectionCode correctedCopy( const xAOD::DiTauJet& xDiTau,
53  xAOD::DiTauJet*& xDiTauCopy) override;
54 
55 
56 protected:
57 
58  std::map<std::string, TH3*> m_mDTSF;
59  double (*m_fX)(const xAOD::DiTauJet& xDiTau);
60  double (*m_fY)(const xAOD::DiTauJet& xDiTau);
61  double (*m_fZ)(const xAOD::DiTauJet& xDiTau);
62 
63  template<class T>
64  void ReadInputs(TFile* fFile, std::map<std::string, T>& mMap);
66  virtual CP::CorrectionCode getValue(const std::string& sHistName,
67  const xAOD::DiTauJet& xDiTau,
68  double& dCorrectionFactor) const;
70 
71 };
72 } // namespace TauAnalysisTools
73 
74 #endif // TAUANALYSISTOOLS_COMMONEFFICIENCYTOOL_H
75 
76 
77 
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
Enums.h
TauAnalysisTools::CommonDiTauSmearingTool::m_fX
double(* m_fX)(const xAOD::DiTauJet &xDiTau)
Definition: CommonDiTauSmearingTool.h:59
TauAnalysisTools::CommonDiTauSmearingTool
Definition: CommonDiTauSmearingTool.h:37
TauAnalysisTools::CommonDiTauSmearingTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: CommonDiTauSmearingTool.cxx:35
TauAnalysisTools::CommonDiTauSmearingTool::ReadInputs
void ReadInputs(TFile *fFile, std::map< std::string, T > &mMap)
Definition: CommonDiTauSmearingTool.cxx:160
TauAnalysisTools::CommonSmearingTool
Definition: CommonSmearingTool.h:43
CommonDiTauEfficiencyTool.h
TauAnalysisTools::IDiTauSmearingTool
Definition: IDiTauSmearingTool.h:29
IDiTauSmearingTool.h
TauAnalysisTools::CommonSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::TauJet &xTau) const
Apply the correction on a modifyable object.
Definition: CommonSmearingTool.cxx:148
TauAnalysisTools::CommonDiTauSmearingTool::m_fZ
double(* m_fZ)(const xAOD::DiTauJet &xDiTau)
Definition: CommonDiTauSmearingTool.h:61
TauAnalysisTools::CommonDiTauSmearingTool::getValue
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::DiTauJet &xDiTau, double &dCorrectionFactor) const
Definition: CommonDiTauSmearingTool.cxx:243
TauAnalysisTools::CommonDiTauSmearingTool::m_fY
double(* m_fY)(const xAOD::DiTauJet &xDiTau)
Definition: CommonDiTauSmearingTool.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TauAnalysisTools::CommonDiTauSmearingTool::correctedCopy
virtual CP::CorrectionCode correctedCopy(const xAOD::DiTauJet &xDiTau, xAOD::DiTauJet *&xDiTauCopy) override
Create a corrected copy from a constant ditau.
Definition: CommonDiTauSmearingTool.cxx:138
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
TauAnalysisTools::CommonSmearingTool::getValue
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
Definition: CommonSmearingTool.cxx:500
TauAnalysisTools::CommonDiTauSmearingTool::m_mDTSF
std::map< std::string, TH3 * > m_mDTSF
Definition: CommonDiTauSmearingTool.h:58
DiTauJet.h
TauAnalysisTools::CommonDiTauSmearingTool::generateSystematicSets
void generateSystematicSets()
Definition: CommonDiTauSmearingTool.cxx:185
AnaToolHandle.h
TauAnalysisTools::CommonSmearingTool::correctedCopy
virtual CP::CorrectionCode correctedCopy(const xAOD::TauJet &xTau, xAOD::TauJet *&xTauCopy) const
Create a corrected copy from a constant tau.
Definition: CommonSmearingTool.cxx:246
CommonSmearingTool.h
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
AsgMetadataTool.h
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
xAOD::DiTauJet_v1
Definition: DiTauJet_v1.h:31
CorrectionCode.h
TauAnalysisTools::CommonDiTauSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::DiTauJet &xDiTau) override
Declare the interface that the class provides.
Definition: CommonDiTauSmearingTool.cxx:68
TauAnalysisTools::CommonDiTauSmearingTool::CommonDiTauSmearingTool
CommonDiTauSmearingTool(const std::string &sName)
Create a proper constructor for Athena.
Definition: CommonDiTauSmearingTool.cxx:22
HelperFunctions.h