14 if(
verbosity_)
edm::LogInfo(
"RPixClusterToHit")<<
" RPixClusterToHit "<<detId<<
" received cluster array of size = "<<clusters.size();
15 for(
unsigned int i=0;
i<clusters.size();
i++){
32 unsigned int thisClusterSize = aCluster.
size();
33 unsigned int thisClusterRowSize = aCluster.
sizeRow();
34 unsigned int thisClusterColSize = aCluster.
sizeCol();
37 unsigned int thisClusterMinRow = aCluster.
minPixelRow();
38 unsigned int thisClusterMinCol = aCluster.
minPixelCol();
41 bool anEdgePixel =
false;
48 bool aBadPixel =
false;
49 for(
unsigned int i = 0;
i < thisClusterSize;
i++){
50 if(aCluster.
pixelADC(
i)==0) aBadPixel =
true;
57 for(
unsigned int i = 1;
i < thisClusterSize;
i++){
65 double avgWLocalX = 0;
66 double avgWLocalY = 0;
68 double weightedVarianceX = 0.;
69 double weightedVarianceY = 0.;
74 for(
unsigned int i = 0;
i < thisClusterSize;
i++){
83 double halfSizeX = (maxPxlX-minPxlX)/2.;
84 double halfSizeY = (maxPxlY-minPxlY)/2.;
85 double avgPxlX = minPxlX + halfSizeX;
86 double avgPxlY = minPxlY + halfSizeY;
91 avgWLocalX += avgPxlX*aCluster.
pixelADC(
i);
92 avgWLocalY += avgPxlY*aCluster.
pixelADC(
i);
98 edm::LogError(
"RPixClusterToHit") <<
" unexpected weights = 0 for cluster (Row_min, Row_max, Col_min, Col_max) = (" 107 double invWeights = 1./
weights;
108 double avgLocalX = avgWLocalX*invWeights;
109 double avgLocalY = avgWLocalY*invWeights;
111 double varianceX = weightedVarianceX*invWeights*invWeights;
112 double varianceY = weightedVarianceY*invWeights*invWeights;
116 CTPPSPixelRecHit rh(lp,le,anEdgePixel,aBadPixel,twoRocs,thisClusterMinRow,thisClusterMinCol,thisClusterSize,thisClusterRowSize,thisClusterColSize);
T getUntrackedParameter(std::string const &, T const &) const
CaloTopology const * topology(0)
unsigned int rowSpan() const
int getDefaultRowDetSize() const
void buildHits(unsigned int detId, const std::vector< CTPPSPixelCluster > &clusters, std::vector< CTPPSPixelRecHit > &hits)
unsigned int size() const
unsigned int colSpan() const
unsigned int minPixelCol() const
void make_hit(CTPPSPixelCluster aCluster, std::vector< CTPPSPixelRecHit > &hits)
const std::vector< uint16_t > & pixelADC() const
int getDefaultColDetSize() const
int getROCId(const int col, const int row) const
unsigned int pixelRow(unsigned int i) const
unsigned int sizeCol() const
void pixelRange(unsigned int arow, unsigned int acol, double &lower_x, double &higher_x, double &lower_y, double &higher_y) const
unsigned int minPixelRow() const
RPixClusterToHit(edm::ParameterSet const &conf)
unsigned int sizeRow() const
unsigned int pixelCol(unsigned int i) const