test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EtaAndPtDependentPeakSelector.cc
Go to the documentation of this file.
1 #include <cmath>
2 
4 
5 namespace fftjetcms {
7  std::istream& in) : ip_(fftjet::LinearInterpolator2d::read(in))
8  {
9  }
10 
12  {
13  delete ip_;
14  }
15 
16  bool EtaAndPtDependentPeakSelector::operator()(const fftjet::Peak& peak)
17  const
18  {
19  const double lookup = (*ip_)(peak.eta(), log(peak.scale()));
20  return peak.magnitude() > exp(lookup);
21  }
22 
24  unsigned nx, double xmin, double xmax,
25  unsigned ny, double ymin, double ymax,
26  const std::vector<double>& data)
27  : lookupTable_(nx, xmin, xmax, ny, ymin, ymax, data)
28  {
29  }
30 
31  bool EtaAndPtLookupPeakSelector::operator()(const fftjet::Peak& peak)
32  const
33  {
34  const double lookup = lookupTable_.closest(peak.eta(),
35  log(peak.scale()));
36  return peak.magnitude() > exp(lookup);
37  }
38 }
bool operator()(const fftjet::Peak &peak) const
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)
bool operator()(const fftjet::Peak &peak) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82