00001 #ifndef RecoEcal_EgammaClusterProducers_Multi5x5ClusterProducer_h_ 00002 #define RecoEcal_EgammaClusterProducers_Multi5x5ClusterProducer_h_ 00003 00004 #include <memory> 00005 #include <time.h> 00006 00007 #include "FWCore/Framework/interface/Frameworkfwd.h" 00008 #include "FWCore/Framework/interface/EDProducer.h" 00009 #include "FWCore/Framework/interface/Event.h" 00010 #include "FWCore/Framework/interface/EventSetup.h" 00011 00012 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00013 00014 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" 00015 #include "RecoEcal/EgammaClusterAlgos/interface/Multi5x5ClusterAlgo.h" 00016 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h" 00017 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h" 00018 00019 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" 00020 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h" 00021 00022 // 00023 00024 00025 class Multi5x5ClusterProducer : public edm::EDProducer 00026 { 00027 public: 00028 00029 Multi5x5ClusterProducer(const edm::ParameterSet& ps); 00030 00031 ~Multi5x5ClusterProducer(); 00032 00033 virtual void produce(edm::Event&, const edm::EventSetup&); 00034 00035 private: 00036 00037 int nMaxPrintout_; // max # of printouts 00038 int nEvt_; // internal counter of events 00039 00040 // cluster which regions 00041 bool doBarrel_; 00042 bool doEndcap_; 00043 00044 Multi5x5ClusterAlgo::VerbosityLevel verbosity; 00045 00046 std::string barrelHitProducer_; 00047 std::string endcapHitProducer_; 00048 std::string barrelHitCollection_; 00049 std::string endcapHitCollection_; 00050 00051 std::string barrelClusterCollection_; 00052 std::string endcapClusterCollection_; 00053 00054 PositionCalc posCalculator_; // position calculation algorithm 00055 Multi5x5ClusterAlgo * island_p; 00056 00057 bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0)); } 00058 00059 const EcalRecHitCollection * getCollection(edm::Event& evt, 00060 const std::string& hitProducer_, 00061 const std::string& hitCollection_); 00062 00063 00064 void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, 00065 const std::string& hitProducer, 00066 const std::string& hitCollection, 00067 const std::string& clusterCollection, 00068 const reco::CaloID::Detectors detector); 00069 00070 void outputValidationInfo(reco::CaloClusterPtrVector &clusterPtrVector); 00071 }; 00072 00073 00074 #endif