CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Herwig6PartonSelector.cc
Go to the documentation of this file.
1 
9 
11 
13 
15  std::unique_ptr<reco::GenParticleRefVector>& partons) {
16  // loop over particles and select partons
17  for (reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it) {
18  if (it->status() != 2)
19  continue; // only accept status==2 particles
20  if (!CandMCTagUtils::isParton(*it))
21  continue; // skip particle if not a parton
22 
23  partons->push_back(reco::GenParticleRef(particles, it - particles->begin()));
24  }
25 
26  return;
27 }
void run(const edm::Handle< reco::GenParticleCollection > &particles, std::unique_ptr< reco::GenParticleRefVector > &partons) override
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:46