CMS 3D CMS Logo

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 */
32 class DTSuperLayer;
33 
34 /* C++ Headers */
35 #include <vector>
36 #include <utility>
37 
38 /* ====================================================================== */
39 
40 /* Class DTClusterer Interface */
41 
43 public:
44  /* Constructor */
46 
47  /* Destructor */
48  ~DTClusterer() override;
49 
50  /* Operations */
51  void produce(edm::StreamID, edm::Event& event, const edm::EventSetup& setup) const override;
52 
53 private:
54  // build clusters from hits
55  std::vector<DTSLRecCluster> buildClusters(const DTSuperLayer* sl, std::vector<DTRecHit1DPair>& pairs) const;
56 
57  std::vector<std::pair<float, DTRecHit1DPair> > initHits(const DTSuperLayer* sl,
58  std::vector<DTRecHit1DPair>& pairs) const;
59 
60  unsigned int differentLayers(std::vector<DTRecHit1DPair>& hits) const;
61 
62 private:
63  // to sort hits by x
64  struct sortClusterByX {
65  bool operator()(const std::pair<float, DTRecHit1DPair>& lhs, const std::pair<float, DTRecHit1DPair>& rhs) const {
66  return lhs.first < rhs.first;
67  }
68  };
69 
70 private:
71  // Switch on verbosity
72  bool debug;
73 
74  unsigned int theMinHits; // min number of hits to build a cluster
75  unsigned int theMinLayers; // min number of layers to build a cluster
78 
79 protected:
80 };
81 #endif // DTCLUSTERER_H
unsigned int theMinLayers
Definition: DTClusterer.h:75
bool operator()(const std::pair< float, DTRecHit1DPair > &lhs, const std::pair< float, DTRecHit1DPair > &rhs) const
Definition: DTClusterer.h:65
unsigned int differentLayers(std::vector< DTRecHit1DPair > &hits) const
Definition: DTClusterer.cc:180
~DTClusterer() override
Definition: DTClusterer.cc:58
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
Definition: DTClusterer.h:76
void produce(edm::StreamID, edm::Event &event, const edm::EventSetup &setup) const override
Definition: DTClusterer.cc:61
unsigned int theMinHits
Definition: DTClusterer.h:74
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
Definition: DTClusterer.h:77
DTClusterer(const edm::ParameterSet &)
Definition: DTClusterer.cc:39
HLT enums.
std::vector< std::pair< float, DTRecHit1DPair > > initHits(const DTSuperLayer *sl, std::vector< DTRecHit1DPair > &pairs) const
Definition: DTClusterer.cc:160
std::vector< DTSLRecCluster > buildClusters(const DTSuperLayer *sl, std::vector< DTRecHit1DPair > &pairs) const
Definition: DTClusterer.cc:106
Definition: event.py:1