CMS 3D CMS Logo

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)
 
 ~SiPixelGainCalibrationForHLTSimService () override
 
- 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
 
void setESObjects (const edm::EventSetup &es) override
 
 SiPixelGainCalibrationServicePayloadGetter (const edm::ParameterSet &conf)
 
 ~SiPixelGainCalibrationServicePayloadGetter () override
 
- 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< 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_
 
edm::ESHandle< SiPixelGainCalibrationForHLTped
 
double pedHigh_
 
double pedLow_
 

Detailed Description

Definition at line 22 of file SiPixelGainCalibrationForHLTSimService.h.

Constructor & Destructor Documentation

SiPixelGainCalibrationForHLTSimService::SiPixelGainCalibrationForHLTSimService ( const edm::ParameterSet conf)
inlineexplicit
SiPixelGainCalibrationForHLTSimService::~SiPixelGainCalibrationForHLTSimService ( )
inlineoverride

Member Function Documentation

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

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 32 of file SiPixelGainCalibrationForHLTSimService.cc.

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

Referenced by ~SiPixelGainCalibrationForHLTSimService().

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("HLT getGain()", detID, col, row, gainValue);
40  return 0.0;
41  }
42  return gainValue;
43 }
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
col
Definition: cuy.py:1008
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().

Referenced by ~SiPixelGainCalibrationForHLTSimService().

20 {
21  bool isDead = false;
22  bool isNoisy = false;
23  float pedestalValue = this->getPedestalByColumn(detID, col, row, isDead, isNoisy);
24  if (isDead || isNoisy)
25  {
26  this->throwExepctionForBadRead("HLT getPedestal()", detID, col, row, pedestalValue);
27  return 0.0;
28  }
29  return pedestalValue;
30 }
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
col
Definition: cuy.py:1008
bool SiPixelGainCalibrationForHLTSimService::isDead ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 45 of file SiPixelGainCalibrationForHLTSimService.cc.

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

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

46 {
47  bool isDead = false;
48  bool isNoisy = false;
49  try
50  {
51  this->getPedestalByColumn(detID, col, row, isDead, isNoisy); //pedestal stores dead column value as well
52  }
53  catch (cms::Exception& e)
54  {
55  // Do not stop processing if you check if a nonexistant pixel is dead
56  edm::LogInfo("SiPixelGainCalibrationForHLTSimService") << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
57  isDead = false;
58  }
59  return isDead;
60 }
char const * what() const override
Definition: Exception.cc:141
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
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
col
Definition: cuy.py:1008
bool SiPixelGainCalibrationForHLTSimService::isDeadColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 79 of file SiPixelGainCalibrationForHLTSimService.cc.

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

Referenced by ~SiPixelGainCalibrationForHLTSimService().

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

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 62 of file SiPixelGainCalibrationForHLTSimService.cc.

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

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

63 {
64  bool isDead = false;
65  bool isNoisy = false;
66  try
67  {
68  this->getPedestalByColumn(detID, col, row, isDead, isNoisy); //pedestal stores noisy column value as well
69  }
70  catch (cms::Exception& e)
71  {
72  // Do not stop processing if you check if a nonexistant pixel is noisy
73  edm::LogInfo("SiPixelGainCalibrationForHLTSimService") << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
74  isNoisy = false;
75  }
76  return isNoisy;
77 }
char const * what() const override
Definition: Exception.cc:141
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
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
col
Definition: cuy.py:1008
bool SiPixelGainCalibrationForHLTSimService::isNoisyColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationForHLT, SiPixelGainCalibrationForHLTSimRcd >.

Definition at line 96 of file SiPixelGainCalibrationForHLTSimService.cc.

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

Referenced by ~SiPixelGainCalibrationForHLTSimService().

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