CMS 3D CMS Logo

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

#include <SiPixelGainCalibrationForHLTSimService.h>

Inheritance diagram for SiPixelGainCalibrationForHLTSimService:
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd > SiPixelGainCalibrationServiceBase

Public Member Functions

float getGain (const uint32_t &detID, const int &col, const int &row) override
 
float getPedestal (const uint32_t &detID, const int &col, const int &row) override
 
bool isDead (const uint32_t &detID, const int &col, const int &row) override
 
bool isDeadColumn (const uint32_t &detID, const int &col, const int &row) override
 
bool isNoisy (const uint32_t &detID, const int &col, const int &row) override
 
bool isNoisyColumn (const uint32_t &detID, const int &col, const int &row) override
 
 SiPixelGainCalibrationForHLTSimService (const edm::ParameterSet &conf, edm::ConsumesCollector iC)
 
- Public Member Functions inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >
std::vector< uint32_t > getDetIds () override
 
double getGainHigh () override
 
double getGainLow () override
 
double getPedHigh () override
 
double getPedLow () override
 
SiPixelGainCalibrationForHLTconst & payload () const
 
void setESObjects (const edm::EventSetup &es) override
 
 SiPixelGainCalibrationServicePayloadGetter (const edm::ParameterSet &conf, edm::ConsumesCollector iC)
 
- 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
 
- Static Public Member Functions inherited from SiPixelGainCalibrationServiceBase
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- Protected Member Functions inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >
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< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >
edm::ParameterSet conf_
 
bool ESetupInit_
 
double gainHigh_
 
double gainLow_
 
int numberOfRowsAveragedOver_
 
int old_cols
 
uint32_t old_detID
 
SiPixelGainCalibrationForHLT::Range old_range
 
int oldAveragedBlockDataGain_
 
int oldAveragedBlockDataPed_
 
int oldColumnIndexGain_
 
int oldColumnIndexPed_
 
float oldColumnValueGain_
 
float oldColumnValuePed_
 
bool oldThisColumnIsDeadGain_
 
bool oldThisColumnIsDeadPed_
 
bool oldThisColumnIsNoisyGain_
 
bool oldThisColumnIsNoisyPed_
 
const
SiPixelGainCalibrationForHLT
ped
 
double pedHigh_
 
double pedLow_
 
const edm::ESGetToken
< SiPixelGainCalibrationForHLT,
SiPixelGainCalibrationForHLTSimRcd
pedToken_
 

Detailed Description

Definition at line 22 of file SiPixelGainCalibrationForHLTSimService.h.

Constructor & Destructor Documentation

SiPixelGainCalibrationForHLTSimService::SiPixelGainCalibrationForHLTSimService ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC 
)
inlineexplicit

Member Function Documentation

float SiPixelGainCalibrationForHLTSimService::getGain ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 30 of file SiPixelGainCalibrationForHLTSimService.cc.

References SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::getGainByColumn(), isDead(), isNoisy(), and SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::throwExepctionForBadRead().

30  {
31  bool isDead = false;
32  bool isNoisy = false;
33  float gainValue = this->getGainByColumn(detID, col, row, isDead, isNoisy);
34  if (isDead || isNoisy) {
35  this->throwExepctionForBadRead("HLT getGain()", detID, col, row, gainValue);
36  return 0.0;
37  }
38  return gainValue;
39 }
bool isDead(const uint32_t &detID, const int &col, const int &row) override
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 isNoisy(const uint32_t &detID, const int &col, const int &row) override
int col
Definition: cuy.py:1009
float SiPixelGainCalibrationForHLTSimService::getPedestal ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 19 of file SiPixelGainCalibrationForHLTSimService.cc.

References SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::getPedestalByColumn(), isDead(), isNoisy(), and SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::throwExepctionForBadRead().

