00001 // 00002 // $Id: PATPFParticleProducer.h,v 1.7 2010/02/20 21:00:26 wmtan Exp $ 00003 // 00004 00005 #ifndef PhysicsTools_PatAlgos_PATPFParticleProducer_h 00006 #define PhysicsTools_PatAlgos_PATPFParticleProducer_h 00007 00020 #include "FWCore/Framework/interface/EDProducer.h" 00021 #include "FWCore/Framework/interface/Event.h" 00022 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00023 #include "FWCore/Utilities/interface/InputTag.h" 00024 #include "DataFormats/Common/interface/View.h" 00025 00026 #include "CommonTools/Utils/interface/PtComparator.h" 00027 00028 #include "DataFormats/PatCandidates/interface/PFParticle.h" 00029 00030 #include "PhysicsTools/PatAlgos/interface/MultiIsolator.h" 00031 #include "PhysicsTools/PatAlgos/interface/EfficiencyLoader.h" 00032 #include "PhysicsTools/PatAlgos/interface/KinResolutionsLoader.h" 00033 00034 #include <string> 00035 00036 00037 namespace pat { 00038 00039 class LeptonLRCalc; 00040 00041 class PATPFParticleProducer : public edm::EDProducer { 00042 00043 public: 00044 00045 explicit PATPFParticleProducer(const edm::ParameterSet & iConfig); 00046 ~PATPFParticleProducer(); 00047 00048 virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup); 00049 00050 private: 00051 void 00052 fetchCandidateCollection(edm::Handle< edm::View<reco::PFCandidate> >& c, 00053 const edm::InputTag& tag, 00054 const edm::Event& iSetup) const; 00055 00056 // configurables 00057 edm::InputTag pfCandidateSrc_; 00058 bool embedPFCandidate_; 00059 bool addGenMatch_; 00060 bool embedGenMatch_; 00061 std::vector<edm::InputTag> genMatchSrc_; 00062 // tools 00063 GreaterByPt<PFParticle> pTComparator_; 00064 00065 bool addEfficiencies_; 00066 pat::helper::EfficiencyLoader efficiencyLoader_; 00067 00068 bool addResolutions_; 00069 pat::helper::KinResolutionsLoader resolutionLoader_; 00070 00071 00072 }; 00073 00074 00075 } 00076 00077 #endif