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
 SiPixelGainCalibrationServiceBase ()
 
virtual ~SiPixelGainCalibrationServiceBase ()
 

Additional Inherited Members

- 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
 

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 32 of file SiPixelGainCalibrationService.cc.

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

33 {
34  bool isDead = false;
35  bool isNoisy = false;
36  float gainValue = this->getGainByColumn(detID, col, row, isDead, isNoisy);
37  if (isDead || isNoisy)
38  {
39  this->throwExepctionForBadRead("FullCalibration getGain()",detID, col, row, gainValue);
40  return 0.0;
41  }
42  return gainValue;
43 }
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
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 19 of file SiPixelGainCalibrationService.cc.

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

20 {
21  bool isDead = false;
22  bool isNoisy = false;
23  float pedestalValue = this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
24  if (isDead || isNoisy)
25  {
26  this->throwExepctionForBadRead("FullCalibration getPedestal()",detID, col, row, pedestalValue);
27  return 0.0;
28  }
29  return pedestalValue;
30 }
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
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 45 of file SiPixelGainCalibrationService.cc.

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

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

46 {
47  bool isDead = false;
48  bool isNoisy = false;
49  try
50  {
51  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
52  }
53  catch (cms::Exception& e)
54  {
55  // Do not stop processing if you check if a nonexistant pixel is dead
56  edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
57  isDead = false;
58  }
59  return isDead;
60 }
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)
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 79 of file SiPixelGainCalibrationService.cc.

80 {
81  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!";
82  return false;
83 }
bool SiPixelGainCalibrationService::isNoisy ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 62 of file SiPixelGainCalibrationService.cc.

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

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

63 {
64  bool isDead = false;
65  bool isNoisy = false;
66  try
67  {
68  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
69  }
70  catch (cms::Exception& e)
71  {
72  // Do not stop processing if you check if a nonexistant pixel is noisy
73  edm::LogInfo("SiPixelGainCalibrationService") << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
74  isNoisy = false;
75  }
76  return isNoisy;
77 }
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)
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 85 of file SiPixelGainCalibrationService.cc.

86 {
87  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!";
88  return false;
89 }