CMS 3D CMS Logo

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) 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
 
 SiPixelGainCalibrationService (const edm::ParameterSet &conf)
 
 ~SiPixelGainCalibrationService () override
 
- Public Member Functions inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >
std::vector< uint32_t > getDetIds () override
 
double getGainHigh () override
 
double getGainLow () override
 
double getPedHigh () override
 
double getPedLow () override
 
SiPixelGainCalibration const & payload () const
 
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
 
- Static Public Member Functions inherited from SiPixelGainCalibrationServiceBase
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- 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< SiPixelGainCalibrationped
 
double pedHigh_
 
double pedLow_
 

Detailed Description

Definition at line 21 of file SiPixelGainCalibrationService.h.

Constructor & Destructor Documentation

◆ SiPixelGainCalibrationService()

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

◆ ~SiPixelGainCalibrationService()

SiPixelGainCalibrationService::~SiPixelGainCalibrationService ( )
inlineoverride

Definition at line 26 of file SiPixelGainCalibrationService.h.

26 {};

Member Function Documentation

◆ getGain()

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

◆ getPedestal()

float SiPixelGainCalibrationService::getPedestal ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

◆ isDead()

bool SiPixelGainCalibrationService::isDead ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 61 of file SiPixelGainCalibrationService.cc.

61  {
62  bool isDead = false;
63  bool isNoisy = false;
64  try {
65  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
66  } catch (cms::Exception& e) {
67  // Do not stop processing if you check if a nonexistant pixel is dead
68  edm::LogInfo("SiPixelGainCalibrationService")
69  << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
70  isDead = false;
71  }
72  return isDead;
73 }

References cuy::col, MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), and isNoisy().

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

◆ isDeadColumn()

bool SiPixelGainCalibrationService::isDeadColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 89 of file SiPixelGainCalibrationService.cc.

89  {
90  edm::LogError("SiPixelGainCalibrationService")
91  << "You attempted to check if an entire column was dead with a payload that stores information at pixel "
92  "granularity. Please check by pixel. THANKS!";
93  return false;
94 }

◆ isNoisy()

bool SiPixelGainCalibrationService::isNoisy ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 75 of file SiPixelGainCalibrationService.cc.

75  {
76  bool isDead = false;
77  bool isNoisy = false;
78  try {
79  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
80  } catch (cms::Exception& e) {
81  // Do not stop processing if you check if a nonexistant pixel is noisy
82  edm::LogInfo("SiPixelGainCalibrationService")
83  << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
84  isNoisy = false;
85  }
86  return isNoisy;
87 }

References cuy::col, MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel(), and isDead().

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

◆ isNoisyColumn()

bool SiPixelGainCalibrationService::isNoisyColumn ( const uint32_t &  detID,
const int &  col,
const int &  row 
)
overridevirtual

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >.

Definition at line 96 of file SiPixelGainCalibrationService.cc.

96  {
97  edm::LogError("SiPixelGainCalibrationService")
98  << "You attempted to check if an entire column was noisy with a payload that stores information at pixel "
99  "granularity. Please check by pixel. THANKS!";
100  return false;
101 }
SiPixelGainCalibrationService::isNoisy
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
Definition: SiPixelGainCalibrationService.cc:75
cuy.col
col
Definition: cuy.py:1010
edm::LogInfo
Definition: MessageLogger.h:254
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getGainByColumn
float getGainByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
Definition: SiPixelGainCalibrationServiceBase.h:265
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >
edm::LogError
Definition: MessageLogger.h:183
cms::Exception
Definition: Exception.h:70
SiPixelGainCalibrationService::isDead
bool isDead(const uint32_t &detID, const int &col, const int &row) override
Definition: SiPixelGainCalibrationService.cc:61
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::throwExepctionForBadRead
void throwExepctionForBadRead(std::string payload, const uint32_t &detID, const int &col, const int &row, double value=-1) const
Definition: SiPixelGainCalibrationServiceBase.h:302
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibration, SiPixelGainCalibrationRcd >::getPedestalByPixel
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
Definition: SiPixelGainCalibrationServiceBase.h:186