CMS 3D CMS Logo

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

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

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

Inheritance diagram for Pythia8PartonSelector:
BasePartonSelector

Public Member Functions

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

Detailed Description

Pythia8 parton selector derived from the base parton selector.

Definition at line 11 of file Pythia8PartonSelector.h.

Constructor & Destructor Documentation

Pythia8PartonSelector::Pythia8PartonSelector ( )

This is a Pythia8-specific parton selector that selects all status==71 or 72 partons. An explanation of the particle status codes returned by Pythia8 can be found in Pythia8 online manual (http://home.thep.lu.se/~torbjorn/pythia81html/ParticleProperties.html).

Definition at line 12 of file Pythia8PartonSelector.cc.

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

Definition at line 16 of file Pythia8PartonSelector.cc.

17 {
18 }

Member Function Documentation

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

Reimplemented from BasePartonSelector.

Definition at line 21 of file Pythia8PartonSelector.cc.

References CandMCTagUtils::isParton(), and ntuplemaker::status.

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