CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L2AbsScaleCalculator Class Reference

#include <L2AbsScaleCalculator.h>

Inheritance diagram for L2AbsScaleCalculator:
AbsFFTSpecificScaleCalculator

Public Member Functions

 L2AbsScaleCalculator (const edm::ParameterSet &ps)
 
void mapFFTJet (const reco::Jet &, const reco::FFTJet< float > &fftJet, const math::XYZTLorentzVector &current, double *buf, const unsigned dim) const override
 
 ~L2AbsScaleCalculator () override
 
- Public Member Functions inherited from AbsFFTSpecificScaleCalculator
virtual ~AbsFFTSpecificScaleCalculator ()
 

Private Attributes

double m_radiusFactor
 
bool m_takePtLog
 
double m_zeroPtLog
 

Detailed Description

Definition at line 11 of file L2AbsScaleCalculator.h.

Constructor & Destructor Documentation

◆ L2AbsScaleCalculator()

L2AbsScaleCalculator::L2AbsScaleCalculator ( const edm::ParameterSet ps)
inlineexplicit

Definition at line 13 of file L2AbsScaleCalculator.h.

14  : m_radiusFactor(ps.getParameter<double>("radiusFactor")),
15  m_zeroPtLog(ps.getParameter<double>("zeroPtLog")),
16  m_takePtLog(ps.getParameter<bool>("takePtLog")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

◆ ~L2AbsScaleCalculator()

L2AbsScaleCalculator::~L2AbsScaleCalculator ( )
inlineoverride

Definition at line 18 of file L2AbsScaleCalculator.h.

18 {}

Member Function Documentation

◆ mapFFTJet()

void L2AbsScaleCalculator::mapFFTJet ( const reco::Jet ,
const reco::FFTJet< float > &  fftJet,
const math::XYZTLorentzVector current,
double *  buf,
const unsigned  dim 
) const
inlineoverridevirtual

Implements AbsFFTSpecificScaleCalculator.

Definition at line 20 of file L2AbsScaleCalculator.h.

References cms::cuda::assert(), visDQMUpload::buf, Exception, reco::FFTJet< Real >::f_recoScale(), dqm-mbProfile::log, m_radiusFactor, m_takePtLog, m_zeroPtLog, DiDispStaMuonMonitor_cfi::pt, and CosmicsPD_Skims::radius.

24  {
25  if (dim != 2)
26  throw cms::Exception("FFTJetBadConfig") << "In L2AbsScaleCalculator::mapFFTJet: "
27  << "invalid table dimensionality: " << dim << std::endl;
28  assert(buf);
29  const double radius = fftJet.f_recoScale();
30  const double pt = current.pt();
31  buf[0] = radius * m_radiusFactor;
32  if (m_takePtLog) {
33  if (pt > 0.0)
34  buf[1] = log(pt);
35  else
36  buf[1] = m_zeroPtLog;
37  } else
38  buf[1] = pt;
39  }
assert(be >=bs)
Real f_recoScale() const
Definition: FFTJet.h:85

Member Data Documentation

◆ m_radiusFactor

double L2AbsScaleCalculator::m_radiusFactor
private

Definition at line 42 of file L2AbsScaleCalculator.h.

Referenced by mapFFTJet().

◆ m_takePtLog

bool L2AbsScaleCalculator::m_takePtLog
private

Definition at line 44 of file L2AbsScaleCalculator.h.

Referenced by mapFFTJet().

◆ m_zeroPtLog

double L2AbsScaleCalculator::m_zeroPtLog
private

Definition at line 43 of file L2AbsScaleCalculator.h.

Referenced by mapFFTJet().