Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:02

0001 #ifndef GenJetParticleSelector_h
0002 #define GenJetParticleSelector_h
0003 /* \class GenJetParticleSelector
0004  *
0005  * \author Luca Lista, INFN
0006  *
0007  * \version $Id: GenJetParticleSelector.h,v 1.1 2008/02/07 14:37:04 llista Exp $
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 }  // namespace edm
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   }  // namespace modules
0056 }  // namespace reco
0057 
0058 #endif