00001 // 00002 // $Id: PATGenericParticleProducer.h,v 1.10 2013/02/27 23:26:56 wmtan Exp $ 00003 // 00004 00005 #ifndef PhysicsTools_PatAlgos_PATGenericParticleProducer_h 00006 #define PhysicsTools_PatAlgos_PATGenericParticleProducer_h 00007 00020 #include "FWCore/Framework/interface/EDProducer.h" 00021 #include "FWCore/Framework/interface/Event.h" 00022 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00023 00024 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h" 00025 #include "DataFormats/HepMCCandidate/interface/GenParticle.h" 00026 #include "DataFormats/Common/interface/Association.h" 00027 #include "DataFormats/Common/interface/ValueMap.h" 00028 00029 #include "CommonTools/Utils/interface/EtComparator.h" 00030 00031 #include "DataFormats/PatCandidates/interface/GenericParticle.h" 00032 00033 #include "PhysicsTools/PatAlgos/interface/MultiIsolator.h" 00034 #include "PhysicsTools/PatAlgos/interface/EfficiencyLoader.h" 00035 #include "PhysicsTools/PatAlgos/interface/KinResolutionsLoader.h" 00036 #include "PhysicsTools/PatAlgos/interface/VertexingHelper.h" 00037 00038 #include "DataFormats/PatCandidates/interface/UserData.h" 00039 #include "PhysicsTools/PatAlgos/interface/PATUserDataHelper.h" 00040 00041 namespace pat { 00042 00043 class PATGenericParticleProducer : public edm::EDProducer { 00044 00045 public: 00046 00047 explicit PATGenericParticleProducer(const edm::ParameterSet & iConfig); 00048 ~PATGenericParticleProducer(); 00049 00050 virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; 00051 00052 private: 00053 00054 // configurables 00055 edm::InputTag src_; 00056 00057 // embed RECo objects 00058 bool embedSuperCluster_, embedTrack_, embedTracks_, embedGsfTrack_, embedCaloTower_, embedStandalone_, embedCombined_; 00059 00060 bool addQuality_; 00061 edm::InputTag qualitySrc_; 00062 00063 bool addGenMatch_; 00064 bool embedGenMatch_; 00065 std::vector<edm::InputTag> genMatchSrc_; 00066 00067 // tools 00068 GreaterByEt<GenericParticle> eTComparator_; 00069 00070 pat::helper::MultiIsolator isolator_; 00071 pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_; // better here than recreate at each event 00072 std::vector<std::pair<pat::IsolationKeys,edm::InputTag> > isoDepositLabels_; 00073 00074 bool addEfficiencies_; 00075 pat::helper::EfficiencyLoader efficiencyLoader_; 00076 00077 bool addResolutions_; 00078 pat::helper::KinResolutionsLoader resolutionLoader_; 00079 00080 pat::helper::VertexingHelper vertexingHelper_; 00081 00082 bool useUserData_; 00083 pat::PATUserDataHelper<pat::GenericParticle> userDataHelper_; 00084 00085 }; 00086 00087 00088 } 00089 00090 #endif