CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PhiRangeSelector.h
Go to the documentation of this file.
1 #ifndef UtilAlgos_PhiRangeSelector_h
2 #define UtilAlgos_PhiRangeSelector_h
5 
7  PhiRangeSelector(double phiMin, double phiMax) : phiMin_(phiMin), phiMax_(phiMax) {}
8  template <typename T>
9  bool operator()(const T& t) const {
10  double phi = t.phi();
11  return (phi >= phiMin_ && phi <= phiMax_);
12  }
13 
14 private:
15  double phiMin_, phiMax_;
16 };
17 
18 namespace reco {
19  namespace modules {
20  template <>
23  return PhiRangeSelector(cfg.getParameter<double>("phiMin"), cfg.getParameter<double>("phiMax"));
24  }
25  };
26  } // namespace modules
27 } // namespace reco
28 
29 #endif
tuple cfg
Definition: looper.py:296
static PhiRangeSelector make(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
bool operator()(const T &t) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SingleObjectSelector< reco::GsfElectronCollection,::PhiRangeSelector > PhiRangeSelector
Definition: SealModule.cc:17
long double T
PhiRangeSelector(double phiMin, double phiMax)