00001 // 00002 // $Id: PATPhotonProducer.h,v 1.20 2013/02/27 23:26:56 wmtan 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 "CommonTools/Utils/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 #include "PhysicsTools/PatAlgos/interface/KinResolutionsLoader.h" 00031 00032 00033 #include "DataFormats/PatCandidates/interface/UserData.h" 00034 #include "PhysicsTools/PatAlgos/interface/PATUserDataHelper.h" 00035 00036 namespace pat { 00037 00038 class PATPhotonProducer : public edm::EDProducer { 00039 00040 public: 00041 00042 explicit PATPhotonProducer(const edm::ParameterSet & iConfig); 00043 ~PATPhotonProducer(); 00044 00045 virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; 00046 00047 static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); 00048 00049 private: 00050 00051 // configurables 00052 edm::InputTag photonSrc_; 00053 bool embedSuperCluster_; 00054 00055 bool addGenMatch_; 00056 bool embedGenMatch_; 00057 std::vector<edm::InputTag> genMatchSrc_; 00058 00059 // tools 00060 GreaterByEt<Photon> eTComparator_; 00061 00062 pat::helper::MultiIsolator isolator_; 00063 pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_; // better here than recreate at each event 00064 std::vector<std::pair<pat::IsolationKeys,edm::InputTag> > isoDepositLabels_; 00065 00066 bool addEfficiencies_; 00067 pat::helper::EfficiencyLoader efficiencyLoader_; 00068 00069 bool addResolutions_; 00070 pat::helper::KinResolutionsLoader resolutionLoader_; 00071 00072 bool addPhotonID_; 00073 typedef std::pair<std::string, edm::InputTag> NameTag; 00074 std::vector<NameTag> photIDSrcs_; 00075 00076 bool useUserData_; 00077 pat::PATUserDataHelper<pat::Photon> userDataHelper_; 00078 00079 }; 00080 00081 00082 } 00083 00084 #endif