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::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::~Herwig6PartonSelector ( )
override

Definition at line 12 of file Herwig6PartonSelector.cc.

12 {}

Member Function Documentation

◆ run()

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.

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 }

References CandMCTagUtils::isParton(), ecalTrigSettings_cff::particles, and dqmAnalyzer_cff::partons.

CandMCTagUtils::isParton
bool isParton(const reco::Candidate &c)
Definition: CandMCTag.cc:46
ecalTrigSettings_cff.particles
particles
Definition: ecalTrigSettings_cff.py:11
edm::Ref< GenParticleCollection >
dqmAnalyzer_cff.partons
partons
Definition: dqmAnalyzer_cff.py:27