CMS 3D CMS Logo

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::unique_ptr< reco::GenParticleRefVector > &partons) override
 
 ~Pythia6PartonSelector () override
 
- Public Member Functions inherited from BasePartonSelector
 BasePartonSelector ()
 
virtual ~BasePartonSelector ()
 

Detailed Description

Pythia6 parton selector derived from the base parton selector.

Definition at line 10 of file Pythia6PartonSelector.h.

Constructor & Destructor Documentation

◆ Pythia6PartonSelector()

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 10 of file Pythia6PartonSelector.cc.

10 {}

◆ ~Pythia6PartonSelector()

Pythia6PartonSelector::~Pythia6PartonSelector ( )
override

Definition at line 12 of file Pythia6PartonSelector.cc.

12 {}

Member Function Documentation

◆ run()

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

Reimplemented from BasePartonSelector.

Definition at line 14 of file Pythia6PartonSelector.cc.

References CandMCTagUtils::isParton(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, primaryVertexAssociation_cfi::particles, and dqmAnalyzer_cff::partons.

15  {
16  // loop over particles and select partons
17  for (reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it) {
18  if (it->status() != 2)
19  continue; // only accept status==2 particles
21  continue; // skip particle if not a parton
22 
23  partons->push_back(reco::GenParticleRef(particles, it - particles->begin()));
24  }
25 
26  return;
27 }
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:46