CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/RecoLocalMuon/DTSegment/src/DTClusterer.h

Go to the documentation of this file.
00001 #ifndef DTCLUSTERER_H
00002 #define DTCLUSTERER_H
00003 
00017 /* Base Class Headers */
00018 #include "FWCore/Framework/interface/EDProducer.h"
00019 
00020 namespace edm {
00021   class ParameterSet;
00022   class Event;
00023   class EventSetup;
00024 }
00025 
00026 /* Collaborating Class Declarations */
00027 #include "FWCore/Utilities/interface/InputTag.h"
00028 #include "DataFormats/DTRecHit/interface/DTSLRecCluster.h"
00029 #include "DataFormats/DTRecHit/interface/DTRecHit1DPair.h"
00030 class DTSuperLayer;
00031 
00032 /* C++ Headers */
00033 #include <vector>
00034 #include <utility>
00035 
00036 /* ====================================================================== */
00037 
00038 /* Class DTClusterer Interface */
00039 
00040 class DTClusterer : public edm::EDProducer {
00041 
00042   public:
00043 
00044     /* Constructor */ 
00045     DTClusterer(const edm::ParameterSet&) ;
00046 
00047     /* Destructor */ 
00048     virtual ~DTClusterer() ;
00049 
00050     /* Operations */ 
00051     virtual void produce(edm::Event& event, const edm::EventSetup& setup);
00052 
00053   private:
00054     // build clusters from hits
00055     std::vector<DTSLRecCluster> buildClusters(const DTSuperLayer* sl,
00056                                               std::vector<DTRecHit1DPair>& pairs);
00057 
00058     std::vector<std::pair<float, DTRecHit1DPair> > initHits(const DTSuperLayer* sl,
00059                                                             std::vector<DTRecHit1DPair>& pairs);
00060 
00061     unsigned int differentLayers(std::vector<DTRecHit1DPair>& hits);
00062 
00063   private:
00064     // to sort hits by x
00065     struct sortClusterByX {
00066       bool operator()(const std::pair<float, DTRecHit1DPair>& lhs, 
00067                       const std::pair<float, DTRecHit1DPair>& rhs) {
00068         return lhs.first < rhs.first;
00069       }
00070     };
00071 
00072   private:
00073     // Switch on verbosity
00074     bool debug;
00075 
00076     unsigned int theMinHits; // min number of hits to build a cluster
00077     unsigned int theMinLayers; // min number of layers to build a cluster
00078     edm::InputTag theRecHits1DLabel;
00079   protected:
00080 
00081 };
00082 #endif // DTCLUSTERER_H
00083