CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:25
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:25
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

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

Definition at line 25 of file PdgIdExcluder.h.

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