CMS 3D CMS Logo

List of all members | Public Member Functions
SherpaPartonSelector Class Reference

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

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

Inheritance diagram for SherpaPartonSelector:
BasePartonSelector

Public Member Functions

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

Detailed Description

Sherpa parton selector derived from the base parton selector.

Definition at line 10 of file SherpaPartonSelector.h.

Constructor & Destructor Documentation

◆ SherpaPartonSelector()

SherpaPartonSelector::SherpaPartonSelector ( )

This is a Sherpa-specific parton selector that selects all status==11 partons.

Definition at line 9 of file SherpaPartonSelector.cc.

9 {}

◆ ~SherpaPartonSelector()

SherpaPartonSelector::~SherpaPartonSelector ( )
override

Definition at line 11 of file SherpaPartonSelector.cc.

11 {}

Member Function Documentation

◆ run()

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

Reimplemented from BasePartonSelector.

Definition at line 13 of file SherpaPartonSelector.cc.

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

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