Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
}
jetFlavourId_cff.partons
string partons
Definition:
jetFlavourId_cff.py:53
edm::Ref< GenParticleCollection >
edm::Handle< reco::GenParticleCollection >
HLT_FULL_cff.particles
tuple particles
Definition:
HLT_FULL_cff.py:41082
CandMCTag.h
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.5