CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
FFTJetCorrector< Jet, Adjustable > Class Template Reference

#include <FFTJetCorrector.h>

Public Types

typedef AbsFFTJetAdjuster< jet_type, adjustable_typeAbsAdjuster
 
typedef AbsFFTJetScaleCalculator< jet_type, adjustable_typeAbsScaler
 
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 (std::shared_ptr< const AbsAdjuster > adjuster, const std::vector< std::shared_ptr< const AbsScaler > > &scalers, const unsigned i_level, const FFTJetCorrectorApp a)
 
unsigned level () const
 

Private Attributes

std::shared_ptr< const AbsAdjusteradjuster_
 
FFTJetCorrectorApp app_
 
unsigned level_
 
std::vector< std::shared_ptr< const AbsScaler > > scalers_
 

Detailed Description

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

Definition at line 12 of file FFTJetCorrector.h.

Member Typedef Documentation

◆ AbsAdjuster

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

Definition at line 17 of file FFTJetCorrector.h.

◆ AbsScaler

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

Definition at line 16 of file FFTJetCorrector.h.

◆ adjustable_type

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

Definition at line 15 of file FFTJetCorrector.h.

◆ jet_type

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

Definition at line 14 of file FFTJetCorrector.h.

Constructor & Destructor Documentation

◆ FFTJetCorrector()

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

Definition at line 19 of file FFTJetCorrector.h.

23  : adjuster_(adjuster), scalers_(scalers), level_(i_level), app_(a) {}

Member Function Documentation

◆ app()

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

Definition at line 51 of file FFTJetCorrector.h.

51 { return app_; }

References FFTJetCorrector< Jet, Adjustable >::app_.

◆ correct()

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 25 of file FFTJetCorrector.h.

25  {
27  // Do not need to apply this corrector. Simply copy
28  // the transient data from the input to the output.
29  *out = in;
30  else {
31  const unsigned nAdj = scalers_.size();
32  //If we only need a small buffer, use one on the stack
33  // else we will use a std::vector
34  constexpr size_t kStaticBufferSize = 10;
35  double staticBuffer[kStaticBufferSize];
36  std::vector<double> dynamicBuffer;
37  double* buf = nullptr;
38  if (nAdj <= kStaticBufferSize) {
39  buf = &(staticBuffer[0]);
40  } else {
41  dynamicBuffer.resize(nAdj);
42  buf = &(dynamicBuffer[0]);
43  }
44  for (unsigned i = 0; i < nAdj; ++i)
45  buf[i] = scalers_[i]->scale(jet, in);
46  adjuster_->adjust(jet, in, buf, nAdj, out);
47  }
48  }

References FFTJetCorrector< Jet, Adjustable >::adjuster_, FFTJetCorrector< Jet, Adjustable >::app_, visDQMUpload::buf, DATA_ONLY, mps_fire::i, recoMuon::in, submitPVValidationJobs::isMC, metsig::jet, MC_ONLY, MillePedeFileConverter_cfg::out, HLT_FULL_cff::scale, and FFTJetCorrector< Jet, Adjustable >::scalers_.

Referenced by KalmanMuonCorrector.KalmanMuonCorrector::correct_all(), and JetReCalibrator.JetReCalibrator::correctAll().

◆ level()

template<class Jet , class Adjustable >
unsigned FFTJetCorrector< Jet, Adjustable >::level ( ) const
inline

Definition at line 50 of file FFTJetCorrector.h.

50 { return level_; }

References FFTJetCorrector< Jet, Adjustable >::level_.

Member Data Documentation

◆ adjuster_

template<class Jet , class Adjustable >
std::shared_ptr<const AbsAdjuster> FFTJetCorrector< Jet, Adjustable >::adjuster_
private

Definition at line 54 of file FFTJetCorrector.h.

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

◆ app_

template<class Jet , class Adjustable >
FFTJetCorrectorApp FFTJetCorrector< Jet, Adjustable >::app_
private

◆ level_

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

Definition at line 56 of file FFTJetCorrector.h.

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

◆ scalers_

template<class Jet , class Adjustable >
std::vector<std::shared_ptr<const AbsScaler> > FFTJetCorrector< Jet, Adjustable >::scalers_
private

Definition at line 55 of file FFTJetCorrector.h.

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

DATA_ONLY
Definition: FFTJetCorrectorApp.h:6
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.scale
scale
Definition: HLT_FULL_cff.py:6634
FFTJetCorrector::app_
FFTJetCorrectorApp app_
Definition: FFTJetCorrector.h:57
LumiMonitor_cff.scalers
scalers
Definition: LumiMonitor_cff.py:11
submitPVValidationJobs.isMC
list isMC
Definition: submitPVValidationJobs.py:658
FFTJetCorrector::scalers_
std::vector< std::shared_ptr< const AbsScaler > > scalers_
Definition: FFTJetCorrector.h:55
FFTJetCorrector::adjuster_
std::shared_ptr< const AbsAdjuster > adjuster_
Definition: FFTJetCorrector.h:54
a
double a
Definition: hdecay.h:119
recoMuon::in
Definition: RecoMuonEnumerators.h:6
MC_ONLY
Definition: FFTJetCorrectorApp.h:6
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
FFTJetCorrector::level_
unsigned level_
Definition: FFTJetCorrector.h:56
metsig::jet
Definition: SignAlgoResolutions.h:47
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31