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
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
tuple t
Definition: tree.py:139
tuple cfg
Definition: looper.py:259
static PhiRangeSelector make(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
bool operator()(const T &t) const
SingleObjectSelector< reco::GsfElectronCollection,::PhiRangeSelector > PhiRangeSelector
Definition: SealModule.cc:25
long double T
PhiRangeSelector(double phiMin, double phiMax)