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