1 #ifndef DataFormats_SiPixel_Cluster_SiPixelCluster_h
2 #define DataFormats_SiPixel_Cluster_SiPixelCluster_h
34 constexpr
Pixel(
int pix_x,
int pix_y,
int pix_adc) :
x(pix_x),
y(pix_y),
adc(pix_adc) {}
46 constexpr
int dx()
const {
return dx_; }
47 constexpr
int dy()
const {
return dy_; }
60 constexpr
int row()
const {
return row_; }
61 constexpr
int col()
const {
return col_; }
72 static constexpr
unsigned int MAXSPAN = 255;
73 static constexpr
unsigned int MAXPOS = 2047;
98 for (
unsigned int i = 0;
i < isize; ++
i) {
99 uint16_t xoffset = xpos[
i] -
xmin;
100 uint16_t yoffset = ypos[
i] -
ymin;
103 if (xoffset > maxRow)
105 if (yoffset > maxCol)
114 void add(
const PixelPos& pix,
int adc);
120 for (
int i = 0;
i < isize; ++
i)
128 for (
int i = 0;
i < isize; ++
i)
145 for (
int i = 0;
i < isize; ++
i)
159 const std::vector<Pixel>
pixels()
const {
160 std::vector<Pixel> oldPixVector;
162 oldPixVector.reserve(isize);
163 for (
int i = 0;
i < isize; ++
i) {
164 oldPixVector.push_back(
pixel(
i));
void setSplitClusterErrorY(float erry)
uint16_t *__restrict__ id
std::vector< PixelDigi >::const_iterator PixelDigiIter
std::pair< PixelDigiIter, PixelDigiIter > PixelDigiRange
static int overflow_(uint16_t span)
uint16_t theOriginalClusterId
constexpr Shift(int dx, int dy)
edm::RefProd< SiPixelClusterCollection > SiPixelClusterRefProd
void packRow(uint16_t xmin, uint16_t xspan)
static constexpr unsigned int MAXPOS
void packCol(uint16_t ymin, uint16_t yspan)
constexpr PixelPos operator+(const Shift &shift) const
std::vector< uint16_t > thePixelADC
static constexpr uint16_t invalidClusterId
void setOriginalId(uint16_t id)
constexpr Pixel(int pix_x, int pix_y, int pix_adc)
SiPixelCluster(unsigned int isize, uint16_t const *adcs, uint16_t const *xpos, uint16_t const *ypos, uint16_t xmin, uint16_t ymin, uint16_t id=invalidClusterId)
edm::Ref< SiPixelClusterCollection, SiPixelCluster > SiPixelClusterRef
void add(const PixelPos &pix, int adc)
edm::DetSetRefVector< SiPixelCluster > SiPixelClusterRefVector
const std::vector< uint8_t > & pixelOffset() const
const std::vector< uint16_t > & pixelADC() const
std::vector< uint8_t > thePixelOffset
constexpr PixelPos(int row, int col)
constexpr int col() const
~SiPixelCluster()=default
void setSplitClusterErrorX(float errx)
float getSplitClusterErrorY() const
SiPixelCluster & operator=(SiPixelCluster const &)=default
edm::DetSetVector< SiPixelCluster > SiPixelClusterCollection
edm::Ref< SiPixelClusterCollectionNew, SiPixelCluster > SiPixelClusterRefNew
edmNew::DetSetVector< SiPixelCluster > SiPixelClusterCollectionNew
bool operator<(DTCELinkId const &lhs, DTCELinkId const &rhs)
Pixel cluster – collection of neighboring pixels above threshold.
float getSplitClusterErrorX() const
static unsigned int const shift
static constexpr unsigned int MAXSPAN
constexpr int row() const
const std::vector< Pixel > pixels() const
uint16_t *__restrict__ uint16_t const *__restrict__ adc