00001 #ifndef RecoEcal_EgammaClusterProducers_IslandClusterProducer_h_ 00002 #define RecoEcal_EgammaClusterProducers_IslandClusterProducer_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/IslandClusterAlgo.h" 00016 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h" 00017 #include "RecoEcal/EgammaCoreTools/interface/ClusterShapeAlgo.h" 00018 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h" 00019 00020 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" 00021 00022 // 00023 00024 00025 class IslandClusterProducer : public edm::EDProducer 00026 { 00027 public: 00028 00029 IslandClusterProducer(const edm::ParameterSet& ps); 00030 00031 ~IslandClusterProducer(); 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 IslandClusterAlgo::VerbosityLevel verbosity; 00041 00042 std::string barrelHitProducer_; 00043 std::string endcapHitProducer_; 00044 std::string barrelHitCollection_; 00045 std::string endcapHitCollection_; 00046 00047 std::string barrelClusterCollection_; 00048 std::string endcapClusterCollection_; 00049 00050 std::string clustershapecollectionEB_; 00051 std::string clustershapecollectionEE_; 00052 00053 //BasicClusterShape AssociationMap 00054 std::string barrelClusterShapeAssociation_; 00055 std::string endcapClusterShapeAssociation_; 00056 00057 PositionCalc posCalculator_; // position calculation algorithm 00058 ClusterShapeAlgo shapeAlgo_; // cluster shape algorithm 00059 IslandClusterAlgo * island_p; 00060 00061 bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0)); } 00062 00063 const EcalRecHitCollection * getCollection(edm::Event& evt, 00064 const std::string& hitProducer_, 00065 const std::string& hitCollection_); 00066 00067 00068 void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, 00069 const std::string& hitProducer, 00070 const std::string& hitCollection, 00071 const std::string& clusterCollection, 00072 const std::string& clusterShapeAssociation, 00073 const IslandClusterAlgo::EcalPart& ecalPart); 00074 00075 void outputValidationInfo(reco::BasicClusterRefVector &clusterRefVector); 00076 }; 00077 00078 00079 #endif