Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "CalibTracker/SiPixelESProducers/interface/SiPixelGainCalibrationService.h"
00018
00019 float SiPixelGainCalibrationService::getPedestal( const uint32_t& detID,const int& col, const int& row)
00020 {
00021 bool isDead = false;
00022 bool isNoisy = false;
00023 float pedestalValue = this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
00024 if (isDead || isNoisy)
00025 {
00026 this->throwExepctionForBadRead("FullCalibration getPedestal()",detID, col, row, pedestalValue);
00027 return 0.0;
00028 }
00029 return pedestalValue;
00030 }
00031
00032 float SiPixelGainCalibrationService::getGain( const uint32_t& detID,const int& col, const int& row)
00033 {
00034 bool isDead = false;
00035 bool isNoisy = false;
00036 float gainValue = this->getGainByColumn(detID, col, row, isDead, isNoisy);
00037 if (isDead || isNoisy)
00038 {
00039 this->throwExepctionForBadRead("FullCalibration getGain()",detID, col, row, gainValue);
00040 return 0.0;
00041 }
00042 return gainValue;
00043 }
00044
00045 bool SiPixelGainCalibrationService::isDead( const uint32_t& detID,const int& col, const int& row)
00046 {
00047 bool isDead = false;
00048 bool isNoisy = false;
00049 try
00050 {
00051 this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
00052 }
00053 catch (cms::Exception& e)
00054 {
00055
00056 edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
00057 isDead = false;
00058 }
00059 return isDead;
00060 }
00061
00062 bool SiPixelGainCalibrationService::isNoisy( const uint32_t& detID,const int& col, const int& row)
00063 {
00064 bool isDead = false;
00065 bool isNoisy = false;
00066 try
00067 {
00068 this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
00069 }
00070 catch (cms::Exception& e)
00071 {
00072
00073 edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
00074 isNoisy = false;
00075 }
00076 return isNoisy;
00077 }
00078
00079 bool SiPixelGainCalibrationService::isDeadColumn( const uint32_t& detID,const int& col, const int& row)
00080 {
00081 edm::LogError("SiPixelGainCalibrationService") << "You attempted to check if an entire column was dead with a payload that stores information at pixel granularity. Please check by pixel. THANKS!";
00082 return false;
00083 }
00084
00085 bool SiPixelGainCalibrationService::isNoisyColumn( const uint32_t& detID,const int& col, const int& row)
00086 {
00087 edm::LogError("SiPixelGainCalibrationService") << "You attempted to check if an entire column was noisy with a payload that stores information at pixel granularity. Please check by pixel. THANKS!";
00088 return false;
00089 }