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) 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
 
 SiPixelGainCalibrationOfflineService (const edm::ParameterSet &conf)
 
 ~SiPixelGainCalibrationOfflineService () override
 
- Public Member Functions inherited from SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >
std::vector< uint32_t > getDetIds () override
 
double getGainHigh () override
 
double getGainLow () override
 
double getPedHigh () override
 
double getPedLow () override
 
SiPixelGainCalibrationOffline 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< 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::SiPixelGainCalibrationOfflineService ( const edm::ParameterSet conf)
inlineexplicit

◆ ~SiPixelGainCalibrationOfflineService()

SiPixelGainCalibrationOfflineService::~SiPixelGainCalibrationOfflineService ( )
inlineoverride

Definition at line 27 of file SiPixelGainCalibrationOfflineService.h.

27 {};

Member Function Documentation

◆ getGain()

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

◆ getPedestal()

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

◆ isDead()

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

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 41 of file SiPixelGainCalibrationOfflineService.cc.

41  {
42  bool isDead = false;
43  bool isNoisy = false;
44  try {
45  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
46  } catch (cms::Exception& e) {
47  // Do not stop processing if you check if a nonexistant pixel is dead
48  edm::LogInfo("SiPixelGainCalibrationOfflineService")
49  << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
50  isDead = false;
51  }
52  return isDead;
53 }

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

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

◆ isDeadColumn()

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

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 69 of file SiPixelGainCalibrationOfflineService.cc.

69  {
70  bool isDead = false;
71  bool isNoisy = false;
72  try {
73  this->getGainByColumn(detID, col, row, isDead, isNoisy); // the gain column average can flag a whole column as bad
74  } catch (cms::Exception& e) {
75  // Do not stop processing if you check if a nonexistant pixel is dead
76  edm::LogInfo("SiPixelGainCalibrationOfflineService")
77  << "Attempting to check if nonexistant pixel is dead. Exception message: " << e.what();
78  isDead = false;
79  }
80  return isDead;
81 }

References cuy::col, MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getGainByColumn(), isDead(), and isNoisy().

◆ isNoisy()

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

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 55 of file SiPixelGainCalibrationOfflineService.cc.

55  {
56  bool isDead = false;
57  bool isNoisy = false;
58  try {
59  this->getPedestalByPixel(detID, col, row, isDead, isNoisy);
60  } catch (cms::Exception& e) {
61  // Do not stop processing if you check if a nonexistant pixel is dead
62  edm::LogInfo("SiPixelGainCalibrationOfflineService")
63  << "Attempting to check if nonexistant pixel is noisy. Exception message: " << e.what();
64  isNoisy = false;
65  }
66  return isNoisy;
67 }

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

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

◆ isNoisyColumn()

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

Implements SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >.

Definition at line 83 of file SiPixelGainCalibrationOfflineService.cc.

83  {
84  bool isDead = false;
85  bool isNoisy = false;
86  try {
87  this->getGainByColumn(detID, col, row, isDead, isNoisy); // the gain column average can flag a whole column as bad
88  } catch (cms::Exception& e) {
89  // Do not stop processing if you check if a nonexistant pixel is dead
90  edm::LogInfo("SiPixelGainCalibrationOfflineService")
91  << "Attempting to check if nonexistant pixel is Noisy. Exception message: " << e.what();
92  isNoisy = false;
93  }
94  return isNoisy;
95 }

References cuy::col, MillePedeFileConverter_cfg::e, SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getGainByColumn(), isDead(), and isNoisy().

cuy.col
col
Definition: cuy.py:1010
edm::LogInfo
Definition: MessageLogger.h:254
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getGainByColumn
float getGainByColumn(const uint32_t &detID, const int &col, const int &row, bool &isDeadColumn, bool &isNoisyColumn)
Definition: SiPixelGainCalibrationServiceBase.h:265
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >
SiPixelGainCalibrationOfflineService::isDead
bool isDead(const uint32_t &detID, const int &col, const int &row) override
Definition: SiPixelGainCalibrationOfflineService.cc:41
SiPixelGainCalibrationOfflineService::isNoisy
bool isNoisy(const uint32_t &detID, const int &col, const int &row) override
Definition: SiPixelGainCalibrationOfflineService.cc:55
cms::Exception
Definition: Exception.h:70
SiPixelGainCalibrationServicePayloadGetter< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::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< SiPixelGainCalibrationOffline, SiPixelGainCalibrationOfflineRcd >::getPedestalByPixel
float getPedestalByPixel(const uint32_t &detID, const int &col, const int &row, bool &isDeadPixel, bool &isNoisyPixel)
Definition: SiPixelGainCalibrationServiceBase.h:186