CMS 3D CMS Logo

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