ATLAS Offline Software
ResidualOffsetCorrection.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 JETCALIBTOOLS_RESIDUALOFFSETCORRECTION_H
6 #define JETCALIBTOOLS_RESIDUALOFFSETCORRECTION_H 1
7 
8 /* Implementation of ResidualOffsetCorrection class
9  * This class will apply the residual offset pile up correction
10  *
11  * Author: Joe Taenzer (joseph.taenzer@cern.ch)
12  * Date: August 15 2013
13  */
14 
15 
18 #include "TString.h"
19 #include <vector>
20 #include <string>
21 
22 class TEnv;
23 class TAxis;
25 
27 {
28 
29  public:
31  ResidualOffsetCorrection(const std::string& name, TEnv* config, TString jetAlgo, TString calibAreaTag, bool isData, bool dev);
32  virtual ~ResidualOffsetCorrection();
33 
34  virtual StatusCode initialize();
35 
36  double GetResidualOffset ( double abseta, double mu, double NPV, int nJet, bool MuOnly, bool NOnly ) const;
37 
38  private:
39  double GetResidualOffsetET(double abseta, double mu, double NPV, int nJet, bool MuOnly, bool NOnly,
40  const std::vector<double>& OffsetMu,
41  const std::vector<double>& OffsetNPV,
42  const std::vector<double>& OffsetNjet,
43  const TAxis *OffsetBins) const;
44 
45  double GetNPVBeamspotCorrection(double NPV) const;
46 
47  private:
48  TEnv * m_config{};
50  bool m_dev{};
51  bool m_isData{};
52  static constexpr float m_GeV = 1000;
53 
55 
56  TString m_resOffsetDesc;
57  TAxis * m_resOffsetBins{};
59  double m_muSF{};
60  double m_mu_ref{}, m_NPV_ref{}, m_nJet_ref{};
61  bool m_useNjet{};
62 
64 
65 };
66 
67 #endif
ResidualOffsetCorrection::m_npvBeamspotCorr
NPVBeamspotCorrection * m_npvBeamspotCorr
Definition: ResidualOffsetCorrection.h:54
ResidualOffsetCorrection::m_resOffsetNjet
std::vector< double > m_resOffsetNjet
Definition: ResidualOffsetCorrection.h:63
ResidualOffsetCorrection::m_config
TEnv * m_config
Definition: ResidualOffsetCorrection.h:48
ResidualOffsetCorrection::m_applyNPVBeamspotCorrection
bool m_applyNPVBeamspotCorrection
Definition: ResidualOffsetCorrection.h:58
ResidualOffsetCorrection::m_resOffsetDesc
TString m_resOffsetDesc
Definition: ResidualOffsetCorrection.h:56
ResidualOffsetCorrection
Definition: ResidualOffsetCorrection.h:27
ResidualOffsetCorrection::m_muSF
double m_muSF
Definition: ResidualOffsetCorrection.h:59
ResidualOffsetCorrection::ResidualOffsetCorrection
ResidualOffsetCorrection()
Definition: ResidualOffsetCorrection.cxx:15
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
AsgMessaging.h
ResidualOffsetCorrection::initialize
virtual StatusCode initialize()
Definition: ResidualOffsetCorrection.cxx:34
ResidualOffsetCorrection::m_mu_ref
double m_mu_ref
Definition: ResidualOffsetCorrection.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
jet::PileupComp::OffsetNPV
@ OffsetNPV
Definition: UncertaintyEnum.h:165
ResidualOffsetCorrection::m_jetAlgo
TString m_jetAlgo
Definition: ResidualOffsetCorrection.h:49
StatusCode.h
ResidualOffsetCorrection::m_resOffsetMu
std::vector< double > m_resOffsetMu
Definition: ResidualOffsetCorrection.h:63
ResidualOffsetCorrection::m_isData
bool m_isData
Definition: ResidualOffsetCorrection.h:51
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
ResidualOffsetCorrection::GetResidualOffset
double GetResidualOffset(double abseta, double mu, double NPV, int nJet, bool MuOnly, bool NOnly) const
Definition: ResidualOffsetCorrection.cxx:118
jet::PileupComp::OffsetMu
@ OffsetMu
Definition: UncertaintyEnum.h:166
ResidualOffsetCorrection::m_calibAreaTag
TString m_calibAreaTag
Definition: ResidualOffsetCorrection.h:49
ResidualOffsetCorrection::m_resOffsetNPV
std::vector< double > m_resOffsetNPV
Definition: ResidualOffsetCorrection.h:63
ResidualOffsetCorrection::m_NPV_ref
double m_NPV_ref
Definition: ResidualOffsetCorrection.h:60
ResidualOffsetCorrection::m_GeV
static constexpr float m_GeV
Definition: ResidualOffsetCorrection.h:52
ResidualOffsetCorrection::~ResidualOffsetCorrection
virtual ~ResidualOffsetCorrection()
Definition: ResidualOffsetCorrection.cxx:27
ResidualOffsetCorrection::GetNPVBeamspotCorrection
double GetNPVBeamspotCorrection(double NPV) const
Definition: ResidualOffsetCorrection.cxx:179
ResidualOffsetCorrection::m_useNjet
bool m_useNjet
Definition: ResidualOffsetCorrection.h:61
ResidualOffsetCorrection::GetResidualOffsetET
double GetResidualOffsetET(double abseta, double mu, double NPV, int nJet, bool MuOnly, bool NOnly, const std::vector< double > &OffsetMu, const std::vector< double > &OffsetNPV, const std::vector< double > &OffsetNjet, const TAxis *OffsetBins) const
Definition: ResidualOffsetCorrection.cxx:124
ResidualOffsetCorrection::m_resOffsetBins
TAxis * m_resOffsetBins
Definition: ResidualOffsetCorrection.h:57
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
ResidualOffsetCorrection::m_dev
bool m_dev
Definition: ResidualOffsetCorrection.h:50
NPVBeamspotCorrection
Definition: NPVBeamspotCorrection.h:21
ResidualOffsetCorrection::m_nJet_ref
double m_nJet_ref
Definition: ResidualOffsetCorrection.h:60