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 }
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 
42  public:
43 
44  /* Constructor */
46 
47  /* Destructor */
48  ~DTClusterer() override ;
49 
50  /* Operations */
51  void produce(edm::Event& event, const edm::EventSetup& setup) override;
52 
53  private:
54  // build clusters from hits
55  std::vector<DTSLRecCluster> buildClusters(const DTSuperLayer* sl,
56  std::vector<DTRecHit1DPair>& pairs);
57 
58  std::vector<std::pair<float, DTRecHit1DPair> > initHits(const DTSuperLayer* sl,
59  std::vector<DTRecHit1DPair>& pairs);
60 
61  unsigned int differentLayers(std::vector<DTRecHit1DPair>& hits);
62 
63  private:
64  // to sort hits by x
65  struct sortClusterByX {
66  bool operator()(const std::pair<float, DTRecHit1DPair>& lhs,
67  const std::pair<float, DTRecHit1DPair>& rhs) {
68  return lhs.first < rhs.first;
69  }
70  };
71 
72  private:
73  // Switch on verbosity
74  bool debug;
75 
76  unsigned int theMinHits; // min number of hits to build a cluster
77  unsigned int theMinLayers; // min number of layers to build a cluster
79  protected:
80 
81 };
82 #endif // DTCLUSTERER_H
83 
unsigned int theMinLayers
Definition: DTClusterer.h:77
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
Definition: DTClusterer.h:78
unsigned int theMinHits
Definition: DTClusterer.h:76
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
bool operator()(const std::pair< float, DTRecHit1DPair > &lhs, const std::pair< float, DTRecHit1DPair > &rhs)
Definition: DTClusterer.h:66
HLT enums.
Definition: event.py:1