00001 #ifndef JETCALIBTOOLS_RESIDUALOFFSETCORRECTION_H
00002 #define JETCALIBTOOLS_RESIDUALOFFSETCORRECTION_H 1
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <TEnv.h>
00012 #include <TAxis.h>
00013
00014 #include "JetCalibTools/IJetCalibrationTool.h"
00015 #include "JetCalibTools/JetCalibrationToolBase.h"
00016 #include "JetCalibTools/CalibrationMethods/NPVBeamspotCorrection.h"
00017
00018 class ResidualOffsetCorrection
00019 : virtual public ::IJetCalibrationTool,
00020 virtual public ::JetCalibrationToolBase
00021 {
00022
00023 ASG_TOOL_CLASS( ResidualOffsetCorrection, IJetCalibrationTool )
00024
00025 public:
00026 ResidualOffsetCorrection();
00027 ResidualOffsetCorrection(const std::string& name);
00028 ResidualOffsetCorrection(const std::string& name, TEnv * config, TString jetAlgo, TString calibAreaTag, bool isData, bool dev);
00029 virtual ~ResidualOffsetCorrection();
00030
00031
00032 virtual StatusCode initializeTool(const std::string& name);
00033
00034 double GetResidualOffset ( double abseta, double mu, double NPV ) const;
00035
00036 private:
00037 double GetResidualOffsetET(double abseta, double mu, double NPV,
00038 std::vector<double> OffsetMu, std::vector<double> OffsetNPV,
00039 TAxis *OffsetBins) const;
00040
00041 double GetNPVBeamspotCorrection(double NPV) const;
00042
00043 private:
00044 TEnv * m_config;
00045 TString m_jetAlgo, m_calibAreaTag;
00046 bool m_dev;
00047 bool m_isData;
00048
00049 NPVBeamspotCorrection * m_npvBeamspotCorr;
00050 JetEventInfo m_eventInfo;
00051
00052 TString m_resOffsetDesc;
00053 TAxis * m_resOffsetBins;
00054 bool m_applyNPVBeamspotCorrection;
00055 double m_muSF;
00056 double m_mu_ref, m_NPV_ref;
00057
00058 std::vector<double> m_resOffsetMu, m_resOffsetNPV;
00059
00060 };
00061
00062 #endif