CMS 3D CMS Logo

PhiRangeSelector.h
Go to the documentation of this file.
1 #ifndef UtilAlgos_PhiRangeSelector_h
2 #define UtilAlgos_PhiRangeSelector_h
5 
6 
8  PhiRangeSelector( double phiMin, double phiMax ) :
9  phiMin_( phiMin ), phiMax_( phiMax ) { }
10  template<typename T>
11  bool operator()( const T & t ) const {
12  double phi = t.phi();
13  return ( phi >= phiMin_ && phi <= phiMax_ );
14  }
15 private:
16  double phiMin_, phiMax_;
17 };
18 
19 
20 namespace reco {
21  namespace modules {
22  template<>
25  return PhiRangeSelector(cfg.getParameter<double>("phiMin"),
26  cfg.getParameter<double>("phiMax") );
27  }
28  };
29  }
30 }
31 
32 #endif
T getParameter(std::string const &) const
static PhiRangeSelector make(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
bool operator()(const T &t) const
fixed size matrix
long double T
PhiRangeSelector(double phiMin, double phiMax)