CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackChargeSelector.h
Go to the documentation of this file.
1 #ifndef TrackingForConversion_TrackChargeSelector_h
2 #define TrackingForConversion_TrackChargeSelector_h
3 /* \class TrackChargeSelector
4  *
5  * \author Domenico Giordano, CERN
6  *
7  */
8 
10  TrackChargeSelector( int charge ) : charge_( charge ) { }
11  template<typename T>
12  bool operator()( const T & t ) const {
13  return ( t.charge() == charge_ );
14  }
15 
16 private:
17  int charge_;
18 };
19 
22 
23 namespace reco {
24  namespace modules {
25 
26  template<>
29  return TrackChargeSelector(cfg.getParameter<int>( "charge" ));
30  }
31  };
32 
33  }
34 }
35 
36 #endif
T getParameter(std::string const &) const
static TrackChargeSelector make(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
double charge(const std::vector< uint8_t > &Ampls)
bool operator()(const T &t) const
TrackChargeSelector(int charge)
SingleObjectSelector< TrackCollection,::TrackChargeSelector > TrackChargeSelector
long double T