00001 #ifndef JetProducers_BasePilupSubtractionJetProducer_h 00002 #define JetProducers_BasePilupSubtractionJetProducer_h 00003 00014 #include "FWCore/Framework/interface/EDProducer.h" 00015 #include "DataFormats/Common/interface/EDProductfwd.h" 00016 #include "RecoJets/JetAlgorithms/interface/JetRecoTypes.h" 00017 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00018 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h" 00019 #include "DataFormats/Candidate/interface/LeafCandidate.h" 00020 #include "DataFormats/Candidate/interface/CandidateFwd.h" 00021 #include "Geometry/CaloGeometry/interface/CaloGeometry.h" 00022 #include "FWCore/Framework/interface/ESHandle.h" 00023 #include <map> 00024 #include <vector> 00025 #include "FWCore/Framework/interface/EventSetup.h" 00026 #include "DataFormats/HcalDetId/interface/HcalDetId.h" 00027 00028 namespace edm { 00029 class ParameterSet; 00030 class Event; 00031 class EventSetup; 00032 } 00033 00034 namespace cms 00035 { 00036 class BasePilupSubtractionJetProducer : public edm::EDProducer 00037 { 00038 public: 00039 00040 BasePilupSubtractionJetProducer(const edm::ParameterSet& ps); 00041 00043 virtual ~BasePilupSubtractionJetProducer(); 00045 virtual void produce(edm::Event& e, const edm::EventSetup& c); 00047 std::string jetType () const {return mJetType;} 00048 00049 int ieta(const reco::Candidate*); 00050 int iphi(const reco::Candidate*); 00051 00052 void beginJob( const edm::EventSetup& iSetup); 00053 00054 // abstract method to be set up in actual implementations 00056 virtual bool runAlgorithm (const JetReco::InputCollection& fInput, JetReco::OutputCollection* fOutput) = 0; 00057 00058 void calculate_pedestal(const JetReco::InputCollection&); 00059 // reco::CandidateCollection subtract_pedestal(const JetReco::InputCollection&); 00060 JetReco::InputCollection subtract_pedestal(const JetReco::InputCollection&); 00061 00062 private: 00063 edm::InputTag mSrc; 00064 std::string mJetType; 00065 bool mVerbose; 00066 double mEtInputCut; 00067 double mEInputCut; 00068 double mEtJetInputCut; 00069 double nSigmaPU; 00070 double radiusPU; 00071 std::map<int,double> esigma; 00072 std::map<int,double> emean; 00073 std::map<int,int> geomtowers; 00074 std::map<int,int> ntowers_with_jets; 00075 std::vector<HcalDetId> allgeomid; 00076 const CaloGeometry* geo; 00077 int ietamax; 00078 int ietamin; 00079 }; 00080 } 00081 00082 #endif