CMS 3D CMS Logo

EtaAndPtDependentPeakSelector.cc
Go to the documentation of this file.
1 #include <cmath>
2 
4 
5 namespace fftjetcms {
7  : ip_(fftjet::LinearInterpolator2d::read(in)) {}
8 
10 
11  bool EtaAndPtDependentPeakSelector::operator()(const fftjet::Peak& peak) const {
12  const double lookup = (*ip_)(peak.eta(), log(peak.scale()));
13  return peak.magnitude() > exp(lookup);
14  }
15 
17  unsigned nx, double xmin, double xmax, unsigned ny, double ymin, double ymax, const std::vector<double>& data)
18  : lookupTable_(nx, xmin, xmax, ny, ymin, ymax, data) {}
19 
20  bool EtaAndPtLookupPeakSelector::operator()(const fftjet::Peak& peak) const {
21  const double lookup = lookupTable_.closest(peak.eta(), log(peak.scale()));
22  return peak.magnitude() > exp(lookup);
23  }
24 } // namespace fftjetcms
bool operator()(const fftjet::Peak &peak) const override
double closest(double x, double y) const
EtaAndPtLookupPeakSelector(unsigned nx, double xmin, double xmax, unsigned ny, double ymin, double ymax, const std::vector< double > &data)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
bool operator()(const fftjet::Peak &peak) const override