CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoJets/FFTJetAlgorithms/interface/PileupGrid2d.h

Go to the documentation of this file.
00001 //=========================================================================
00002 // PileupGrid2d.h
00003 //
00004 // Simple table in the eta-phi space which multiplies the pile-up rho
00005 //
00006 // I. Volobouev
00007 // June 2011
00008 //=========================================================================
00009 
00010 #ifndef RecoJets_FFTJetAlgorithms_PileupGrid2d_h
00011 #define RecoJets_FFTJetAlgorithms_PileupGrid2d_h
00012 
00013 #include "fftjet/Grid2d.hh"
00014 
00015 #include "RecoJets/FFTJetAlgorithms/interface/fftjetTypedefs.h"
00016 #include "RecoJets/FFTJetAlgorithms/interface/AbsPileupCalculator.h"
00017 
00018 namespace fftjetcms {
00019     class PileupGrid2d : public AbsPileupCalculator
00020     {
00021     public:
00022         inline explicit PileupGrid2d(const fftjet::Grid2d<Real>& g,
00023                                      const double rhoFactor)
00024             : grid_(g), rhoFactor_(rhoFactor) {}
00025 
00026         inline virtual ~PileupGrid2d() {}
00027 
00028         inline virtual double operator()(
00029             const double eta, const double phi,
00030             const reco::FFTJetPileupSummary& summary) const
00031         {
00032             return rhoFactor_ * summary.pileupRho() *
00033                    grid_.coordValue(eta, phi);
00034         }
00035 
00036         inline virtual bool isPhiDependent() const {return true;}
00037 
00038     private:
00039         fftjet::Grid2d<Real> grid_;
00040         double rhoFactor_;
00041     };
00042 }
00043 
00044 #endif // RecoJets_FFTJetAlgorithms_PileupGrid2d_h