22 edm::LogInfo(
"CTPPSPixelGainCalibration")<<
"Default instance of CTPPSPixelGainCalibration" ;
34 myreg.
iend = sensorSize;
36 myreg.
nrows = sensorSize/nCols;
38 edm::LogInfo(
"CTPPSPixelGainCalibration") <<
"Instance of CTPPSPixelGainCalibration setting detId = " << detId <<
" and npix = " << sensorSize <<
" and ncols = " << nCols <<
" and nrows= " << myreg.
nrows;
57 edm::LogInfo(
"CTPPSPixelGainCalibration")<<
"Instance of CTPPSPixelGainCalibration setting mininums and maximums";
68 edm::LogInfo(
"CTPPSPixelGainCalibration")<<
"Instance of CTPPSPixelGainCalibration setting detId = "<< detid <<
"and vectors of peds and gains";
73 int sensorSize=peds.size();
74 int gainsSize=gains.size();
75 if(gainsSize!=sensorSize)
76 throw cms::Exception(
"CTPPSPixelGainCalibration payload configuration error")
77 <<
"[CTPPSPixelGainCalibration::CTPPSPixelGainCalibration] peds and gains vector sizes don't match for detid " 78 << detid <<
" size peds = " << sensorSize <<
" size gains = " << gainsSize;
82 myreg.
iend=sensorSize;
83 myreg.
ncols=sensorSize/160;
86 for(
int i = 0 ;
i<sensorSize ; ++
i)
93 if (ped>=0 && gain>=0)
95 <<
"[CTPPSPixelGainCalibration::putData] attempting to fill the vectors that are already filled detid = " <<
indexes.
detid <<
" ipix " << ipix;
98 edm::LogInfo(
"CTPPSPixelGainCalibration")<<
"resetting pixel calibration for noisy or dead flag";
104 <<
"[CTPPSPixelGainCalibration::putData] the order got scrambled detid = "<<
indexes.
detid <<
" ipix " << ipix;
121 edm::LogError(
"CTPPSPixelGainCalibration")<<
"this element ipix = " << ipix <<
" has not been set yet";
131 if (col >= nCols || row >= nRows){
133 <<
"[CTPPSPixelGainCalibration::getPed] Pixel out of range: col " << col <<
" row " << row;
137 int ipix = col + row * nCols;
138 float tmpped =
getPed(ipix);
168 if (col >= nCols || row >= nRows){
170 <<
"[CTPPSPixelGainCalibration::getGain] Pixel out of range: col " << col <<
" row " << row;
174 int ipix = col + row * nCols;
void resetPixData(uint32_t ipix, float ped, float gain)
CTPPSPixelGainCalibration()
std::vector< float > v_pedestals
void setGainsPeds(const uint32_t &detId, const std::vector< float > &peds, const std::vector< float > &gains)
std::vector< float > v_gains
float getPed(const int &col, const int &row) const
void setIndexes(const uint32_t &detId)
void putData(uint32_t ipix, float ped, float gain)
float getGain(const int &col, const int &row) const