00001 // 00002 // $Id: PATPhotonProducer.h,v 1.12.4.1 2008/11/25 15:39:40 gpetrucc Exp $ 00003 // 00004 00005 #ifndef PhysicsTools_PatAlgos_PATPhotonProducer_h 00006 #define PhysicsTools_PatAlgos_PATPhotonProducer_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 "PhysicsTools/Utilities/interface/EtComparator.h" 00025 00026 #include "DataFormats/PatCandidates/interface/Photon.h" 00027 00028 #include "PhysicsTools/PatAlgos/interface/MultiIsolator.h" 00029 #include "PhysicsTools/PatAlgos/interface/EfficiencyLoader.h" 00030 00031 00032 #include "DataFormats/PatCandidates/interface/UserData.h" 00033 #include "PhysicsTools/PatAlgos/interface/PATUserDataHelper.h" 00034 00035 namespace pat { 00036 00037 class PATPhotonProducer : public edm::EDProducer { 00038 00039 public: 00040 00041 explicit PATPhotonProducer(const edm::ParameterSet & iConfig); 00042 ~PATPhotonProducer(); 00043 00044 virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup); 00045 00046 private: 00047 00048 // configurables 00049 edm::InputTag photonSrc_; 00050 bool embedSuperCluster_; 00051 00052 bool addGenMatch_; 00053 bool embedGenMatch_; 00054 std::vector<edm::InputTag> genMatchSrc_; 00055 00056 bool addTrigMatch_; 00057 std::vector<edm::InputTag> trigMatchSrc_; 00058 00059 bool addPhotonID_; 00060 edm::InputTag photonIDSrc_; 00061 00062 // tools 00063 GreaterByEt<Photon> eTComparator_; 00064 00065 pat::helper::MultiIsolator isolator_; 00066 pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_; // better here than recreate at each event 00067 std::vector<std::pair<pat::IsolationKeys,edm::InputTag> > isoDepositLabels_; 00068 00069 bool addEfficiencies_; 00070 pat::helper::EfficiencyLoader efficiencyLoader_; 00071 00072 bool useUserData_; 00073 pat::PATUserDataHelper<pat::Photon> userDataHelper_; 00074 00075 }; 00076 00077 00078 } 00079 00080 #endif