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
HerwigppPartonSelector::HerwigppPartonSelector
() {}
12
13
HerwigppPartonSelector::~HerwigppPartonSelector
() {}
14
15
void
HerwigppPartonSelector::run
(
const
edm::Handle<reco::GenParticleCollection>
&
particles
,
16
std::unique_ptr<reco::GenParticleRefVector>&
partons
) {
17
// loop over particles and select partons
18
for
(reco::GenParticleCollection::const_iterator it =
particles
->begin(); it !=
particles
->end(); ++it) {
19
if
(it->status() != 2)
20
continue
;
// only accept status==2 particles
21
if
(!
CandMCTagUtils::isParton
(*it))
22
continue
;
// skip particle if not a parton
23
24
partons
->push_back(
reco::GenParticleRef
(
particles
, it -
particles
->begin()));
25
}
26
27
return
;
28
}
CandMCTag.h
CandMCTagUtils::isParton
bool isParton(const reco::Candidate &c)
Definition:
CandMCTag.cc:46
edm::Handle< reco::GenParticleCollection >
ecalTrigSettings_cff.particles
particles
Definition:
ecalTrigSettings_cff.py:11
edm::Ref< GenParticleCollection >
dqmAnalyzer_cff.partons
partons
Definition:
dqmAnalyzer_cff.py:27
HerwigppPartonSelector::run
void run(const edm::Handle< reco::GenParticleCollection > &particles, std::unique_ptr< reco::GenParticleRefVector > &partons) override
Definition:
HerwigppPartonSelector.cc:15
HerwigppPartonSelector::HerwigppPartonSelector
HerwigppPartonSelector()
Definition:
HerwigppPartonSelector.cc:11
HerwigppPartonSelector.h
HerwigppPartonSelector::~HerwigppPartonSelector
~HerwigppPartonSelector() override
Definition:
HerwigppPartonSelector.cc:13
Generated for CMSSW Reference Manual by
1.8.16