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
Pythia6PartonSelector Class Reference

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

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

Inheritance diagram for Pythia6PartonSelector:
BasePartonSelector

Public Member Functions

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

Detailed Description

Pythia6 parton selector derived from the base parton selector.

Definition at line 11 of file Pythia6PartonSelector.h.

Constructor & Destructor Documentation

Pythia6PartonSelector::Pythia6PartonSelector ( )

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

Definition at line 11 of file Pythia6PartonSelector.cc.

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

Definition at line 15 of file Pythia6PartonSelector.cc.

16 {
17 }

Member Function Documentation

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

Reimplemented from BasePartonSelector.

Definition at line 20 of file Pythia6PartonSelector.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