00001 #ifndef RecoEcal_EgammaClusterProducers_Multi5x5SuperClusterProducer_h_ 00002 #define RecoEcal_EgammaClusterProducers_Multi5x5SuperClusterProducer_h_ 00003 00004 #include <memory> 00005 00006 #include "FWCore/Framework/interface/Frameworkfwd.h" 00007 #include "FWCore/Framework/interface/EDProducer.h" 00008 #include "FWCore/Framework/interface/Event.h" 00009 #include "FWCore/Framework/interface/EventSetup.h" 00010 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00011 00012 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" 00013 #include "RecoEcal/EgammaClusterAlgos/interface/Multi5x5BremRecoveryClusterAlgo.h" 00014 00015 // 00016 00017 00018 class Multi5x5SuperClusterProducer : public edm::EDProducer 00019 { 00020 00021 public: 00022 00023 Multi5x5SuperClusterProducer(const edm::ParameterSet& ps); 00024 00025 ~Multi5x5SuperClusterProducer(); 00026 00027 virtual void produce(edm::Event&, const edm::EventSetup&); 00028 virtual void endJob(); 00029 00030 private: 00031 00032 int nMaxPrintout_; // max # of printouts 00033 int nEvt_; // internal counter of events 00034 00035 std::string endcapClusterCollection_; 00036 std::string barrelClusterCollection_; 00037 00038 std::string endcapClusterProducer_; 00039 std::string barrelClusterProducer_; 00040 00041 std::string endcapSuperclusterCollection_; 00042 std::string barrelSuperclusterCollection_; 00043 00044 float barrelEtaSearchRoad_; 00045 float barrelPhiSearchRoad_; 00046 float endcapEtaSearchRoad_; 00047 float endcapPhiSearchRoad_; 00048 float seedTransverseEnergyThreshold_; 00049 00050 bool doBarrel_; 00051 bool doEndcaps_; 00052 00053 Multi5x5BremRecoveryClusterAlgo * bremAlgo_p; 00054 00055 double totalE; 00056 int noSuperClusters; 00057 00058 00059 void getClusterPtrVector(edm::Event& evt, std::string clusterProducer_, std::string clusterCollection_, reco::CaloClusterPtrVector *); 00060 00061 void produceSuperclustersForECALPart(edm::Event& evt, 00062 std::string clusterProducer, 00063 std::string clusterCollection, 00064 std::string superclusterColection); 00065 00066 void outputValidationInfo(reco::SuperClusterCollection &superclusterCollection); 00067 00068 bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0));} 00069 }; 00070 00071 #endif 00072