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::PdgIdExcluder ( const std::vector< int > &  pdgId)
inlineexplicit

Definition at line 13 of file PdgIdExcluder.h.

13  {
14  pdgId_.reserve(pdgId.size());
15  for (int i : pdgId) {
16  pdgId_.push_back(abs(i));
17  }
18  }

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

Member Function Documentation

◆ operator()()

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

Definition at line 20 of file PdgIdExcluder.h.

20  {
21  return std::find(pdgId_.begin(), pdgId_.end(), abs(t.pdgId())) == pdgId_.end();
22  }

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

Member Data Documentation

◆ pdgId_

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

Definition at line 25 of file PdgIdExcluder.h.

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

mps_fire.i
i
Definition: mps_fire.py:355
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
PdgIdExcluder::pdgId_
std::vector< int > pdgId_
Definition: PdgIdExcluder.h:25
OrderedSet.t
t
Definition: OrderedSet.py:90
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:118
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22