23 std::tie(range,cols) =
ped->getRangeAndNCols(detID);
27 int oldCol=-1, oldAveragedBlock=-1;
30 int col = di->column();
32 if ( (col!=oldCol) | ( averagedBlock != oldAveragedBlock) ) {
33 oldCol=
col; oldAveragedBlock= averagedBlock;
34 std::tie(pedestal,gain) =
ped->getPedAndGain(col, row, range, cols, isDeadColumn,
isNoisyColumn);
38 float vcal = di->adc() * gain - pedestal*gain;
40 electron[i++] = int( vcal * conversionFactor + offset);
54 if (isDead || isNoisy)
66 float gainValue = this->
getGainByColumn(detID, col, row, isDead, isNoisy);
67 if (isDead || isNoisy)
86 edm::LogInfo(
"SiPixelGainCalibrationForHLTService") <<
"Attempting to check if nonexistant pixel is dead. Exception message: " << e.
what();
103 edm::LogInfo(
"SiPixelGainCalibrationForHLTService") <<
"Attempting to check if nonexistant pixel is noisy. Exception message: " << e.
what();
120 edm::LogInfo(
"SiPixelGainCalibrationForHLTService") <<
"Attempting to check if nonexistant pixel is dead. Exception message: " << e.
what();
137 edm::LogInfo(
"SiPixelGainCalibrationForHLTService") <<
"Attempting to check if nonexistant pixel is noisy. Exception message: " << e.
what();
virtual char const * what() const
int numberOfRowsAveragedOver_
edm::DetSet< PixelDigi >::const_iterator DigiIterator
bool isDeadColumn(const uint32_t &detID, const int &col, const int &row)
float getGain(const uint32_t &detID, const int &col, const int &row)
std::pair< ContainerIterator, ContainerIterator > Range
float getPedestalByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
float getGainByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
void throwExepctionForBadRead(std::string payload, const uint32_t &detID, const int &col, const int &row, double value=-1) const
edm::ESHandle< SiPixelGainCalibrationForHLT > ped
bool isNoisyColumn(const uint32_t &detID, const int &col, const int &row)
bool isDead(const uint32_t &detID, const int &col, const int &row)
float getPedestal(const uint32_t &detID, const int &col, const int &row)
void calibrate(uint32_t detID, DigiIterator b, DigiIterator e, float conversionFactor, float offset, int *electron)
bool isNoisy(const uint32_t &detID, const int &col, const int &row)