CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

FFTJetCorrector< Jet, Adjustable > Class Template Reference

#include <FFTJetCorrector.h>

List of all members.

Public Types

typedef AbsFFTJetAdjuster
< jet_type, adjustable_type
AbsAdjuster
typedef
AbsFFTJetScaleCalculator
< jet_type, adjustable_type
AbsScaler
typedef Adjustable adjustable_type
typedef Jet jet_type

Public Member Functions

FFTJetCorrectorApp app () const
void correct (const Jet &jet, const bool isMC, const Adjustable &in, Adjustable *out) const
 FFTJetCorrector (boost::shared_ptr< AbsAdjuster > adjuster, const std::vector< boost::shared_ptr< AbsScaler > > &scalers, const unsigned i_level, const FFTJetCorrectorApp a)
unsigned level () const

Private Attributes

boost::shared_ptr< AbsAdjusteradjuster_
FFTJetCorrectorApp app_
std::vector< double > buffer_
unsigned level_
std::vector< boost::shared_ptr
< AbsScaler > > 
scalers_

Detailed Description

template<class Jet, class Adjustable>
class FFTJetCorrector< Jet, Adjustable >

Definition at line 12 of file FFTJetCorrector.h.


Member Typedef Documentation

template<class Jet , class Adjustable >
typedef AbsFFTJetAdjuster<jet_type, adjustable_type> FFTJetCorrector< Jet, Adjustable >::AbsAdjuster

Definition at line 18 of file FFTJetCorrector.h.

template<class Jet , class Adjustable >
typedef AbsFFTJetScaleCalculator<jet_type, adjustable_type> FFTJetCorrector< Jet, Adjustable >::AbsScaler

Definition at line 17 of file FFTJetCorrector.h.

template<class Jet , class Adjustable >
typedef Adjustable FFTJetCorrector< Jet, Adjustable >::adjustable_type

Definition at line 16 of file FFTJetCorrector.h.

template<class Jet , class Adjustable >
typedef Jet FFTJetCorrector< Jet, Adjustable >::jet_type

Definition at line 15 of file FFTJetCorrector.h.


Constructor & Destructor Documentation

template<class Jet , class Adjustable >
FFTJetCorrector< Jet, Adjustable >::FFTJetCorrector ( boost::shared_ptr< AbsAdjuster adjuster,
const std::vector< boost::shared_ptr< AbsScaler > > &  scalers,
const unsigned  i_level,
const FFTJetCorrectorApp  a 
) [inline]

Definition at line 20 of file FFTJetCorrector.h.

        : adjuster_(adjuster), scalers_(scalers),
          buffer_(scalers.size()), level_(i_level), app_(a) {}

Member Function Documentation

template<class Jet , class Adjustable >
FFTJetCorrectorApp FFTJetCorrector< Jet, Adjustable >::app ( ) const [inline]

Definition at line 45 of file FFTJetCorrector.h.

References FFTJetCorrector< Jet, Adjustable >::app_.

{return app_;}
template<class Jet , class Adjustable >
void FFTJetCorrector< Jet, Adjustable >::correct ( const Jet &  jet,
const bool  isMC,
const Adjustable &  in,
Adjustable *  out 
) const [inline]

Definition at line 26 of file FFTJetCorrector.h.

References FFTJetCorrector< Jet, Adjustable >::adjuster_, FFTJetCorrector< Jet, Adjustable >::app_, FFTJetCorrector< Jet, Adjustable >::buffer_, DATA_ONLY, i, recoMuon::in, MC_ONLY, pileupReCalc_HLTpaths::scale, and FFTJetCorrector< Jet, Adjustable >::scalers_.

    {
        if ((isMC && app_ == FFTJetCorrectorApp::DATA_ONLY) ||
            (!isMC && app_ == FFTJetCorrectorApp::MC_ONLY))
            // Do not need to apply this corrector. Simply copy
            // the transient data from the input to the output.
            *out = in;
        else
        {
            const unsigned nAdj = buffer_.size();
            double* buf = nAdj ? &buffer_[0] : static_cast<double*>(0);
            for (unsigned i=0; i<nAdj; ++i)
                buf[i] = scalers_[i]->scale(jet, in);
            adjuster_->adjust(jet, in, buf, nAdj, out);
        }
    }
template<class Jet , class Adjustable >
unsigned FFTJetCorrector< Jet, Adjustable >::level ( void  ) const [inline]

Definition at line 44 of file FFTJetCorrector.h.

References FFTJetCorrector< Jet, Adjustable >::level_.

{return level_;}

Member Data Documentation

template<class Jet , class Adjustable >
boost::shared_ptr<AbsAdjuster> FFTJetCorrector< Jet, Adjustable >::adjuster_ [private]

Definition at line 48 of file FFTJetCorrector.h.

Referenced by FFTJetCorrector< Jet, Adjustable >::correct().

template<class Jet , class Adjustable >
FFTJetCorrectorApp FFTJetCorrector< Jet, Adjustable >::app_ [private]
template<class Jet , class Adjustable >
std::vector<double> FFTJetCorrector< Jet, Adjustable >::buffer_ [mutable, private]

Definition at line 50 of file FFTJetCorrector.h.

Referenced by FFTJetCorrector< Jet, Adjustable >::correct().

template<class Jet , class Adjustable >
unsigned FFTJetCorrector< Jet, Adjustable >::level_ [private]

Definition at line 51 of file FFTJetCorrector.h.

Referenced by FFTJetCorrector< Jet, Adjustable >::level().

template<class Jet , class Adjustable >
std::vector<boost::shared_ptr<AbsScaler> > FFTJetCorrector< Jet, Adjustable >::scalers_ [private]

Definition at line 49 of file FFTJetCorrector.h.

Referenced by FFTJetCorrector< Jet, Adjustable >::correct().