Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
}
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
HerwigppPartonSelector.h
HerwigppPartonSelector::~HerwigppPartonSelector
~HerwigppPartonSelector() override
Definition:
HerwigppPartonSelector.cc:13
CandMCTagUtils::isParton
bool isParton(const reco::Candidate &c)
Definition:
CandMCTag.cc:46
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
Generated for CMSSW Reference Manual by
1.8.5