CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PdgIdExcluder Struct Reference

#include <PdgIdExcluder.h>

Public Member Functions

template<typename T >
bool operator() (const T &t) const
 
 PdgIdExcluder (const std::vector< int > &pdgId)
 

Private Attributes

std::vector< int > pdgId_
 

Detailed Description

Definition at line 12 of file PdgIdExcluder.h.

Constructor & Destructor Documentation

PdgIdExcluder::PdgIdExcluder ( const std::vector< int > &  pdgId)
inlineexplicit

Definition at line 13 of file PdgIdExcluder.h.

References funct::abs(), mps_fire::i, and pdgId_.

13  {
14  pdgId_.reserve(pdgId.size());
15  for( int i : pdgId) {
16  pdgId_.push_back( abs( i ) );
17  }
18  }
std::vector< int > pdgId_
Definition: PdgIdExcluder.h:24
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Function Documentation

template<typename T >
bool PdgIdExcluder::operator() ( const T t) const
inline

Definition at line 20 of file PdgIdExcluder.h.

References funct::abs(), spr::find(), and pdgId_.

20  {
21  return std::find( pdgId_.begin(), pdgId_.end(), abs( t.pdgId() ) ) == pdgId_.end();
22  }
std::vector< int > pdgId_
Definition: PdgIdExcluder.h:24
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

std::vector<int> PdgIdExcluder::pdgId_
private

Definition at line 24 of file PdgIdExcluder.h.

Referenced by operator()(), and PdgIdExcluder().