CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.h

Go to the documentation of this file.
00001 #ifndef ParticleTowerProducer_h
00002 #define ParticleTowerProducer_h
00003 
00004 
00005 // user include files
00006 #include "FWCore/Framework/interface/Frameworkfwd.h"
00007 #include "FWCore/Framework/interface/EDProducer.h"
00008 
00009 #include "FWCore/Framework/interface/Event.h"
00010 #include "FWCore/Framework/interface/MakerMacros.h"
00011 
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013 
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 
00016 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00017 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00018 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
00019 #include "DataFormats/Math/interface/deltaR.h"
00020 
00021 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00022 #include "Geometry/Records/interface/CaloGeometryRecord.h"
00023 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00024 
00025 #include "TMath.h"
00026 #include "TRandom.h"
00027 
00028 
00029 
00030 class ParticleTowerProducer : public edm::EDProducer {
00031  public:
00032   explicit ParticleTowerProducer(const edm::ParameterSet&);
00033   ~ParticleTowerProducer();
00034   
00035  private:
00036   virtual void beginJob() ;
00037   virtual void produce(edm::Event&, const edm::EventSetup&);
00038   virtual void endJob() ;
00039   void resetTowers(edm::Event& iEvent,const edm::EventSetup& iSetup);
00040   DetId getNearestTower(const reco::PFCandidate & in) const;
00041   DetId getNearestTower(double eta, double phi) const;
00042   uint32_t denseIndex(int ieta, int iphi, double eta) const;
00043   int eta2ieta(double eta) const;
00044   int phi2iphi(double phi, int ieta) const;
00045   
00046   // ----------member data ---------------------------
00047   
00048   edm::InputTag src_;
00049   bool useHF_;
00050   
00051   std::map<DetId,double> towers_;
00052   
00053   
00054   double PI;
00055   TRandom* random_;
00056   
00057   CaloGeometry const *  geo_;                       // geometry
00058 
00059 
00060   static const double etatow[];
00061   static const double etacent[];
00062   double etaedge[42];
00063   
00064   
00065  
00066   
00067 };
00068 #endif