Main Page
Namespaces
Classes
Package Documentation
PhysicsTools
JetMCAlgos
src
HerwigppPartonSelector.cc
Go to the documentation of this file.
1
8
#include "
PhysicsTools/JetMCAlgos/interface/HerwigppPartonSelector.h
"
9
#include "
PhysicsTools/JetMCUtils/interface/CandMCTag.h
"
10
11
12
HerwigppPartonSelector::HerwigppPartonSelector
()
13
{
14
}
15
16
HerwigppPartonSelector::~HerwigppPartonSelector
()
17
{
18
}
19
20
void
21
HerwigppPartonSelector::run
(
const
edm::Handle<reco::GenParticleCollection>
&
particles
,
22
std::unique_ptr<reco::GenParticleRefVector> &
partons
)
23
{
24
// loop over particles and select partons
25
for
(reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it)
26
{
27
if
( it->status()!=2 )
continue
;
// only accept status==2 particles
28
if
( !
CandMCTagUtils::isParton
( *it ) )
continue
;
// skip particle if not a parton
29
30
partons->push_back(
reco::GenParticleRef
( particles, it - particles->begin() ) );
31
}
32
33
return
;
34
}
edm::Ref< GenParticleCollection >
HerwigppPartonSelector::run
void run(const edm::Handle< reco::GenParticleCollection > &particles, std::unique_ptr< reco::GenParticleRefVector > &partons)
Definition:
HerwigppPartonSelector.cc:21
edm::Handle< reco::GenParticleCollection >
CandMCTag.h
HerwigppPartonSelector.h
HerwigppPartonSelector::~HerwigppPartonSelector
virtual ~HerwigppPartonSelector()
Definition:
HerwigppPartonSelector.cc:16
HadronAndPartonSelector_cfi.particles
particles
Definition:
HadronAndPartonSelector_cfi.py:6
CandMCTagUtils::isParton
bool isParton(const reco::Candidate &c)
Definition:
CandMCTag.cc:48
AK4CaloJetsMCFlavour_cff.partons
partons
Definition:
AK4CaloJetsMCFlavour_cff.py:7
HerwigppPartonSelector::HerwigppPartonSelector
HerwigppPartonSelector()
Definition:
HerwigppPartonSelector.cc:12
Generated for CMSSW Reference Manual by
1.8.11