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
Phase2TrackerCluster1D::firstStrip
unsigned int firstStrip() const
Definition: Phase2TrackerCluster1D.h:23
Phase2TrackerDigi::row
unsigned int row() const
Definition: Phase2TrackerDigi.h:29
SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
Phase2TrackerCluster1D
Definition: Phase2TrackerCluster1D.h:10
Phase2TrackerCluster1D::column
unsigned int column() const
Definition: Phase2TrackerCluster1D.h:26
Phase2TrackerDigi::edge
unsigned int edge() const
Definition: Phase2TrackerDigi.h:33
operator<
bool operator<(const Phase2TrackerCluster1D &one, const Phase2TrackerCluster1D &other)
Definition: Phase2TrackerCluster1D.h:37
cuy.col
col
Definition: cuy.py:1010
Phase2TrackerCluster1D::firstRow
unsigned int firstRow() const
Definition: Phase2TrackerCluster1D.h:24
Phase2TrackerCluster1D::barycenter
std::pair< float, float > barycenter() const
Definition: Phase2TrackerCluster1D.h:30
Phase2TrackerCluster1D::center
float center() const
Definition: Phase2TrackerCluster1D.h:29
Phase2TrackerCluster1DCollectionNew
edmNew::DetSetVector< Phase2TrackerCluster1D > Phase2TrackerCluster1DCollectionNew
Definition: Phase2TrackerCluster1D.h:41
Phase2TrackerDigi::column
unsigned int column() const
Definition: Phase2TrackerDigi.h:30
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
Phase2TrackerCluster1D::Phase2TrackerCluster1D
Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size, unsigned int threshold)
Definition: Phase2TrackerCluster1D.h:15
Phase2TrackerCluster1D::Phase2TrackerCluster1D
Phase2TrackerCluster1D(const Phase2TrackerDigi &firstDigi, unsigned int size, unsigned int threshold)
Definition: Phase2TrackerCluster1D.h:19
trackingPlots.other
other
Definition: trackingPlots.py:1467
Phase2TrackerCluster1D::threshold
uint16_t threshold() const
Definition: Phase2TrackerCluster1D.h:28
Phase2TrackerCluster1D::Phase2TrackerCluster1D
Phase2TrackerCluster1D()
Definition: Phase2TrackerCluster1D.h:12
Phase2TrackerDigi.h
Phase2TrackerCluster1D::firstDigi_
Phase2TrackerDigi firstDigi_
Definition: Phase2TrackerCluster1D.h:33
Phase2TrackerCluster1D::data_
uint16_t data_
Definition: Phase2TrackerCluster1D.h:34
Phase2TrackerCluster1D::Phase2TrackerCluster1D
Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size)
Definition: Phase2TrackerCluster1D.h:13
Phase2TrackerDigi
Definition: Phase2TrackerDigi.h:12
edmNew::DetSetVector
Definition: DetSetNew.h:13
Phase2TrackerCluster1D::size
uint16_t size() const
Definition: Phase2TrackerCluster1D.h:27
Phase2TrackerCluster1D::edge
unsigned int edge() const
Definition: Phase2TrackerCluster1D.h:25
Phase2TrackerCluster1D::firstDigi
const Phase2TrackerDigi & firstDigi() const
Definition: Phase2TrackerCluster1D.h:22
Phase2TrackerCluster1D::Phase2TrackerCluster1D
Phase2TrackerCluster1D(const Phase2TrackerDigi &firstDigi, unsigned int size)
Definition: Phase2TrackerCluster1D.h:17
Phase2TrackerDigi::strip
unsigned int strip() const
Definition: Phase2TrackerDigi.h:32
DetSetVectorNew.h