CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 }
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  virtual ~DTClusterer() ;
49 
50  /* Operations */
51  virtual void produce(edm::Event& event, const edm::EventSetup& setup);
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
unsigned int differentLayers(std::vector< DTRecHit1DPair > &hits)
Definition: DTClusterer.cc:185
virtual void produce(edm::Event &event, const edm::EventSetup &setup)
Definition: DTClusterer.cc:61
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
Definition: DTClusterer.h:78
unsigned int theMinHits
Definition: DTClusterer.h:76
Definition: Event.h:16
bool operator()(const std::pair< float, DTRecHit1DPair > &lhs, const std::pair< float, DTRecHit1DPair > &rhs)
Definition: DTClusterer.h:66
virtual ~DTClusterer()
Definition: DTClusterer.cc:57
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< DTSLRecCluster > buildClusters(const DTSuperLayer *sl, std::vector< DTRecHit1DPair > &pairs)
Definition: DTClusterer.cc:104
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:162
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")