CMS 3D CMS Logo

List of all members | Public Member Functions
HerwigppPartonSelector Class Reference

Herwig++ parton selector derived from the base parton selector. More...

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

Inheritance diagram for HerwigppPartonSelector:
BasePartonSelector

Public Member Functions

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

Detailed Description

Herwig++ parton selector derived from the base parton selector.

Definition at line 11 of file HerwigppPartonSelector.h.

Constructor & Destructor Documentation

HerwigppPartonSelector::HerwigppPartonSelector ( )

This is a Herwig++-specific parton selector that selects all status==2 partons. This is likely a temporary choice since Herwig++ status codes in CMSSW currently break the HepMC convention. Once the status codes are fixed, the selector will be updated.

Definition at line 12 of file HerwigppPartonSelector.cc.

13 {
14 }
HerwigppPartonSelector::~HerwigppPartonSelector ( )
virtual

Definition at line 16 of file HerwigppPartonSelector.cc.

17 {
18 }

Member Function Documentation

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

Reimplemented from BasePartonSelector.

Definition at line 21 of file HerwigppPartonSelector.cc.

References CandMCTagUtils::isParton().

23 {
24  // loop over particles and select partons
25  for(reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it)
26  {
27  if( it->status()!=2 ) continue; // only accept status==2 particles
28  if( !CandMCTagUtils::isParton( *it ) ) continue; // skip particle if not a parton
29 
30  partons->push_back( reco::GenParticleRef( particles, it - particles->begin() ) );
31  }
32 
33  return;
34 }
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:48