1 #ifndef RecoJets_FFTJetAlgorithms_ScaleCalculators_h 2 #define RecoJets_FFTJetAlgorithms_ScaleCalculators_h 7 #include "fftjet/SimpleFunctors.hh" 8 #include "fftjet/RecombinedJet.hh" 9 #include "fftjet/LinearInterpolator2d.hh" 10 #include "fftjet/JetMagnitudeMapper2d.hh" 16 template <
typename Arg1>
21 inline double operator()(
const Arg1&)
const override {
return c_; }
33 inline double operator()(
const T& r)
const override {
return r.scale() *
c_; }
56 const fftjet::Functor1<double, T>*
func_;
65 const fftjet::Functor1<double, T>*
f2,
66 const bool takeOwnership =
false)
77 inline double operator()(
const T& r)
const override {
return (*
f1_)((*f2_)(r)); }
80 const fftjet::Functor1<double, double>*
f1_;
81 const fftjet::Functor1<double, T>*
f2_;
90 const fftjet::Functor1<double, T>*
f2,
91 const bool takeOwnership =
false)
105 const fftjet::Functor1<double, T>*
f1_;
106 const fftjet::Functor1<double, T>*
f2_;
123 inline double operator()(
const T& r)
const override {
return (*
f1_)(r.magnitude()); }
126 const fftjet::Functor1<double, double>*
f1_;
133 inline PeakEtaDependent(
const fftjet::Functor1<double, double>*
f1,
const bool takeOwnership =
false)
142 inline double operator()(
const fftjet::Peak& r)
const override {
return (*
f1_)(r.eta()); }
145 const fftjet::Functor1<double, double>*
f1_;
152 const bool takeOwnership,
153 const fftjet::JetMagnitudeMapper2d<fftjet::Peak>* jmmp,
166 inline double operator()(
const fftjet::Peak& r)
const override {
167 const double scale = r.scale();
168 const double magnitude = r.magnitude();
170 const double partonpt = (*jmmp_)(
pt, r);
175 const fftjet::LinearInterpolator2d*
f1_;
177 const fftjet::JetMagnitudeMapper2d<fftjet::Peak>*
jmmp_;
183 class JetEtaDependent :
public fftjet::Functor1<double, fftjet::RecombinedJet<VectorLike> > {
185 inline JetEtaDependent(
const fftjet::Functor1<double, double>*
f1,
const bool takeOwnership =
false)
194 inline double operator()(
const fftjet::RecombinedJet<VectorLike>& r)
const override {
195 return (*
f1_)(r.vec().eta());
199 const fftjet::Functor1<double, double>*
f1_;
231 #endif // RecoJets_FFTJetAlgorithms_ScaleCalculators_h const fftjet::Functor1< double, double > * f1_
~PeakEtaMagSsqDependent() override
const fftjet::Functor1< double, T > * func_
~JetEtaDependent() override
double operator()(const fftjet::Peak &r) const override
MultiplyByConst(const double factor, const fftjet::Functor1< double, T > *f, const bool takeOwnership=false)
double operator()(const double &x) const override
ProportionalToScale()=delete
JetEtaDependent(const fftjet::Functor1< double, double > *f1, const bool takeOwnership=false)
PeakEtaDependent()=delete
const fftjet::Functor1< double, T > * f1_
const bool ownsjmmpPointer_
double operator()(const T &r) const override
~PeakEtaDependent() override
~CompositeFunctor() override
const fftjet::Functor1< double, double > * f1_
ProportionalToScale(const double value)
double operator()(const T &r) const override
MagnitudeDependent(const fftjet::Functor1< double, double > *f1, const bool takeOwnership=false)
~ProductFunctor() override
double operator()(const Arg1 &) const override
MagnitudeDependent()=delete
const fftjet::Functor1< double, T > * f2_
CompositeFunctor(const fftjet::Functor1< double, double > *f1, const fftjet::Functor1< double, T > *f2, const bool takeOwnership=false)
double operator()(const fftjet::RecombinedJet< VectorLike > &r) const override
ProductFunctor(const fftjet::Functor1< double, T > *f1, const fftjet::Functor1< double, T > *f2, const bool takeOwnership=false)
Polynomial(const std::vector< double > &coeffs)
PeakEtaMagSsqDependent(const fftjet::LinearInterpolator2d *f1, const bool takeOwnership, const fftjet::JetMagnitudeMapper2d< fftjet::Peak > *jmmp, const bool ownjmp, const double fc)
double operator()(const T &r) const override
Abs< T >::type abs(const T &t)
const fftjet::LinearInterpolator2d * f1_
PeakEtaDependent(const fftjet::Functor1< double, double > *f1, const bool takeOwnership=false)
const fftjet::Functor1< double, double > * f1_
CompositeFunctor()=delete
~MagnitudeDependent() override
const fftjet::Functor1< double, T > * f2_
double operator()(const T &r) const override
double operator()(const T &r) const override
const fftjet::JetMagnitudeMapper2d< fftjet::Peak > * jmmp_
~MultiplyByConst() override
double operator()(const fftjet::Peak &r) const override
PeakEtaMagSsqDependent()=delete
const fftjet::Functor1< double, double > * f1_
ConstDouble(const double value)