CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
SiPixelGainCalibrationService Class Reference

#include <SiPixelGainCalibrationService.h>

Inheritance diagram for SiPixelGainCalibrationService:
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd > SiPixelGainCalibrationServiceBase

Public Member Functions

float getGain (const uint32_t &detID, const int &col, const int &row)
 
float getPedestal (const uint32_t &detID, const int &col, const int &row)
 
bool isDead (const uint32_t &detID, const int &col, const int &row)
 
bool isDeadColumn (const uint32_t &detID, const int &col, const int &row)
 
bool isNoisy (const uint32_t &detID, const int &col, const int &row)
 
bool isNoisyColumn (const uint32_t &detID, const int &col, const int &row)
 
 SiPixelGainCalibrationService (const edm::ParameterSet &conf)
 
 ~SiPixelGainCalibrationService ()
 
- Public Member Functions inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >
std::vector< uint32_t > getDetIds ()
 
double getGainHigh ()
 
double getGainLow ()
 
double getPedHigh ()
 
double getPedLow ()
 
void setESObjects (const edm::EventSetup &es)
 
 SiPixelGainCalibrationServicePayloadGetter (const edm::ParameterSet &conf)
 
virtual ~SiPixelGainCalibrationServicePayloadGetter ()
 
- Public Member Functions inherited from SiPixelGainCalibrationServiceBase
virtual void calibrate (uint32_t detID, DigiIterator b, DigiIterator e, float conversionFactor, float offset, int *electron)
 
 SiPixelGainCalibrationServiceBase ()
 
virtual ~SiPixelGainCalibrationServiceBase ()
 

Additional Inherited Members

- Public Types inherited from SiPixelGainCalibrationServiceBase
typedef edm::DetSet< PixelDigi >
::const_iterator 
DigiIterator
 
- Protected Member Functions inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >
float getGainByColumn (const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
 
float getGainByPixel (const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
 
float getPedestalByColumn (const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
 
float getPedestalByPixel (const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
 
void throwExepctionForBadRead (std::string payload, const uint32_t &detID, const int &col, const int &row, double value=-1) const
 
- Protected Attributes inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >
edm::ParameterSet conf_
 
bool ESetupInit_
 
double gainHigh_
 
double gainLow_
 
int numberOfRowsAveragedOver_
 
int old_cols
 
uint32_t old_detID
 
SiPixelGainCalibration::Range old_range
 
int oldAveragedBlockDataGain_
 
int oldAveragedBlockDataPed_
 
int oldColumnIndexGain_
 
int oldColumnIndexPed_
 
float oldColumnValueGain_
 
float oldColumnValuePed_
 
bool oldThisColumnIsDeadGain_
 
bool oldThisColumnIsDeadPed_
 
bool oldThisColumnIsNoisyGain_
 
bool oldThisColumnIsNoisyPed_
 
edm::ESHandle
< SiPixelGainCalibration
ped
 
double pedHigh_
 
double pedLow_
 

Detailed Description

Definition at line 21 of file SiPixelGainCalibrationService.h.

Constructor & Destructor Documentation

SiPixelGainCalibrationService::SiPixelGainCalibrationService ( const edm::ParameterSet conf)
inlineexplicit
SiPixelGainCalibrationService::~SiPixelGainCalibrationService ( )
inline

Definition at line 26 of file SiPixelGainCalibrationService.h.

26 {};

Member Function Documentation

float SiPixelGainCalibrationService::getGain ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 54 of file SiPixelGainCalibrationService.cc.

References SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getGainByColumn(), isDead(), isNoisy(), and SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::throwExepctionForBadRead().

55 {
56  bool isDead = false;
57  bool isNoisy = false;
58  float gainValue = this->getGainByColumn(detID, col, row, isDead, isNoisy);
59  if (isDead || isNoisy)
60  {
61  this->throwExepctionForBadRead("FullCalibration getGain()",detID, col, row, gainValue);
62  return 0.0;
63  }
64  return gainValue;
65 }
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
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
int col
Definition: cuy.py:1008
bool isDead(const uint32_t &detID, const int &col, const int &row)
float SiPixelGainCalibrationService::getPedestal ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 41 of file SiPixelGainCalibrationService.cc.

References SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), isDead(), isNoisy(), and SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::throwExepctionForBadRead().

42 {
43  bool isDead = false;
44  bool isNoisy = false;
45  float pedestalValue = this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
46  if (isDead || isNoisy)
47  {
48  this->throwExepctionForBadRead("FullCalibration getPedestal()",detID, col, row, pedestalValue);
49  return 0.0;
50  }
51  return pedestalValue;
52 }
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
void throwExepctionForBadRead(std::string payload, const uint32_t &detID, const int &col, const int &row, double value=-1) const
int col
Definition: cuy.py:1008
bool isDead(const uint32_t &detID, const int &col, const int &row)
bool SiPixelGainCalibrationService::isDead ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 67 of file SiPixelGainCalibrationService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), isNoisy(), and cms::Exception::what().

Referenced by getGain(), getPedestal(), and isNoisy().

68 {
69  bool isDead = false;
70  bool isNoisy = false;
71  try
72  {
73  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
74  }
75  catch (cms::Exception& e)
76  {
77  // Do not stop processing if you check if a nonexistant pixel is dead
78  edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
79  isDead = false;
80  }
81  return isDead;
82 }
virtual char const * what() const
Definition: Exception.cc:141
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
int col
Definition: cuy.py:1008
bool isDead(const uint32_t &detID, const int &col, const int &row)
bool SiPixelGainCalibrationService::isDeadColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 101 of file SiPixelGainCalibrationService.cc.

102 {
103  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!";
104  return false;
105 }
bool SiPixelGainCalibrationService::isNoisy ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 84 of file SiPixelGainCalibrationService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), isDead(), and cms::Exception::what().

Referenced by getGain(), getPedestal(), and isDead().

85 {
86  bool isDead = false;
87  bool isNoisy = false;
88  try
89  {
90  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
91  }
92  catch (cms::Exception& e)
93  {
94  // Do not stop processing if you check if a nonexistant pixel is noisy
95  edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
96  isNoisy = false;
97  }
98  return isNoisy;
99 }
virtual char const * what() const
Definition: Exception.cc:141
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
int col
Definition: cuy.py:1008
bool isDead(const uint32_t &detID, const int &col, const int &row)
bool SiPixelGainCalibrationService::isNoisyColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 107 of file SiPixelGainCalibrationService.cc.

108 {
109  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!";
110  return false;
111 }