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) {}
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)
PixelPos(int row, int col)
void verifyVersion() const
mostly to be compatible for <610
std::vector< PixelDigi >::const_iterator PixelDigiIter
static const unsigned int SPANBITS
void computeMax()
moslty to be compatible for <610
edm::RefProd< SiPixelClusterCollection > SiPixelClusterRefProd
void packRow(uint16_t xmin, uint16_t xspan)
void packCol(uint16_t ymin, uint16_t yspan)
std::vector< uint16_t > thePixelADC
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
static const unsigned int POSBITS
PixelPos operator+(const Shift &shift) const
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
static const unsigned int MAXPOS
void setSplitClusterErrorX(float errx)
float getSplitClusterErrorY() const
edm::DetSetVector< SiPixelCluster > SiPixelClusterCollection
edm::Ref< SiPixelClusterCollectionNew, SiPixelCluster > SiPixelClusterRefNew
Pixel(int pix_x, int pix_y, int pix_adc)
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
std::pair< PixelDigiIter, PixelDigiIter > PixelDigiRange
const std::vector< Pixel > pixels() const
static const unsigned int MAXSPAN