00001 #ifndef EgammaIsolationProducers_EgammaRecHitExtractor_h
00002 #define EgammaIsolationProducers_EgammaRecHitExtractor_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <vector>
00013 #include <functional>
00014
00015
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017 #include "DataFormats/Candidate/interface/Candidate.h"
00018 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00019 #include "RecoCaloTools/MetaCollections/interface/CaloRecHitMetaCollections.h"
00020
00021 #include "RecoCaloTools/Selectors/interface/CaloDualConeSelector.h"
00022 #include "FWCore/Framework/interface/Event.h"
00023 #include "FWCore/Framework/interface/EventSetup.h"
00024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00025 #include "FWCore/ParameterSet/interface/InputTag.h"
00026
00027 #include "DataFormats/TrackReco/interface/Track.h"
00028 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00029 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
00030 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
00031
00032 namespace egammaisolation {
00033
00034 class EgammaRecHitExtractor : public reco::isodeposit::IsoDepositExtractor {
00035 public:
00036 EgammaRecHitExtractor(const edm::ParameterSet& par);
00037 virtual ~EgammaRecHitExtractor() ;
00038 virtual void fillVetos(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::TrackCollection & tracks) { }
00039 virtual reco::IsoDeposit deposit(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::Track & track) const {
00040 throw cms::Exception("Configuration Error") << "This extractor " << (typeid(this).name()) << " is not made for tracks";
00041 }
00042 virtual reco::IsoDeposit deposit(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::Candidate & c) const ;
00043
00044 private:
00045 void collect(reco::IsoDeposit &deposit,
00046 const GlobalPoint &caloPosition, CaloDualConeSelector &cone,
00047 const CaloGeometry* caloGeom,
00048 const CaloRecHitMetaCollectionV &hits) const;
00049
00050 double etMin_ ;
00051 double energyMin_ ;
00052 double minCandEt_ ;
00053 double extRadius_ ;
00054 double intRadius_ ;
00055 double intStrip_ ;
00056 std::vector<double> paramForIsolBarrel_;
00057 std::vector<double> paramForIsolEndcap_;
00058 edm::InputTag barrelRecHitsTag_;
00059 edm::InputTag endcapRecHitsTag_;
00060 edm::InputTag barrelEcalHitsTag_;
00061 edm::InputTag endcapEcalHitsTag_;
00062 bool fakeNegativeDeposit_;
00063 bool tryBoth_;
00064 bool sameTag_;
00065 bool useEt_;
00066 DetId::Detector detector_;
00067
00068
00069
00070 };
00071 }
00072 #endif