CMS 3D CMS Logo

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

Detailed Description

Herwig6 parton selector derived from the base parton selector.

Definition at line 10 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 10 of file Herwig6PartonSelector.cc.

10 {}
Herwig6PartonSelector::~Herwig6PartonSelector ( )
override

Definition at line 12 of file Herwig6PartonSelector.cc.

12 {}

Member Function Documentation

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

Reimplemented from BasePartonSelector.

Definition at line 14 of file Herwig6PartonSelector.cc.

References CandMCTagUtils::isParton().

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
20  if (!CandMCTagUtils::isParton(*it))
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