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