CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/RecoParticleFlow/PFClusterProducer/plugins/PFRecHitProducerECAL.h

Go to the documentation of this file.
00001 #ifndef RecoParticleFlow_PFClusterProducer_PFRecHitProducerECAL_h_
00002 #define RecoParticleFlow_PFClusterProducer_PFRecHitProducerECAL_h_
00003 
00004 // system include files
00005 #include <memory>
00006 #include <vector>
00007 
00008 // user include files
00009 #include "FWCore/Framework/interface/Frameworkfwd.h"
00010 #include "FWCore/Framework/interface/EDProducer.h"
00011 
00012 #include "FWCore/Framework/interface/Event.h"
00013 #include "FWCore/Framework/interface/MakerMacros.h"
00014 
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 
00017 #include "Geometry/CaloTopology/interface/CaloDirection.h"
00018 
00019 #include "RecoParticleFlow/PFClusterProducer/plugins/PFRecHitProducer.h"
00020 #include "DataFormats/ParticleFlowReco/interface/PFLayer.h"
00021 
00022 #include "DataFormats/Math/interface/Vector3D.h"
00030 class CaloSubdetectorTopology;
00031 class CaloSubdetectorGeometry;
00032 class EcalBarrelGeometry;
00033 class EcalEndcapGeometry;
00034 class CaloSubdetectorGeometry;
00035 class DetId;
00036 
00037 
00038 
00039 
00040 
00041 class PFRecHitProducerECAL : public PFRecHitProducer {
00042 
00043  public:
00044   explicit PFRecHitProducerECAL(const edm::ParameterSet&);
00045   ~PFRecHitProducerECAL();
00046 
00047   
00048 
00049  private:
00050 
00053   void createRecHits(std::vector<reco::PFRecHit>& rechits,
00054                      std::vector<reco::PFRecHit>& rechitsCleaned,
00055                      edm::Event&, const edm::EventSetup&);
00056 
00057 
00058   
00059 
00060   reco::PFRecHit*  createEcalRecHit( const DetId& detid,
00061                                      double energy,
00062                                      PFLayer::Layer layer,
00063                                      const CaloSubdetectorGeometry* geom );
00064 
00065 
00066 
00068   bool findEcalRecHitGeometry ( const DetId& detid, 
00069                                 const CaloSubdetectorGeometry* geom,
00070                                 math::XYZVector& position, 
00071                                 math::XYZVector& axis );
00072 
00074   void 
00075     findRecHitNeighboursECAL( reco::PFRecHit& rh, 
00076                               const std::map<unsigned,unsigned >& sortedHits );
00077 
00081   void ecalNeighbArray( const EcalBarrelGeometry& barrelGeom,
00082                         const CaloSubdetectorTopology& barrelTopo,
00083                         const EcalEndcapGeometry& endcapGeom,
00084                         const CaloSubdetectorTopology& endcapTopo );
00085 
00086   DetId move(DetId cell, const CaloDirection& dir ) const;
00087 
00088   bool stdsimplemove(DetId& cell, 
00089                      const CaloDirection& dir,
00090                      const CaloSubdetectorTopology& barrelTopo,
00091                      const CaloSubdetectorTopology& endcapTopo,
00092                      const EcalBarrelGeometry& barrelGeom,
00093                      const EcalEndcapGeometry& endcapGeom ) const;
00094 
00095 
00096   bool stdmove(DetId& cell, 
00097                const CaloDirection& dir,
00098                const CaloSubdetectorTopology& barrelTopo,
00099                const CaloSubdetectorTopology& endcapTopo,
00100                const EcalBarrelGeometry& barrelGeom,
00101                const EcalEndcapGeometry& endcapGeom ) const;
00102 
00103   // ----------member data ---------------------------
00104   
00105 
00106  
00108   std::vector<std::vector<DetId> >  neighboursEB_;
00109 
00111   std::vector<std::vector<DetId> >  neighboursEE_;
00112   
00114   bool  neighbourmapcalculated_;
00115 
00117   bool  crossBarrelEndcapBorder_;
00118 
00119   // ----------access to event data
00120   edm::InputTag    inputTagEcalRecHitsEB_;
00121   edm::InputTag    inputTagEcalRecHitsEE_;
00122 
00123   // ---- Perform timing cleaning
00124   bool timingCleaning_;
00125   double threshCleaningEB_;
00126   double threshCleaningEE_;
00127 
00128   // ---- Perform topological cleaning
00129   bool topologicalCleaning_;
00130 
00131 };
00132 
00133 #endif