Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
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
12
HerwigppPartonSelector::HerwigppPartonSelector
()
13
{
14
}
15
16
HerwigppPartonSelector::~HerwigppPartonSelector
()
17
{
18
}
19
20
void
21
HerwigppPartonSelector::run
(
const
edm::Handle<reco::GenParticleCollection>
& particles,
22
std::auto_ptr<reco::GenParticleRefVector> & partons)
23
{
24
// loop over particles and select partons
25
for
(reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it)
26
{
27
if
( it->status()!=2 )
continue
;
// only accept status==2 particles
28
if
( !
CandMCTagUtils::isParton
( *it ) )
continue
;
// skip particle if not a parton
29
30
partons->push_back(
reco::GenParticleRef
( particles, it - particles->begin() ) );
31
}
32
33
return
;
34
}
CandMCTag.h
HerwigppPartonSelector.h
edm::Handle< reco::GenParticleCollection >
HerwigppPartonSelector::~HerwigppPartonSelector
virtual ~HerwigppPartonSelector()
Definition:
HerwigppPartonSelector.cc:16
HerwigppPartonSelector::run
void run(const edm::Handle< reco::GenParticleCollection > &particles, std::auto_ptr< reco::GenParticleRefVector > &partons)
Definition:
HerwigppPartonSelector.cc:21
CandMCTagUtils::isParton
bool isParton(const reco::Candidate &c)
Definition:
CandMCTag.cc:48
HerwigppPartonSelector::HerwigppPartonSelector
HerwigppPartonSelector()
Definition:
HerwigppPartonSelector.cc:12
edm::Ref< GenParticleCollection >
Generated for CMSSW Reference Manual by
1.8.5