CMS 3D CMS Logo

SiPixelRecHitQuality.cc
Go to the documentation of this file.
2 
4 
6  // Constructor: pre-computes masks and shifts from field widths
7  // X is now XY
8  // Y is now Q
9  probX_width = 14;
10  probY_width = 8;
11  qBin_width = 3;
12  edge_width = 1;
13  bad_width = 1;
14  twoROC_width = 1;
16  spare_width = 3;
17 
19  spare_width !=
20  32) {
21  throw cms::Exception("SiPixelRecHitQuality::Packing: ")
22  << "\nERROR: The allocated bits for the quality word to not sum to 32."
23  << "\n\n";
24  }
25 
26  probX_units = 1.0018;
27  probY_units = 1.0461;
30 
31  // Fields are counted from right to left!
32  probX_shift = 0;
39 
40  // Ensure the complement of the correct
41  // number of bits:
42  QualWordType zero32 = 0; // 32-bit wide set of 0's
43 
44  probX_mask = ~(~zero32 << probX_width);
45  probY_mask = ~(~zero32 << probY_width);
46  qBin_mask = ~(~zero32 << qBin_width);
47  edge_mask = ~(~zero32 << edge_width);
48  bad_mask = ~(~zero32 << bad_width);
49  twoROC_mask = ~(~zero32 << twoROC_width);
51 }
52 
53 // Initialize the packing format singleton
55 
57  edm::LogWarning("ObsoleteVariable")
58  << "Since 39x, probabilityX and probabilityY have been replaced by probabilityXY and probabilityQ";
59 }
60 
61 void SiPixelRecHitQuality::warningOutOfBoundQbin(int iValue, QualWordType const& iQualWord) {
62  edm::LogWarning("OutOfBounds") << "Qbin outside the bounds of the quality word. Defaulting to Qbin=0. Qbin = "
63  << iValue << " QualityWord = " << iQualWord;
64 }
65 
66 void SiPixelRecHitQuality::warningOutOfBoundProb(const char* iName, float iProb, QualWordType const& iQualWord) {
67  edm::LogWarning("OutOfBounds") << "Prob " << iName
68  << " outside the bounds of the quality word. Defaulting to Prob=0. Prob = " << iProb
69  << " QualityWord = " << iQualWord;
70 }
71 
72 void SiPixelRecHitQuality::warningOutOfBoundRaw(const char* iName, int iRaw, QualWordType const& iQualWord) {
73  edm::LogWarning("OutOfBounds") << "Probability " << iName
74  << " outside the bounds of the quality word. Defaulting to Prob=0. Raw = " << iRaw
75  << " QualityWord = " << iQualWord;
76 }
SiPixelRecHitQuality::Packing::probX_1_over_log_units
double probX_1_over_log_units
Definition: SiPixelRecHitQuality.h:21
SiPixelRecHitQuality.h
SiPixelRecHitQuality::Packing
Definition: SiPixelRecHitQuality.h:12
MessageLogger.h
SiPixelRecHitQuality::Packing::probY_mask
QualWordType probY_mask
Definition: SiPixelRecHitQuality.h:24
SiPixelRecHitQuality::Packing::probY_width
char probY_width
Definition: SiPixelRecHitQuality.h:28
SiPixelRecHitQuality::Packing::qBin_mask
QualWordType qBin_mask
Definition: SiPixelRecHitQuality.h:30
SiPixelRecHitQuality::Packing::probY_units
float probY_units
Definition: SiPixelRecHitQuality.h:26
SiPixelRecHitQuality::Packing::edge_shift
int edge_shift
Definition: SiPixelRecHitQuality.h:35
SiPixelRecHitQuality::warningOutOfBoundQbin
static void warningOutOfBoundQbin(int, QualWordType const &)
Definition: SiPixelRecHitQuality.cc:61
SiPixelRecHitQuality::Packing::probY_1_over_log_units
double probY_1_over_log_units
Definition: SiPixelRecHitQuality.h:27
SiPixelRecHitQuality::Packing::probX_width
char probX_width
Definition: SiPixelRecHitQuality.h:22
SiPixelRecHitQuality::Packing::bad_mask
QualWordType bad_mask
Definition: SiPixelRecHitQuality.h:38
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SiPixelRecHitQuality::Packing::probX_mask
QualWordType probX_mask
Definition: SiPixelRecHitQuality.h:18
SiPixelRecHitQuality::Packing::qBin_shift
int qBin_shift
Definition: SiPixelRecHitQuality.h:31
SiPixelRecHitQuality::thePacking
static const Packing thePacking
Definition: SiPixelRecHitQuality.h:154
SiPixelRecHitQuality::QualWordType
unsigned int QualWordType
Definition: SiPixelRecHitQuality.h:9
SiPixelRecHitQuality::Packing::twoROC_shift
int twoROC_shift
Definition: SiPixelRecHitQuality.h:43
SiPixelRecHitQuality::warningOutOfBoundProb
static void warningOutOfBoundProb(const char *iVariable, float, QualWordType const &)
Definition: SiPixelRecHitQuality.cc:66
SiPixelRecHitQuality::warningOutOfBoundRaw
static void warningOutOfBoundRaw(const char *iVariable, int iRaw, QualWordType const &)
Definition: SiPixelRecHitQuality.cc:72
SiPixelRecHitQuality::Packing::probX_shift
int probX_shift
Definition: SiPixelRecHitQuality.h:19
SiPixelRecHitQuality::Packing::spare_width
char spare_width
Definition: SiPixelRecHitQuality.h:50
SiPixelRecHitQuality::Packing::edge_mask
QualWordType edge_mask
Definition: SiPixelRecHitQuality.h:34
SiPixelRecHitQuality::Packing::bad_shift
int bad_shift
Definition: SiPixelRecHitQuality.h:39
SiPixelRecHitQuality::Packing::bad_width
char bad_width
Definition: SiPixelRecHitQuality.h:40
SiPixelRecHitQuality::Packing::edge_width
char edge_width
Definition: SiPixelRecHitQuality.h:36
Exception
Definition: hltDiff.cc:245
SiPixelRecHitQuality::Packing::twoROC_width
char twoROC_width
Definition: SiPixelRecHitQuality.h:44
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
SiPixelRecHitQuality::Packing::probY_shift
int probY_shift
Definition: SiPixelRecHitQuality.h:25
SiPixelRecHitQuality::Packing::hasFilledProb_width
char hasFilledProb_width
Definition: SiPixelRecHitQuality.h:48
SiPixelRecHitQuality::Packing::probX_units
float probX_units
Definition: SiPixelRecHitQuality.h:20
SiPixelRecHitQuality::warningObsolete
static void warningObsolete()
Definition: SiPixelRecHitQuality.cc:56
SiPixelRecHitQuality::Packing::hasFilledProb_mask
QualWordType hasFilledProb_mask
Definition: SiPixelRecHitQuality.h:46
SiPixelRecHitQuality::Packing::Packing
Packing()
Definition: SiPixelRecHitQuality.cc:5
SiPixelRecHitQuality::Packing::hasFilledProb_shift
int hasFilledProb_shift
Definition: SiPixelRecHitQuality.h:47
SiPixelRecHitQuality::Packing::twoROC_mask
QualWordType twoROC_mask
Definition: SiPixelRecHitQuality.h:42
SiPixelRecHitQuality::Packing::qBin_width
char qBin_width
Definition: SiPixelRecHitQuality.h:32