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