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