CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoEcal/EgammaClusterProducers/interface/Multi5x5ClusterProducer.h

Go to the documentation of this file.
00001 #ifndef RecoEcal_EgammaClusterProducers_Multi5x5ClusterProducer_h_
00002 #define RecoEcal_EgammaClusterProducers_Multi5x5ClusterProducer_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 "RecoEcal/EgammaClusterAlgos/interface/Multi5x5ClusterAlgo.h"
00016 #include "RecoEcal/EgammaCoreTools/interface/PositionCalc.h"
00017 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00018 
00019 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
00020 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
00021 
00022 //
00023 
00024 
00025 class Multi5x5ClusterProducer : public edm::EDProducer 
00026 {
00027   public:
00028 
00029       Multi5x5ClusterProducer(const edm::ParameterSet& ps);
00030 
00031       ~Multi5x5ClusterProducer();
00032 
00033       virtual void produce(edm::Event&, const edm::EventSetup&);
00034 
00035    private:
00036 
00037       int nMaxPrintout_; // max # of printouts
00038       int nEvt_;         // internal counter of events
00039 
00040       // cluster which regions
00041       bool doBarrel_;
00042       bool doEndcap_;
00043 
00044       std::string barrelHitProducer_;
00045       std::string endcapHitProducer_;
00046       std::string barrelHitCollection_;
00047       std::string endcapHitCollection_;
00048 
00049       std::string barrelClusterCollection_;
00050       std::string endcapClusterCollection_;
00051 
00052       PositionCalc posCalculator_; // position calculation algorithm
00053       Multi5x5ClusterAlgo * island_p;
00054 
00055       bool counterExceeded() const { return ((nEvt_ > nMaxPrintout_) || (nMaxPrintout_ < 0)); }
00056 
00057       const EcalRecHitCollection * getCollection(edm::Event& evt,
00058                                                  const std::string& hitProducer_,
00059                                                  const std::string& hitCollection_);
00060 
00061 
00062       void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es,
00063                               const std::string& hitProducer,
00064                               const std::string& hitCollection,
00065                               const std::string& clusterCollection,
00066                               const reco::CaloID::Detectors detector);
00067 
00068       void outputValidationInfo(reco::CaloClusterPtrVector &clusterPtrVector);
00069 };
00070 
00071 
00072 #endif