CMS 3D CMS Logo

SherpaPartonSelector.cc
Go to the documentation of this file.
1 
8 
9 
11 {
12 }
13 
15 {
16 }
17 
18 void
20  std::unique_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 }
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:48
void run(const edm::Handle< reco::GenParticleCollection > &particles, std::unique_ptr< reco::GenParticleRefVector > &partons)