CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTClusterer.h
Go to the documentation of this file.
1 #ifndef DTCLUSTERER_H
2 #define DTCLUSTERER_H
3 
16 /* Base Class Headers */
18 
19 namespace edm {
20  class ParameterSet;
21  class Event;
22  class EventSetup;
23 } // namespace edm
24 
25 /* Collaborating Class Declarations */
30 class DTSuperLayer;
31 
32 /* C++ Headers */
33 #include <vector>
34 #include <utility>
35 
36 /* ====================================================================== */
37 
38 /* Class DTClusterer Interface */
39 
40 class DTClusterer : public edm::EDProducer {
41 public:
42  /* Constructor */
44 
45  /* Destructor */
46  ~DTClusterer() override;
47 
48  /* Operations */
49  void produce(edm::Event& event, const edm::EventSetup& setup) override;
50 
51 private:
52  // build clusters from hits
53  std::vector<DTSLRecCluster> buildClusters(const DTSuperLayer* sl, std::vector<DTRecHit1DPair>& pairs);
54 
55  std::vector<std::pair<float, DTRecHit1DPair> > initHits(const DTSuperLayer* sl, std::vector<DTRecHit1DPair>& pairs);
56 
57  unsigned int differentLayers(std::vector<DTRecHit1DPair>& hits);
58 
59 private:
60  // to sort hits by x
61  struct sortClusterByX {
62  bool operator()(const std::pair<float, DTRecHit1DPair>& lhs, const std::pair<float, DTRecHit1DPair>& rhs) {
63  return lhs.first < rhs.first;
64  }
65  };
66 
67 private:
68  // Switch on verbosity
69  bool debug;
70 
71  unsigned int theMinHits; // min number of hits to build a cluster
72  unsigned int theMinLayers; // min number of layers to build a cluster
74 
75 protected:
76 };
77 #endif // DTCLUSTERER_H
unsigned int theMinLayers
Definition: DTClusterer.h:72
unsigned int differentLayers(std::vector< DTRecHit1DPair > &hits)
Definition: DTClusterer.cc:179
~DTClusterer() override
Definition: DTClusterer.cc:57
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
Definition: DTClusterer.h:73
void produce(edm::Event &event, const edm::EventSetup &setup) override
Definition: DTClusterer.cc:60
unsigned int theMinHits
Definition: DTClusterer.h:71
bool operator()(const std::pair< float, DTRecHit1DPair > &lhs, const std::pair< float, DTRecHit1DPair > &rhs)
Definition: DTClusterer.h:62
std::vector< DTSLRecCluster > buildClusters(const DTSuperLayer *sl, std::vector< DTRecHit1DPair > &pairs)
Definition: DTClusterer.cc:106
DTClusterer(const edm::ParameterSet &)
Definition: DTClusterer.cc:39
std::vector< std::pair< float, DTRecHit1DPair > > initHits(const DTSuperLayer *sl, std::vector< DTRecHit1DPair > &pairs)
Definition: DTClusterer.cc:160