JetMETCorrections
FFTJetObjects
interface
AbsFFTJetScaleCalculator.h
Go to the documentation of this file.
1
#ifndef JetMETCorrections_FFTJetObjects_AbsFFTJetScaleCalculator_h
2
#define JetMETCorrections_FFTJetObjects_AbsFFTJetScaleCalculator_h
3
4
#include "
JetMETCorrections/InterpolationTables/interface/AbsMultivariateFunctor.h
"
5
6
#include <memory>
7
#include <vector>
8
9
template
<
class
Jet,
class
Adjustable>
10
class
AbsFFTJetScaleCalculator
{
11
public
:
12
typedef
Jet
jet_type
;
13
typedef
Adjustable
adjustable_type
;
14
15
inline
explicit
AbsFFTJetScaleCalculator
(std::shared_ptr<npstat::AbsMultivariateFunctor>
f
)
16
:
functor
(
f
),
buffer_
(
f
->minDim()) {}
17
AbsFFTJetScaleCalculator
() =
delete
;
18
19
inline
virtual
~AbsFFTJetScaleCalculator
() {}
20
21
inline
double
scale
(
const
Jet
&
jet
,
const
Adjustable& current)
const
{
22
const
unsigned
dim =
buffer_
.size();
23
double
*
buf
= dim ? &
buffer_
[0] : static_cast<double*>(
nullptr
);
24
this->
map
(jet, current,
buf
, dim);
25
return
(*
functor
)(
buf
, dim);
26
}
27
28
private
:
29
virtual
void
map
(
const
Jet
&
jet
,
const
Adjustable& current,
double
*
buf
,
unsigned
dim)
const
= 0;
30
31
std::shared_ptr<npstat::AbsMultivariateFunctor>
functor
;
32
mutable
std::vector<double>
buffer_
;
33
};
34
35
#endif // JetMETCorrections_FFTJetObjects_AbsFFTJetScaleCalculator_h
AbsFFTJetScaleCalculator::functor
std::shared_ptr< npstat::AbsMultivariateFunctor > functor
Definition:
AbsFFTJetScaleCalculator.h:31
AbsFFTJetScaleCalculator::AbsFFTJetScaleCalculator
AbsFFTJetScaleCalculator()=delete
AbsFFTJetScaleCalculator::~AbsFFTJetScaleCalculator
virtual ~AbsFFTJetScaleCalculator()
Definition:
AbsFFTJetScaleCalculator.h:19
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
AbsFFTJetScaleCalculator::AbsFFTJetScaleCalculator
AbsFFTJetScaleCalculator(std::shared_ptr< npstat::AbsMultivariateFunctor > f)
Definition:
AbsFFTJetScaleCalculator.h:15
AbsFFTJetScaleCalculator::jet_type
Jet jet_type
Definition:
AbsFFTJetScaleCalculator.h:12
Jet
Definition:
Jet.py:1
AbsMultivariateFunctor.h
Interface definition for multidimensional functors.
AbsFFTJetScaleCalculator
Definition:
AbsFFTJetScaleCalculator.h:10
visDQMUpload.buf
buf
Definition:
visDQMUpload.py:160
metsig::jet
Definition:
SignAlgoResolutions.h:47
AbsFFTJetScaleCalculator::adjustable_type
Adjustable adjustable_type
Definition:
AbsFFTJetScaleCalculator.h:13
AbsFFTJetScaleCalculator::buffer_
std::vector< double > buffer_
Definition:
AbsFFTJetScaleCalculator.h:32
AbsFFTJetScaleCalculator::map
virtual void map(const Jet &jet, const Adjustable ¤t, double *buf, unsigned dim) const =0
AbsFFTJetScaleCalculator::scale
double scale(const Jet &jet, const Adjustable ¤t) const
Definition:
AbsFFTJetScaleCalculator.h:21
Generated for CMSSW Reference Manual by
1.8.16