File indexing completed on 2024-04-06 12:01:02
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 <set>
0014
0015 namespace edm {
0016 class ParameterSet;
0017 class EventSetup;
0018 class Event;
0019 class ConsumesCollector;
0020 }
0021 namespace reco {
0022 class Candidate;
0023 }
0024
0025 class GenJetParticleSelector {
0026 public:
0027 GenJetParticleSelector(const edm::ParameterSet&, edm::ConsumesCollector& iC);
0028 bool operator()(const reco::Candidate&);
0029 void init(const edm::EventSetup&);
0030
0031 private:
0032 typedef std::vector<PdtEntry> vpdt;
0033 bool stableOnly_;
0034 bool partons_;
0035 vpdt pdtList_;
0036 bool bInclude_;
0037 std::set<int> pIds_;
0038 const edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> tableToken_;
0039 };
0040
0041 #include "CommonTools/UtilAlgos/interface/EventSetupInitTrait.h"
0042
0043 namespace reco {
0044 namespace modules {
0045 struct GenJetParticleSelectorEventSetupInit {
0046 static void init(GenJetParticleSelector& selector, const edm::Event& evt, const edm::EventSetup& es) {
0047 selector.init(es);
0048 }
0049 };
0050
0051 template <>
0052 struct EventSetupInit<GenJetParticleSelectorEventSetupInit> {
0053 typedef GenJetParticleSelectorEventSetupInit type;
0054 };
0055 }
0056 }
0057
0058 #endif