test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
Herwig6PartonSelector Class Reference

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

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

Inheritance diagram for Herwig6PartonSelector:
BasePartonSelector

Public Member Functions

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

Detailed Description

Herwig6 parton selector derived from the base parton selector.

Definition at line 11 of file Herwig6PartonSelector.h.

Constructor & Destructor Documentation

Herwig6PartonSelector::Herwig6PartonSelector ( )

This is a Herwig6-specific parton selector that selects all status==2 partons. An explanation of the particle status codes returned by Herwig6 can be found in Section 8.3.1 of Herwig6 manual (http://arxiv.org/abs/hep-ph/0011363)

Definition at line 11 of file Herwig6PartonSelector.cc.

12 {
13 }
Herwig6PartonSelector::~Herwig6PartonSelector ( )
virtual

Definition at line 15 of file Herwig6PartonSelector.cc.

16 {
17 }

Member Function Documentation

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

Reimplemented from BasePartonSelector.

Definition at line 20 of file Herwig6PartonSelector.cc.

References CandMCTagUtils::isParton().

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