1 #ifndef DataFormats_SiPixel_Cluster_SiPixelCluster_h
2 #define DataFormats_SiPixel_Cluster_SiPixelCluster_h
26 #include "boost/cstdint.hpp"
40 x(pix_x),
y(pix_y),
adc(pix_adc) {}
83 static const unsigned int POSBITS=10;
84 static const unsigned int SPANBITS=6;
85 static const unsigned int MAXSPAN=63;
86 static const unsigned int MAXPOS=1023;
96 uint16_t
const * xpos, uint16_t
const * ypos,
97 uint16_t
const xmin, uint16_t
const ymin) :
101 for (
unsigned int i=0;
i!=isize; ++
i) {
102 uint16_t xoffset = xpos[
i]-
xmin;
103 uint16_t yoffset = ypos[
i]-
ymin;
106 if (xoffset > maxRow) maxRow = xoffset;
107 if (yoffset > maxCol) maxCol = yoffset;
116 void add(
const PixelPos& pix,
int adc);
122 for (
int i=0;
i<isize; ++
i)
130 for (
int i=0;
i<isize; ++
i)
148 for (
int i=0;
i<isize; ++
i)
163 const std::vector<Pixel>
pixels()
const {
164 std::vector<Pixel> oldPixVector;
166 oldPixVector.reserve(isize);
167 for(
int i=0;
i<isize; ++
i) {
168 oldPixVector.push_back(
pixel(
i));
185 static uint16_t
pack_(uint16_t
zmin,
unsigned short zspan) {
222 for (
int i=0;
i!=isize; ++
i) {
224 if (xsize > maxRow) maxRow = xsize;
226 if (ysize > maxCol) maxCol = ysize;
int adc(sample_type sample)
get the ADC sample (12 bits)
void setSplitClusterErrorY(float erry)
static uint16_t pack_(uint16_t zmin, unsigned short zspan)
void verifyVersion() const
mostly to be compatible for <610
std::vector< PixelDigi >::const_iterator PixelDigiIter
static constexpr unsigned int SPANBITS
void computeMax()
moslty to be compatible for <610
static constexpr unsigned int POSBITS
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
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
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 const xmin, uint16_t const ymin)
static int span_(uint16_t packed)
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
void setSplitClusterErrorX(float errx)
float getSplitClusterErrorY() const
edm::DetSetVector< SiPixelCluster > SiPixelClusterCollection
edm::Ref< SiPixelClusterCollectionNew, SiPixelCluster > SiPixelClusterRefNew
edmNew::DetSetVector< SiPixelCluster > SiPixelClusterCollectionNew
Pixel cluster – collection of neighboring pixels above threshold.
static int overflow_(uint16_t packed)
float getSplitClusterErrorX() const
static unsigned int const shift
static constexpr unsigned int MAXSPAN
std::pair< PixelDigiIter, PixelDigiIter > PixelDigiRange
constexpr int row() const
const std::vector< Pixel > pixels() const