00001 #ifndef RecoEcal_EgammaClusterProducers_EgammaHLTMulti5x5ClusterProducer_h_ 00002 #define RecoEcal_EgammaClusterProducers_EgammaHLTMulti5x5ClusterProducer_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 "DataFormats/CaloRecHit/interface/CaloClusterFwd.h" 00016 #include "RecoEcal/EgammaClusterAlgos/interface/Multi5x5ClusterAlgo.h" 00017 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h" 00018 #include "RecoEcal/EgammaCoreTools/interface/ClusterShapeAlgo.h" 00019 00020 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h" 00021 // 00022 #include "DataFormats/CaloRecHit/interface/CaloID.h" 00023 00024 00025 00026 class EgammaHLTMulti5x5ClusterProducer : public edm::EDProducer 00027 { 00028 public: 00029 00030 EgammaHLTMulti5x5ClusterProducer(const edm::ParameterSet& ps); 00031 00032 ~EgammaHLTMulti5x5ClusterProducer(); 00033 00034 virtual void produce(edm::Event&, const edm::EventSetup&); 00035 00036 private: 00037 00038 int nMaxPrintout_; // max # of printouts 00039 int nEvt_; // internal counter of events 00040 00041 00042 bool doBarrel_; 00043 bool doEndcaps_; 00044 bool doIsolated_; 00045 00046 edm::InputTag barrelHitProducer_;//it was string 00047 edm::InputTag endcapHitProducer_;//it was string 00048 std::string barrelHitCollection_; 00049 std::string endcapHitCollection_; 00050 00051 std::string barrelClusterCollection_; 00052 std::string endcapClusterCollection_; 00053 00054 /* 00055 std::string clustershapecollectionEB_;//new 00056 std::string clustershapecollectionEE_;//new 00057 //BasicClusterShape AssociationMap 00058 std::string barrelClusterShapeAssociation_;//new 00059 std::string endcapClusterShapeAssociation_;//new 00060 */ 00061 00062 edm::InputTag l1TagIsolated_; 00063 edm::InputTag l1TagNonIsolated_; 00064 double l1LowerThr_; 00065 double l1UpperThr_; 00066 double l1LowerThrIgnoreIsolation_; 00067 00068 double regionEtaMargin_; 00069 double regionPhiMargin_; 00070 00071 PositionCalc posCalculator_; // position calculation algorithm 00072 Multi5x5ClusterAlgo * Multi5x5_p; 00073 //ClusterShapeAlgo shapeAlgo_;//new 00074 00075 bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0)); } 00076 00077 const EcalRecHitCollection * getCollection(edm::Event& evt, 00078 const std::string& hitProducer_, 00079 const std::string& hitCollection_); 00080 00081 00082 void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, 00083 const std::string& hitProducer, 00084 const std::string& hitCollection, 00085 const std::string& clusterCollection, 00086 const std::vector<EcalEtaPhiRegion>& regions, 00087 const reco::CaloID::Detectors detector); 00088 /* 00089 void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, 00090 const std::string& hitProducer, 00091 const std::string& hitCollection, 00092 const std::string& clusterCollection, 00093 const std::string& clusterShapeAssociation, 00094 const Multi5x5ClusterAlgo::EcalPart& ecalPart); 00095 */ 00096 void outputValidationInfo(reco::CaloClusterPtrVector &clusterPtrVector); 00097 00098 }; 00099 00100 00101 #endif