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