CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/JetMETCorrections/FFTJetObjects/interface/L2ResScaleCalculator.h

Go to the documentation of this file.
00001 #ifndef JetMETCorrections_FFTJetObjects_L2ResScaleCalculator_h
00002 #define JetMETCorrections_FFTJetObjects_L2ResScaleCalculator_h
00003 
00004 #include <cassert>
00005 
00006 #include "JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008 #include "FWCore/Utilities/interface/Exception.h"
00009 
00010 class L2ResScaleCalculator : public AbsFFTSpecificScaleCalculator
00011 {
00012 public:
00013     inline explicit L2ResScaleCalculator(const edm::ParameterSet& ps) 
00014         : m_radiusFactor(ps.getParameter<double>("radiusFactor")) {}
00015 
00016     inline virtual ~L2ResScaleCalculator() {}
00017 
00018     inline virtual void mapFFTJet(const reco::Jet& /* jet */,
00019                                   const reco::FFTJet<float>& fftJet,
00020                                   const math::XYZTLorentzVector& current,
00021                                   double* buf, const unsigned dim) const
00022     {
00023         if (dim != 2)
00024             throw cms::Exception("FFTJetBadConfig")
00025                 << "In L2ResScaleCalculator::mapFFTJet: "
00026                 << "invalid table dimensionality: "
00027                 << dim << std::endl;
00028         assert(buf);
00029         const double radius = fftJet.f_recoScale();
00030         buf[0] = radius*m_radiusFactor;
00031         buf[1] = current.eta();
00032     }
00033 
00034 private:
00035     double m_radiusFactor;
00036 };
00037 
00038 #endif // JetMETCorrections_FFTJetObjects_L2ResScaleCalculator_h