CMS 3D CMS Logo

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