File indexing completed on 2024-04-06 12:25:21
0001 #ifndef RecoJets_FFTJetAlgorithm_EtaAndPtDependentPeakSelector_h
0002 #define RecoJets_FFTJetAlgorithm_EtaAndPtDependentPeakSelector_h
0003
0004 #include "fftjet/Peak.hh"
0005 #include "fftjet/SimpleFunctors.hh"
0006 #include "fftjet/LinearInterpolator2d.hh"
0007
0008 #include "RecoJets/FFTJetAlgorithms/interface/LookupTable2d.h"
0009
0010 namespace fftjetcms {
0011
0012
0013
0014
0015
0016
0017 class EtaAndPtDependentPeakSelector : public fftjet::Functor1<bool, fftjet::Peak> {
0018 public:
0019 explicit EtaAndPtDependentPeakSelector(std::istream& in);
0020 EtaAndPtDependentPeakSelector() = delete;
0021 EtaAndPtDependentPeakSelector(const EtaAndPtDependentPeakSelector&) = delete;
0022 EtaAndPtDependentPeakSelector& operator=(const EtaAndPtDependentPeakSelector&) = delete;
0023 ~EtaAndPtDependentPeakSelector() override;
0024
0025 bool operator()(const fftjet::Peak& peak) const override;
0026 inline bool isValid() const { return ip_; }
0027
0028 private:
0029 fftjet::LinearInterpolator2d* ip_;
0030 };
0031
0032
0033
0034 class EtaAndPtLookupPeakSelector : public fftjet::Functor1<bool, fftjet::Peak> {
0035 public:
0036 EtaAndPtLookupPeakSelector(
0037 unsigned nx, double xmin, double xmax, unsigned ny, double ymin, double ymax, const std::vector<double>& data);
0038
0039 bool operator()(const fftjet::Peak& peak) const override;
0040
0041 private:
0042 LookupTable2d lookupTable_;
0043 };
0044 }
0045
0046 #endif