19  {
20  bool isDead = false;
21  bool isNoisy = false;
22  float pedestalValue = this->getPedestalByColumn(detID, col, row, isDead, isNoisy);
23  if (isDead || isNoisy) {
24  this->throwExepctionForBadRead("HLT getPedestal()", detID, col, row, pedestalValue);
25  return 0.0;
26  }
27  return pedestalValue;
28 }
float getPedestalByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
bool isDead(const uint32_t &detID, const int &col, const int &row) override
void throwExepctionForBadRead(std::string payload, const uint32_t &detID, const int &col, const int &row, double value=-1) const
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
int col
Definition: cuy.py:1009
bool SiPixelGainCalibrationForHLTSimService::isDead ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 41 of file SiPixelGainCalibrationForHLTSimService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::getPedestalByColumn(), isNoisy(), and cms::Exception::what().

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

41  {
42  bool isDead = false;
43  bool isNoisy = false;
44  try {
45  this->getPedestalByColumn(detID, col, row, isDead, isNoisy); //pedestal stores dead column value as well
46  } catch (cms::Exception& e) {
47  // Do not stop processing if you check if a nonexistant pixel is dead
48  edm::LogInfo("SiPixelGainCalibrationForHLTSimService")
49  << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
50  isDead = false;
51  }
52  return isDead;
53 }
float getPedestalByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
bool isDead(const uint32_t &detID, const int &col, const int &row) override
char const * what() const noexceptoverride
Definition: Exception.cc:103
Log< level::Info, false > LogInfo
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
int col
Definition: cuy.py:1009
bool SiPixelGainCalibrationForHLTSimService::isDeadColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 69 of file SiPixelGainCalibrationForHLTSimService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::getGainByColumn(), isDead(), isNoisy(), and cms::Exception::what().

69  {
70  bool isDead = false;
71  bool isNoisy = false;
72  try {
73  this->getGainByColumn(detID, col, row, isDead, isNoisy);
74  } catch (cms::Exception& e) {
75  // Do not stop processing if you check if a nonexistant pixel is dead
76  edm::LogInfo("SiPixelGainCalibrationForHLTSimService")
77  << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
78  isDead = false;
79  }
80  return isDead;
81 }
bool isDead(const uint32_t &detID, const int &col, const int &row) override
float getGainByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
char const * what() const noexceptoverride
Definition: Exception.cc:103
Log< level::Info, false > LogInfo
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
int col
Definition: cuy.py:1009
bool SiPixelGainCalibrationForHLTSimService::isNoisy ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 55 of file SiPixelGainCalibrationForHLTSimService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::getPedestalByColumn(), isDead(), and cms::Exception::what().

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

55  {
56  bool isDead = false;
57  bool isNoisy = false;
58  try {
59  this->getPedestalByColumn(detID, col, row, isDead, isNoisy); //pedestal stores noisy column value as well
60  } catch (cms::Exception& e) {
61  // Do not stop processing if you check if a nonexistant pixel is noisy
62  edm::LogInfo("SiPixelGainCalibrationForHLTSimService")
63  << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
64  isNoisy = false;
65  }
66  return isNoisy;
67 }
float getPedestalByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
bool isDead(const uint32_t &detID, const int &col, const int &row) override
char const * what() const noexceptoverride
Definition: Exception.cc:103
Log< level::Info, false > LogInfo
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
int col
Definition: cuy.py:1009
bool SiPixelGainCalibrationForHLTSimService::isNoisyColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 83 of file SiPixelGainCalibrationForHLTSimService.cc.

References alignCSCRings::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >::getGainByColumn(), isDead(), isNoisy(), and cms::Exception::what().

83  {
84  bool isDead = false;
85  bool isNoisy = false;
86  try {
87  this->getGainByColumn(detID, col, row, isDead, isNoisy);
88  } catch (cms::Exception& e) {
89  // Do not stop processing if you check if a nonexistant pixel is noisy
90  edm::LogInfo("SiPixelGainCalibrationForHLTSimService")
91  << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
92  isNoisy = false;
93  }
94  return isNoisy;
95 }
bool isDead(const uint32_t &detID, const int &col, const int &row) override
float getGainByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
char const * what() const noexceptoverride
Definition: Exception.cc:103
Log< level::Info, false > LogInfo
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
int col
Definition: cuy.py:1009