CMS 3D CMS Logo

HerwigppPartonSelector.cc
Go to the documentation of this file.
1 
10 
12 
14 
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 }
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:46
void run(const edm::Handle< reco::GenParticleCollection > &particles, std::unique_ptr< reco::GenParticleRefVector > &partons) override