CMS 3D CMS Logo

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

Herwig++ parton selector derived from the base parton selector. More...

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

Inheritance diagram for HerwigppPartonSelector:
BasePartonSelector

Public Member Functions

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

Detailed Description

Herwig++ parton selector derived from the base parton selector.

Definition at line 10 of file HerwigppPartonSelector.h.

Constructor & Destructor Documentation

◆ HerwigppPartonSelector()

HerwigppPartonSelector::HerwigppPartonSelector ( )

This is a Herwig++-specific parton selector that selects all status==2 partons. This is likely a temporary choice since Herwig++ status codes in CMSSW currently break the HepMC convention. Once the status codes are fixed, the selector will be updated.

Definition at line 11 of file HerwigppPartonSelector.cc.

11 {}

◆ ~HerwigppPartonSelector()

HerwigppPartonSelector::~HerwigppPartonSelector ( )
override

Definition at line 13 of file HerwigppPartonSelector.cc.

13 {}

Member Function Documentation

◆ run()

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

Reimplemented from BasePartonSelector.

Definition at line 15 of file HerwigppPartonSelector.cc.

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

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