Main Page
Namespaces
Classes
Package Documentation
CommonTools
Utils
interface
PdgIdExcluder.h
Go to the documentation of this file.
1
#ifndef CommonTools_Utils_PdgIdExcluder_h
2
#define CommonTools_Utils_PdgIdExcluder_h
3
/* \class PdgIdExcluder
4
*
5
* \author Luca Lista, INFN
6
*
7
* $Id: PdgIdExcluder.h,v 1.1 2009/02/24 15:01:17 llista Exp $
8
*/
9
#include <vector>
10
#include <algorithm>
11
12
struct
PdgIdExcluder
{
13
explicit
PdgIdExcluder
(
const
std::vector<int> &
pdgId
) {
14
pdgId_
.reserve(pdgId.size());
15
for
(
int
i
: pdgId) {
16
pdgId_
.push_back(
abs
(
i
) );
17
}
18
}
19
template
<
typename
T>
20
bool
operator()
(
const
T
&
t
)
const
{
21
return
std::find
(
pdgId_
.begin(),
pdgId_
.end(),
abs
( t.pdgId() ) ) ==
pdgId_
.end();
22
}
23
private
:
24
std::vector<int>
pdgId_
;
25
};
26
27
#endif
mps_fire.i
i
Definition:
mps_fire.py:338
PdgIdExcluder::operator()
bool operator()(const T &t) const
Definition:
PdgIdExcluder.h:20
PdgIdExcluder::pdgId_
std::vector< int > pdgId_
Definition:
PdgIdExcluder.h:24
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:20
protons_cff.t
t
Definition:
protons_cff.py:34
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
common_cff.pdgId
pdgId
Definition:
common_cff.py:54
PdgIdExcluder::PdgIdExcluder
PdgIdExcluder(const std::vector< int > &pdgId)
Definition:
PdgIdExcluder.h:13
PdgIdExcluder
Definition:
PdgIdExcluder.h:12
T
long double T
Definition:
Basic3DVectorLD.h:66
Generated for CMSSW Reference Manual by
1.8.11