00001 #ifndef RecoEcal_EgammaClusterProducers_CosmicClusterProducer_h_
00002 #define RecoEcal_EgammaClusterProducers_CosmicClusterProducer_h_
00003
00004 #include <memory>
00005 #include <time.h>
00006 #include <vector>
00007
00008 #include "FWCore/Framework/interface/Frameworkfwd.h"
00009 #include "FWCore/Framework/interface/EDProducer.h"
00010 #include "FWCore/Framework/interface/Event.h"
00011 #include "FWCore/Framework/interface/EventSetup.h"
00012
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014
00015 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00016 #include "RecoEcal/EgammaClusterAlgos/interface/CosmicClusterAlgo.h"
00017 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00018 #include "RecoEcal/EgammaCoreTools/interface/ClusterShapeAlgo.h"
00019 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00020
00021 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
00022
00023
00024
00025
00026 class CosmicClusterProducer : public edm::EDProducer
00027 {
00028 public:
00029
00030 CosmicClusterProducer(const edm::ParameterSet& ps);
00031
00032 ~CosmicClusterProducer();
00033
00034 virtual void produce(edm::Event&, const edm::EventSetup&);
00035
00036 private:
00037
00038 int nMaxPrintout_;
00039 int nEvt_;
00040
00041 CosmicClusterAlgo::VerbosityLevel verbosity;
00042
00043 std::string barrelHitProducer_;
00044 std::string endcapHitProducer_;
00045 std::string barrelHitCollection_;
00046 std::string endcapHitCollection_;
00047
00048 std::string barrelUHitProducer_;
00049 std::string endcapUHitProducer_;
00050 std::string barrelUHitCollection_;
00051 std::string endcapUHitCollection_;
00052
00053 std::string barrelClusterCollection_;
00054 std::string endcapClusterCollection_;
00055
00056 std::string clustershapecollectionEB_;
00057 std::string clustershapecollectionEE_;
00058
00059
00060 std::string barrelClusterShapeAssociation_;
00061 std::string endcapClusterShapeAssociation_;
00062
00063 PositionCalc posCalculator_;
00064 ClusterShapeAlgo shapeAlgo_;
00065 CosmicClusterAlgo * island_p;
00066
00067 bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0)); }
00068
00069 const EcalRecHitCollection * getCollection(edm::Event& evt,
00070 const std::string& hitProducer_,
00071 const std::string& hitCollection_);
00072
00073 const EcalUncalibratedRecHitCollection * getUCollection(edm::Event& evt,
00074 const std::string& hitProducer_,
00075 const std::string& hitCollection_);
00076
00077 void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es,
00078 const std::string& hitProducer,
00079 const std::string& hitCollection,
00080 const std::string& uhitProducer,
00081 const std::string& uhitCollection,
00082 const std::string& clusterCollection,
00083 const std::string& clusterShapeAssociation,
00084 const CosmicClusterAlgo::EcalPart& ecalPart);
00085
00086 void outputValidationInfo(reco::BasicClusterRefVector &clusterRefVector);
00087
00088
00089 };
00090
00091
00092 #endif