CMS 3D CMS Logo

Phase2TrackerCluster1D.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_PHASE2TRACKERCLUSTER_PHASE2TRACKERCLUSTER1D_H
2 #define DATAFORMATS_PHASE2TRACKERCLUSTER_PHASE2TRACKERCLUSTER1D_H
3 
4 #include <cstdint>
5 
7 
9 
11 public:
13  Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size)
14  : firstDigi_(row, col), data_((size & 0x7fff)) {}
15  Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size, unsigned int threshold)
16  : firstDigi_(row, col), data_(((threshold & 0x1) << 15) | (size & 0x7fff)) {}
18  : firstDigi_(firstDigi), data_((size & 0x7fff)) {}
19  Phase2TrackerCluster1D(const Phase2TrackerDigi& firstDigi, unsigned int size, unsigned int threshold)
20  : firstDigi_(firstDigi), data_(((threshold & 0x1) << 15) | (size & 0x7fff)) {}
21 
22  const Phase2TrackerDigi& firstDigi() const { return firstDigi_; }
23  unsigned int firstStrip() const { return firstDigi_.strip(); }
24  unsigned int firstRow() const { return firstDigi_.row(); }
25  unsigned int edge() const { return firstDigi_.edge(); }
26  unsigned int column() const { return firstDigi_.column(); }
27  uint16_t size() const { return (data_ & 0x7fff); }
28  uint16_t threshold() const { return ((data_ >> 15) & 0x1); }
29  float center() const { return float(firstStrip()) + 0.5f * size(); }
30  std::pair<float, float> barycenter() const { return std::make_pair(column(), center()); }
31 
32 private:
34  uint16_t data_;
35 };
36 
38  return one.firstStrip() < other.firstStrip();
39 }
40 
42 
43 #endif
unsigned int row() const
unsigned int column() const
unsigned int edge() const
unsigned int firstStrip() const
edmNew::DetSetVector< Phase2TrackerCluster1D > Phase2TrackerCluster1DCollectionNew
Phase2TrackerCluster1D(const Phase2TrackerDigi &firstDigi, unsigned int size)
unsigned int firstRow() const
bool operator<(const Phase2TrackerCluster1D &one, const Phase2TrackerCluster1D &other)
Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size, unsigned int threshold)
unsigned int column() const
const Phase2TrackerDigi & firstDigi() const
Phase2TrackerCluster1D(const Phase2TrackerDigi &firstDigi, unsigned int size, unsigned int threshold)
col
Definition: cuy.py:1009
Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size)
unsigned int edge() const
unsigned int strip() const
std::pair< float, float > barycenter() const