00001 #ifndef JETCALIBTOOLS_JMSCORRECTION_H
00002 #define JETCALIBTOOLS_JMSCORRECTION_H 1
00003
00004
00005
00006
00007
00008
00009 #include <TEnv.h>
00010 #include <TAxis.h>
00011 #include <TH2F.h>
00012 #include <TH2D.h>
00013
00014 #include "JetCalibTools/IJetCalibrationTool.h"
00015 #include "JetCalibTools/JetCalibrationToolBase.h"
00016
00017 class JMSCorrection
00018 : virtual public ::IJetCalibrationTool,
00019 virtual public ::JetCalibrationToolBase
00020 {
00021
00022 ASG_TOOL_CLASS( JMSCorrection, IJetCalibrationTool )
00023
00024 public:
00025
00026 typedef std::vector<TH2F*> VecTH2F;
00027 typedef std::vector<TH2D*> VecTH2D;
00028 typedef std::vector<double> VecD;
00029 typedef unsigned int uint;
00030
00031 JMSCorrection();
00032 JMSCorrection(const std::string& name);
00033 JMSCorrection(const std::string& name, TEnv * config, TString jetAlgo, TString calibAreaTag, bool dev);
00034 virtual ~JMSCorrection();
00035
00036 virtual StatusCode initializeTool(const std::string& name);
00037
00038 protected:
00039 virtual StatusCode calibrateImpl(xAOD::Jet& jet, JetEventInfo&) const;
00040
00041 private:
00042 float getMassCorr(double pT_uncorr, double m_uncorr, int etabin) const;
00043 float getTrackAssistedMassCorr(double pT_uncorr, double m_uncorr, int etabin) const;
00044 float getRelCalo(double pT_uncorr, double m_over_pt_uncorr, int etabin) const;
00045 float getRelTA(double pT_uncorr, double m_over_pt_uncorr, int etabin) const;
00046 float getRho(double pT_uncorr, double m_over_pt_uncorr, int etabin) const;
00047
00048 void setMassEtaBins(VecD etabins) {
00049 if (etabins.size()==0) ATH_MSG_ERROR("Please check that the mass eta binning is properly set in your config file");
00050 m_massEtaBins=etabins;
00051 }
00052
00053 void setMassCombinationEtaBins(VecD etabins) {
00054 if (etabins.size()==0) ATH_MSG_ERROR("Please check that the mass combination eta binning is properly set in your config file");
00055 m_massCombinationEtaBins=etabins;
00056 }
00057
00058 private:
00059
00060
00061 TEnv * m_config;
00062 TString m_jetAlgo, m_calibAreaTag, m_jetOutScale;
00063 bool m_dev;
00064
00065 double m_pTMinCorr;
00066
00067 bool m_trackAssistedJetMassCorr;
00068
00069 mutable int m_warning_counter_mTACorr;
00070
00071 bool m_pTfixed;
00072
00073 bool m_combination;
00074 bool m_useCorrelatedWeights;
00075
00076
00077 VecTH2F m_respFactorsMass;
00078 VecD m_massEtaBins;
00079 VecTH2F m_respFactorsTrackAssistedMass;
00080 VecD m_massCombinationEtaBins;
00081 VecTH2D m_caloResolutionMassCombination;
00082 VecTH2D m_taResolutionMassCombination;
00083 VecTH2D m_correlationMapMassCombination;
00084
00085 };
00086
00087 #endif