File indexing completed on 2024-04-06 12:23:34
0001
0002
0003
0004
0005
0006 #include "PhysicsTools/JetMCAlgos/interface/SherpaPartonSelector.h"
0007 #include "PhysicsTools/JetMCUtils/interface/CandMCTag.h"
0008
0009 SherpaPartonSelector::SherpaPartonSelector() {}
0010
0011 SherpaPartonSelector::~SherpaPartonSelector() {}
0012
0013 void SherpaPartonSelector::run(const edm::Handle<reco::GenParticleCollection>& particles,
0014 std::unique_ptr<reco::GenParticleRefVector>& partons) {
0015
0016 for (reco::GenParticleCollection::const_iterator it = particles->begin(); it != particles->end(); ++it) {
0017 if (it->status() != 11)
0018 continue;
0019 if (!CandMCTagUtils::isParton(*it))
0020 continue;
0021
0022 partons->push_back(reco::GenParticleRef(particles, it - particles->begin()));
0023 }
0024
0025 return;
0026 }