ATLAS Offline Software
CommonDiTauEfficiencyTool.h
Go to the documentation of this file.
1 
13 #ifndef TAUANALYSISTOOLS_COMMONDITAUEFFICIENCYTOOL_H
14 #define TAUANALYSISTOOLS_COMMONDITAUEFFICIENCYTOOL_H
15 
16 
17 // Framework include(s):
18 #include "AsgTools/AsgTool.h"
19 
20 // EDM include(s):
21 #include "xAODTau/DiTauJet.h"
22 
23 // Local include(s):
24 #include "TauAnalysisTools/Enums.h"
25 // #include "TauAnalysisTools/ITauEfficiencyCorrectionsTool.h"
29 
30 namespace TauAnalysisTools
31 {
33 double TruthLeadPt(const xAOD::DiTauJet& xDiTau);
35 double TruthSubleadPt(const xAOD::DiTauJet& xDiTau);
37 double TruthDeltaR(const xAOD::DiTauJet& xDiTau);
38 
40  : public CommonEfficiencyTool
41  , public virtual IDiTauEfficiencyCorrectionsTool
42 {
45 
46 public:
47 
48  CommonDiTauEfficiencyTool(const std::string& sName);
49 
51 
52  virtual StatusCode initialize() override;
53 
54  // next two lines are needed to achieve overloading of those methods
57 
67  virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::DiTauJet& xDiTau, double& dEfficiencyScaleFactor,
68  unsigned int iRunNumber = 0, unsigned int iMu = 0 ) override;
69 
79  unsigned int iRunNumber = 0, unsigned int iMu = 0 ) override;
80 
82  double (*m_fXDiTau)(const xAOD::DiTauJet& xDiTau);
84  double (*m_fYDiTau)(const xAOD::DiTauJet& xDiTau);
86  double (*m_fZDiTau)(const xAOD::DiTauJet& xDiTau);
87 
88  void ReadInputs(std::unique_ptr<TFile> &fFile);
89 
99  CP::CorrectionCode getValue(const std::string& sHistName,
100  const xAOD::DiTauJet& xDiTau,
101  double& dEfficiencyScaleFactor) const;
102 
104  void generateSystematicSets();
109 
110 };
111 } // namespace TauAnalysisTools
112 
113 #endif // TAUANALYSISTOOLS_COMMONDITAUEFFICIENCYTOOL_H
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
TauAnalysisTools::CommonDiTauEfficiencyTool::getEfficiencyScaleFactor
virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::DiTauJet &xDiTau, double &dEfficiencyScaleFactor, unsigned int iRunNumber=0, unsigned int iMu=0) override
Get the Efficiency Scale Factor of ditau jet.
Definition: CommonDiTauEfficiencyTool.cxx:86
TauAnalysisTools::CommonDiTauEfficiencyTool::~CommonDiTauEfficiencyTool
~CommonDiTauEfficiencyTool()
Definition: CommonDiTauEfficiencyTool.cxx:31
TauAnalysisTools::CommonDiTauEfficiencyTool
Definition: CommonDiTauEfficiencyTool.h:42
Enums.h
TauAnalysisTools::IDiTauEfficiencyCorrectionsTool
Definition: IDiTauEfficiencyCorrectionsTool.h:34
TauAnalysisTools::CommonDiTauEfficiencyTool::m_fXDiTau
double(* m_fXDiTau)(const xAOD::DiTauJet &xDiTau)
scale factor bin x (e.g.
Definition: CommonDiTauEfficiencyTool.h:82
TauAnalysisTools::CommonEfficiencyTool::getEfficiencyScaleFactor
virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::TauJet &tau, double &dEfficiencyScaleFactor, unsigned int iRunNumber=0, unsigned int iMu=0)
Declare the interface that the class provides.
Definition: CommonEfficiencyTool.cxx:155
TauAnalysisTools::TruthSubleadPt
double TruthSubleadPt(const xAOD::DiTauJet &xDiTau)
return the truth vis pT of the subleading pT matched particle.
Definition: CommonDiTauEfficiencyTool.cxx:334
TauAnalysisTools::CommonDiTauEfficiencyTool::generateSystematicSets
void generateSystematicSets()
generate a set of relevant systematic variations to be applied
Definition: CommonDiTauEfficiencyTool.cxx:244
IDiTauEfficiencyCorrectionsTool.h
recommended ditau efficiency correction scale factors and uncertainties
TauAnalysisTools::CommonDiTauEfficiencyTool::applyEfficiencyScaleFactor
virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::DiTauJet &xDiTau, unsigned int iRunNumber=0, unsigned int iMu=0) override
Get the Efficiency Scale Factor of ditau jet.
Definition: CommonDiTauEfficiencyTool.cxx:163
TauAnalysisTools::CommonDiTauEfficiencyTool::m_fYDiTau
double(* m_fYDiTau)(const xAOD::DiTauJet &xDiTau)
scale factor bin y (e.g.
Definition: CommonDiTauEfficiencyTool.h:84
TauAnalysisTools::TruthLeadPt
double TruthLeadPt(const xAOD::DiTauJet &xDiTau)
return the truth vis pT of the leading pT matched particle.
Definition: CommonDiTauEfficiencyTool.cxx:326
TauAnalysisTools::CommonEfficiencyTool::getValue
virtual CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::TauJet &xTau, double &dEfficiencyScaleFactor) const
Definition: CommonEfficiencyTool.cxx:669
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TauAnalysisTools::CommonDiTauEfficiencyTool::CommonDiTauEfficiencyTool
CommonDiTauEfficiencyTool(const std::string &sName)
Create a proper constructor for Athena.
Definition: CommonDiTauEfficiencyTool.cxx:21
TauAnalysisTools::CommonEfficiencyTool
Definition: CommonEfficiencyTool.h:39
TauAnalysisTools::CommonDiTauEfficiencyTool::ReadInputs
void ReadInputs(std::unique_ptr< TFile > &fFile)
Definition: CommonDiTauEfficiencyTool.cxx:192
TauAnalysisTools::CommonDiTauEfficiencyTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: CommonDiTauEfficiencyTool.cxx:43
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
DiTauJet.h
TauAnalysisTools::TruthDeltaR
double TruthDeltaR(const xAOD::DiTauJet &xDiTau)
return the dR of between the leading and subleading pT matched particle.
Definition: CommonDiTauEfficiencyTool.cxx:342
CommonEfficiencyTool.h
TauAnalysisTools::CommonDiTauEfficiencyTool::m_bSFIsAvailableDiTau
bool m_bSFIsAvailableDiTau
true if scale factor name is already decorated
Definition: CommonDiTauEfficiencyTool.h:106
TauAnalysisTools::CommonDiTauEfficiencyTool::m_fZDiTau
double(* m_fZDiTau)(const xAOD::DiTauJet &xDiTau)
scale factor bin z (e.g.
Definition: CommonDiTauEfficiencyTool.h:86
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
xAOD::DiTauJet_v1
Definition: DiTauJet_v1.h:31
TauAnalysisTools::CommonDiTauEfficiencyTool::m_bSFIsAvailableCheckedDiTau
bool m_bSFIsAvailableCheckedDiTau
true if cale factor name is already decorated has already been checked
Definition: CommonDiTauEfficiencyTool.h:108
AsgTool.h
TauAnalysisTools::CommonEfficiencyTool::applyEfficiencyScaleFactor
virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::TauJet &xTau, unsigned int iRunNumber=0, unsigned int iMu=0)
Decorate the tau with its efficiency.
Definition: CommonEfficiencyTool.cxx:275
HelperFunctions.h
TauAnalysisTools::CommonDiTauEfficiencyTool::getValue
CP::CorrectionCode getValue(const std::string &sHistName, const xAOD::DiTauJet &xDiTau, double &dEfficiencyScaleFactor) const
Get the scale factor from a particular recommendations histogram.
Definition: CommonDiTauEfficiencyTool.cxx:296