Go to the documentation of this file.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 "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
00017 #include "RecoEcal/EgammaClusterAlgos/interface/CosmicClusterAlgo.h"
00018 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00019 #include "RecoEcal/EgammaCoreTools/interface/ClusterShapeAlgo.h"
00020 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00021
00022 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
00023
00024
00025
00026
00027 class CosmicClusterProducer : public edm::EDProducer
00028 {
00029 public:
00030
00031 CosmicClusterProducer(const edm::ParameterSet& ps);
00032
00033 ~CosmicClusterProducer();
00034
00035 virtual void produce(edm::Event&, const edm::EventSetup&);
00036
00037 private:
00038
00039 int nMaxPrintout_;
00040 int nEvt_;
00041
00042 CosmicClusterAlgo::VerbosityLevel verbosity;
00043
00044 std::string barrelHitProducer_;
00045 std::string endcapHitProducer_;
00046 std::string barrelHitCollection_;
00047 std::string endcapHitCollection_;
00048
00049 std::string barrelUHitProducer_;
00050 std::string endcapUHitProducer_;
00051 std::string barrelUHitCollection_;
00052 std::string endcapUHitCollection_;
00053
00054 std::string barrelClusterCollection_;
00055 std::string endcapClusterCollection_;
00056
00057 std::string clustershapecollectionEB_;
00058 std::string clustershapecollectionEE_;
00059
00060
00061 std::string barrelClusterShapeAssociation_;
00062 std::string endcapClusterShapeAssociation_;
00063
00064 PositionCalc posCalculator_;
00065 ClusterShapeAlgo shapeAlgo_;
00066 CosmicClusterAlgo * island_p;
00067
00068 bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0)); }
00069
00070 const EcalRecHitCollection * getCollection(edm::Event& evt,
00071 const std::string& hitProducer_,
00072 const std::string& hitCollection_);
00073
00074 const EcalUncalibratedRecHitCollection * getUCollection(edm::Event& evt,
00075 const std::string& hitProducer_,
00076 const std::string& hitCollection_);
00077
00078 void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es,
00079 const std::string& hitProducer,
00080 const std::string& hitCollection,
00081 const std::string& uhitProducer,
00082 const std::string& uhitCollection,
00083 const std::string& clusterCollection,
00084 const std::string& clusterShapeAssociation,
00085 const CosmicClusterAlgo::EcalPart& ecalPart);
00086
00087 void outputValidationInfo(reco::CaloClusterPtrVector &clusterPtrVector);
00088
00089
00090 };
00091
00092
00093 #endif