File indexing completed on 2025-02-05 23:51:09
0001 #ifndef GenJetParticleSelector_h
0002 #define GenJetParticleSelector_h
0003
0004
0005
0006
0007
0008
0009
0010 #include "SimGeneral/HepPDTRecord/interface/PdtEntry.h"
0011 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
0012 #include "FWCore/Utilities/interface/ESGetToken.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0014 #include <set>
0015
0016 namespace edm {
0017 class ParameterSet;
0018 class EventSetup;
0019 class Event;
0020 class ConsumesCollector;
0021 }
0022 namespace reco {
0023 class Candidate;
0024 }
0025
0026 class GenJetParticleSelector {
0027 public:
0028 GenJetParticleSelector(const edm::ParameterSet&, edm::ConsumesCollector& iC);
0029 bool operator()(const reco::Candidate&);
0030 void init(const edm::EventSetup&);
0031
0032 static void fillPSetDescription(edm::ParameterSetDescription& desc);
0033
0034 private:
0035 typedef std::vector<PdtEntry> vpdt;
0036 bool stableOnly_;
0037 bool partons_;
0038 vpdt pdtList_;
0039 bool bInclude_;
0040 std::set<int> pIds_;
0041 const edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> tableToken_;
0042 };
0043
0044 #include "CommonTools/UtilAlgos/interface/EventSetupInitTrait.h"
0045
0046 namespace reco {
0047 namespace modules {
0048 struct GenJetParticleSelectorEventSetupInit {
0049 static void init(GenJetParticleSelector& selector, const edm::Event& evt, const edm::EventSetup& es) {
0050 selector.init(es);
0051 }
0052
0053 static void fillPSetDescription(edm::ParameterSetDescription& desc) {
0054 GenJetParticleSelector::fillPSetDescription(desc);
0055 }
0056 };
0057
0058 template <>
0059 struct EventSetupInit<GenJetParticleSelectorEventSetupInit> {
0060 typedef GenJetParticleSelectorEventSetupInit type;
0061 };
0062 }
0063 }
0064
0065 #endif