00001 #ifndef JETCALIBTOOLS_ETAJESCORRECTION_H
00002 #define JETCALIBTOOLS_ETAJESCORRECTION_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
00017 class EtaJESCorrection
00018 : virtual public ::IJetCalibrationTool,
00019 virtual public ::JetCalibrationToolBase
00020 {
00021
00022 ASG_TOOL_CLASS( EtaJESCorrection, IJetCalibrationTool )
00023
00024 public:
00025 EtaJESCorrection();
00026 EtaJESCorrection(const std::string& name);
00027 EtaJESCorrection(const std::string& name, TEnv * config, TString jetAlgo, TString calibAreaTag, bool mass, bool dev);
00028 virtual ~EtaJESCorrection();
00029
00030
00031 virtual StatusCode initializeTool(const std::string& name);
00032
00033 protected:
00034 virtual StatusCode calibrateImpl(xAOD::Jet& jet, JetEventInfo&) const;
00035
00036 private:
00037 double getJES(double E_uncorr, double eta_det) const;
00038 double getLowPtJES(double E_uncorr, double eta_det) const;
00039 double getEtaCorr(double E_corr, double eta_det) const;
00040 double getMassCorr(double E_corr, double eta_det) const;
00041 double getLogPolN(const double *factors, double x) const;
00042 double getLogPolNSlope(const double *factors, double x) const;
00043 int getEtaBin(double eta_det) const;
00044
00045 private:
00046 TEnv * m_config;
00047 TString m_jetAlgo;
00048 TString m_calibAreaTag;
00049 bool m_mass;
00050 bool m_dev;
00051 bool m_freezeJESatHighE;
00052
00053 TString m_jesDesc;
00054 double m_minPt_JES, m_minPt_EtaCorr, m_maxE_EtaCorr;
00055 unsigned int m_lowPtExtrap;
00056 double m_lowPtMinR;
00057 bool m_applyMassCorrection;
00058 bool m_useSecondaryminPt_JES;
00059 double m_etaSecondaryminPt_JES;
00060 double m_secondaryminPt_JES;
00061
00062 TAxis * m_etaBinAxis;
00063
00064
00065 const static unsigned int s_nEtaBins=90;
00066 const static unsigned int s_nParMin=7;
00067 const static unsigned int s_nParMax=9;
00068 unsigned int s_nPar;
00069 double m_JESFactors[s_nEtaBins][s_nParMax];
00070 double m_JES_MinPt_Slopes[s_nEtaBins];
00071 double m_JES_MinPt_E[s_nEtaBins];
00072 double m_JES_MinPt_R[s_nEtaBins];
00073
00074 double m_JES_MinPt_Param1[s_nEtaBins];
00075 double m_JES_MinPt_Param2[s_nEtaBins];
00076 double m_etaCorrFactors[s_nEtaBins][s_nParMax];
00077 double m_JMSFactors[s_nEtaBins][s_nParMax];
00078 double m_energyFreezeJES[s_nEtaBins];
00079
00080 };
00081
00082 #endif