CMS 3D CMS Logo

List of all members | Public Member Functions
SherpaPartonSelector Class Reference

Sherpa parton selector derived from the base parton selector. More...

#include <PhysicsTools/JetMCAlgos/interface/SherpaPartonSelector.h>

Inheritance diagram for SherpaPartonSelector:
BasePartonSelector

Public Member Functions

void run (const edm::Handle< reco::GenParticleCollection > &particles, std::unique_ptr< reco::GenParticleRefVector > &partons)
 
 SherpaPartonSelector ()
 
virtual ~SherpaPartonSelector ()
 
- Public Member Functions inherited from BasePartonSelector
 BasePartonSelector ()
 
 ~BasePartonSelector ()
 

Detailed Description

Sherpa parton selector derived from the base parton selector.

Definition at line 11 of file SherpaPartonSelector.h.

Constructor & Destructor Documentation

SherpaPartonSelector::SherpaPartonSelector ( )

This is a Sherpa-specific parton selector that selects all status==11 partons.

Definition at line 10 of file SherpaPartonSelector.cc.

11 {
12 }
SherpaPartonSelector::~SherpaPartonSelector ( )
virtual

Definition at line 14 of file SherpaPartonSelector.cc.

15 {
16 }

Member Function Documentation

void SherpaPartonSelector::run ( const edm::Handle< reco::GenParticleCollection > &  particles,
std::unique_ptr< reco::GenParticleRefVector > &  partons 
)
virtual

Reimplemented from BasePartonSelector.

Definition at line 19 of file SherpaPartonSelector.cc.

References CandMCTagUtils::isParton().

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 }
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:48