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 */
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
DTClusterer::theMinLayers
unsigned int theMinLayers
Definition: DTClusterer.h:72
DTClusterer::~DTClusterer
~DTClusterer() override
Definition: DTClusterer.cc:57
EDProducer.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
DTRecHitCollection.h
DTClusterer::differentLayers
unsigned int differentLayers(std::vector< DTRecHit1DPair > &hits)
Definition: DTClusterer.cc:179
edm::EDGetTokenT< DTRecHitCollection >
DTClusterer::produce
void produce(edm::Event &event, const edm::EventSetup &setup) override
Definition: DTClusterer.cc:60
edm
HLT enums.
Definition: AlignableModifier.h:19
DTSuperLayer
Definition: DTSuperLayer.h:24
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
DTClusterer::recHits1DToken_
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
Definition: DTClusterer.h:73
DTClusterer::theMinHits
unsigned int theMinHits
Definition: DTClusterer.h:71
DTClusterer::sortClusterByX::operator()
bool operator()(const std::pair< float, DTRecHit1DPair > &lhs, const std::pair< float, DTRecHit1DPair > &rhs)
Definition: DTClusterer.h:62
DTClusterer::sortClusterByX
Definition: DTClusterer.h:61
DTClusterer::buildClusters
std::vector< DTSLRecCluster > buildClusters(const DTSuperLayer *sl, std::vector< DTRecHit1DPair > &pairs)
Definition: DTClusterer.cc:106
Event
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
DTRecHit1DPair.h
edm::EventSetup
Definition: EventSetup.h:58
DTClusterer::initHits
std::vector< std::pair< float, DTRecHit1DPair > > initHits(const DTSuperLayer *sl, std::vector< DTRecHit1DPair > &pairs)
Definition: DTClusterer.cc:160
InputTag.h
DTClusterer::debug
bool debug
Definition: DTClusterer.h:69
DTSLRecCluster.h
DTClusterer
Definition: DTClusterer.h:40
DTClusterer::DTClusterer
DTClusterer(const edm::ParameterSet &)
Definition: DTClusterer.cc:39
edm::EDProducer
Definition: EDProducer.h:35
EventSetup
event
Definition: event.py:1
edm::Event
Definition: Event.h:73