CMS 3D CMS Logo

SherpaPartonSelector.cc
Go to the documentation of this file.
1 
8 
10 
12 
14  std::unique_ptr<reco::GenParticleRefVector>& partons) {
15  // loop over particles and select partons
16  for (reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it) {
17  if (it->status() != 11)
18  continue; // only accept status==11 particles
20  continue; // skip particle if not a parton
21 
22  partons->push_back(reco::GenParticleRef(particles, it - particles->begin()));
23  }
24 
25  return;
26 }
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