CMS 3D CMS Logo

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