CMS 3D CMS Logo

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