CMS 3D CMS Logo

List of all members | Public Member Functions
SiPixelGainCalibrationOfflineService Class Reference

#include <SiPixelGainCalibrationOfflineService.h>

Inheritance diagram for SiPixelGainCalibrationOfflineService:
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd > 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)
 
 SiPixelGainCalibrationOfflineService (const edm::ParameterSet &conf)
 
 ~SiPixelGainCalibrationOfflineService ()
 
- Public Member Functions inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >
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< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >
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< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >
edm::ParameterSet conf_
 
bool ESetupInit_
 
double gainHigh_
 
double gainLow_
 
int numberOfRowsAveragedOver_
 
int old_cols
 
uint32_t old_detID
 
SiPixelGainCalibrationOffline::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< SiPixelGainCalibrationOfflineped
 
double pedHigh_
 
double pedLow_
 

Detailed Description

Definition at line 21 of file SiPixelGainCalibrationOfflineService.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 32 of file SiPixelGainCalibrationOfflineService.cc.

References SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getGainByColumn(), isDead(), isNoisy(), and SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::throwExepctionForBadRead().

Referenced by ~SiPixelGainCalibrationOfflineService().

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("Offline 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)
bool isDead(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
col
Definition: cuy.py:1008
float SiPixelGainCalibrationOfflineService::getPedestal ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 19 of file SiPixelGainCalibrationOfflineService.cc.

References SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getPedestalByPixel(), isDead(), isNoisy(), and SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::throwExepctionForBadRead().

Referenced by ~SiPixelGainCalibrationOfflineService().

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("Offline getPedestal()", detID, col, row, pedestalValue);
27  return 0.0;
28  }
29  return pedestalValue;
30 }
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
bool isDead(const uint32_t &detID, const int &col, const int &row)
void throwExepctionForBadRead(std::string payload, const uint32_t &detID, const int &col, const int &row, double value=-1) const
col
Definition: cuy.py:1008
bool SiPixelGainCalibrationOfflineService::isDead ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 45 of file SiPixelGainCalibrationOfflineService.cc.

References MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getPedestalByPixel(), isNoisy(), and cms::Exception::what().

Referenced by getGain(), getPedestal(), isDeadColumn(), isNoisy(), isNoisyColumn(), and ~SiPixelGainCalibrationOfflineService().

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("SiPixelGainCalibrationOfflineService") << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
57  isDead = false;
58  }
59  return isDead;
60 }
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
char const * what() const override
Definition: Exception.cc:141
bool isDead(const uint32_t &detID, const int &col, const int &row)
col
Definition: cuy.py:1008
bool SiPixelGainCalibrationOfflineService::isDeadColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 79 of file SiPixelGainCalibrationOfflineService.cc.

References MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getGainByColumn(), isDead(), isNoisy(), and cms::Exception::what().

Referenced by ~SiPixelGainCalibrationOfflineService().

80 {
81  bool isDead = false;
82  bool isNoisy = false;
83  try
84  {
85  this->getGainByColumn(detID, col, row, isDead, isNoisy); // the gain column average can flag a whole column as bad
86  }
87  catch (cms::Exception& e)
88  {
89  // Do not stop processing if you check if a nonexistant pixel is dead
90  edm::LogInfo("SiPixelGainCalibrationOfflineService") << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
91  isDead = false;
92  }
93  return isDead;
94 }
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
char const * what() const override
Definition: Exception.cc:141
bool isDead(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)
col
Definition: cuy.py:1008
bool SiPixelGainCalibrationOfflineService::isNoisy ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 62 of file SiPixelGainCalibrationOfflineService.cc.

References MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getPedestalByPixel(), isDead(), and cms::Exception::what().

Referenced by getGain(), getPedestal(), isDead(), isDeadColumn(), isNoisyColumn(), and ~SiPixelGainCalibrationOfflineService().

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 dead
73  edm::LogInfo("SiPixelGainCalibrationOfflineService") << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
74  isNoisy = false;
75  }
76  return isNoisy;
77 }
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
char const * what() const override
Definition: Exception.cc:141
bool isDead(const uint32_t &detID, const int &col, const int &row)
col
Definition: cuy.py:1008
bool SiPixelGainCalibrationOfflineService::isNoisyColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
virtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 96 of file SiPixelGainCalibrationOfflineService.cc.

References MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getGainByColumn(), isDead(), isNoisy(), and cms::Exception::what().

Referenced by ~SiPixelGainCalibrationOfflineService().

97 {
98  bool isDead = false;
99  bool isNoisy = false;
100  try
101  {
102  this->getGainByColumn(detID, col, row, isDead, isNoisy); // the gain column average can flag a whole column as bad
103  }
104  catch (cms::Exception& e)
105  {
106  // Do not stop processing if you check if a nonexistant pixel is dead
107  edm::LogInfo("SiPixelGainCalibrationOfflineService") << "Attempting to check if nonexistant pixel is Noisy. Exception message: " << e.what();
108  isNoisy = false;
109  }
110  return isNoisy;
111 }
bool isNoisy(const uint32_t &detID, const int &col, const int &row)
char const * what() const override
Definition: Exception.cc:141
bool isDead(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)
col
Definition: cuy.py:1008