CMS 3D CMS Logo

Pythia6PartonSelector.cc
Go to the documentation of this file.
1 
9 
10 
12 {
13 }
14 
16 {
17 }
18 
19 void
21  std::unique_ptr<reco::GenParticleRefVector> & partons)
22 {
23  // loop over particles and select partons
24  for(reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it)
25  {
26  if( it->status()!=2 ) continue; // only accept status==2 particles
27  if( !CandMCTagUtils::isParton( *it ) ) continue; // skip particle if not a parton
28 
29  partons->push_back( reco::GenParticleRef( particles, it - particles->begin() ) );
30  }
31 
32  return;
33 }
void run(const edm::Handle< reco::GenParticleCollection > &particles, std::unique_ptr< reco::GenParticleRefVector > &partons) override
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:48