00001 #ifndef RecoEcal_EgammaClusterProducers_EgammaHLTNxNClusterProducer_h_ 00002 #define RecoEcal_EgammaClusterProducers_EgammaHLTNxNClusterProducer_h_ 00003 00004 00016 #include <memory> 00017 #include <time.h> 00018 00019 #include "FWCore/Framework/interface/Frameworkfwd.h" 00020 #include "FWCore/Framework/interface/EDProducer.h" 00021 #include "FWCore/Framework/interface/Event.h" 00022 #include "FWCore/Framework/interface/EventSetup.h" 00023 00024 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00025 00026 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" 00027 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h" 00028 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h" 00029 00030 // 00031 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h" 00032 #include "DataFormats/Math/interface/Point3D.h" 00033 #include "DataFormats/CaloRecHit/interface/CaloID.h" 00034 00035 //Ecal status 00036 #include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h" 00037 #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h" 00038 00039 #include "TVector3.h" 00040 #include <vector> 00041 00042 00043 00044 // Less than operator for sorting EcalRecHits according to energy. 00045 class ecalRecHitSort : public std::binary_function<EcalRecHit, EcalRecHit, bool> 00046 { 00047 public: 00048 bool operator()(EcalRecHit x, EcalRecHit y) 00049 { 00050 return (x.energy() > y.energy()); 00051 } 00052 }; 00053 00054 00055 00056 00057 class EgammaHLTNxNClusterProducer : public edm::EDProducer 00058 { 00059 public: 00060 00061 EgammaHLTNxNClusterProducer(const edm::ParameterSet& ps); 00062 00063 ~EgammaHLTNxNClusterProducer(); 00064 00065 00066 00067 virtual void produce(edm::Event&, const edm::EventSetup&); 00068 00069 private: 00070 00071 void makeNxNClusters(edm::Event &evt, const edm::EventSetup &es,const EcalRecHitCollection *hits, const reco::CaloID::Detectors detector); 00072 00073 bool checkStatusOfEcalRecHit(const EcalChannelStatus &channelStatus, const EcalRecHit &rh); 00074 00075 00076 std::string barrelClusterCollection_; 00077 std::string endcapClusterCollection_; 00078 00079 00080 std::string barrelHits_; 00081 std::string endcapHits_; 00082 00083 00084 00085 PositionCalc posCalculator_; // position calculation algorithm 00086 00087 00088 00089 std::map<std::string,double> providedParameters; 00090 00091 00092 00093 edm::InputTag barrelHitProducer_; 00094 edm::InputTag endcapHitProducer_; 00095 00096 00097 double clusSeedThr_; 00098 double clusSeedThrEndCap_; 00099 00100 bool doBarrel_; 00101 bool doEndcaps_; 00102 00103 00104 bool useRecoFlag_; 00105 bool useDBStatus_; 00106 int flagLevelRecHitsToUse_; 00107 int statusLevelRecHitsToUse_; 00108 00109 int clusEtaSize_ ; 00110 int clusPhiSize_; 00111 00112 00113 int debug_; 00114 00115 00116 int maxNumberofSeeds_ ; 00117 int maxNumberofClusters_; 00118 00119 00120 00121 00122 }; 00123 00124 00125 #endif