Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DataFormats
TrackerRecHit2D
src
SiPixelRecHitQuality.cc
Go to the documentation of this file.
1
#include "
DataFormats/TrackerRecHit2D/interface/SiPixelRecHitQuality.h
"
2
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
5
SiPixelRecHitQuality::Packing::Packing
()
6
{
7
// Constructor: pre-computes masks and shifts from field widths
8
// X is now XY
9
// Y is now Q
10
probX_width
= 14;
11
probY_width
= 8;
12
qBin_width
= 3;
13
edge_width
= 1;
14
bad_width
= 1;
15
twoROC_width
= 1;
16
hasFilledProb_width
= 1;
17
spare_width
= 3;
18
19
if
(
probX_width
+
probY_width
+
qBin_width
+
edge_width
+
20
bad_width
+
twoROC_width
+
hasFilledProb_width
+
spare_width
21
!= 32 ) {
22
throw
cms::Exception
(
"SiPixelRecHitQuality::Packing: "
)
23
<<
"\nERROR: The allocated bits for the quality word to not sum to 32."
24
<<
"\n\n"
;
25
}
26
27
probX_units
= 1.0018;
28
probY_units
= 1.0461;
29
probX_1_over_log_units
= 1.0 /
log
(
probX_units
);
30
probY_1_over_log_units
= 1.0 /
log
(
probY_units
);
31
32
// Fields are counted from right to left!
33
probX_shift
= 0;
34
probY_shift
=
probX_shift
+
probX_width
;
35
qBin_shift
=
probY_shift
+
probY_width
;
36
edge_shift
=
qBin_shift
+
qBin_width
;
37
bad_shift
=
edge_shift
+
edge_width
;
38
twoROC_shift
=
bad_shift
+
bad_width
;
39
hasFilledProb_shift
=
twoROC_shift
+
twoROC_width
;
40
41
// Ensure the complement of the correct
42
// number of bits:
43
QualWordType
zero32 = 0;
// 32-bit wide set of 0's
44
45
probX_mask
= ~(~zero32 <<
probX_width
);
46
probY_mask
= ~(~zero32 <<
probY_width
);
47
qBin_mask
= ~(~zero32 <<
qBin_width
);
48
edge_mask
= ~(~zero32 <<
edge_width
);
49
bad_mask
= ~(~zero32 <<
bad_width
);
50
twoROC_mask
= ~(~zero32 <<
twoROC_width
);
51
hasFilledProb_mask
= ~(~zero32 <<
hasFilledProb_width
);
52
}
53
54
// Initialize the packing format singleton
55
SiPixelRecHitQuality::Packing
SiPixelRecHitQuality::thePacking
;
56
SiPixelRecHitQuality::Packing::probX_shift
int probX_shift
Definition:
SiPixelRecHitQuality.h:31
SiPixelRecHitQuality::Packing::probX_1_over_log_units
double probX_1_over_log_units
Definition:
SiPixelRecHitQuality.h:33
MessageLogger.h
SiPixelRecHitQuality::Packing::probX_mask
QualWordType probX_mask
Definition:
SiPixelRecHitQuality.h:30
SiPixelRecHitQuality::Packing::qBin_shift
int qBin_shift
Definition:
SiPixelRecHitQuality.h:43
SiPixelRecHitQuality::thePacking
static Packing thePacking
Definition:
SiPixelRecHitQuality.h:175
SiPixelRecHitQuality::Packing::hasFilledProb_shift
int hasFilledProb_shift
Definition:
SiPixelRecHitQuality.h:59
SiPixelRecHitQuality::Packing::Packing
Packing()
Definition:
SiPixelRecHitQuality.cc:5
create_public_lumi_plots.log
log
Definition:
create_public_lumi_plots.py:1119
SiPixelRecHitQuality::Packing::probY_shift
int probY_shift
Definition:
SiPixelRecHitQuality.h:37
SiPixelRecHitQuality::Packing::probY_mask
QualWordType probY_mask
Definition:
SiPixelRecHitQuality.h:36
SiPixelRecHitQuality::Packing::twoROC_mask
QualWordType twoROC_mask
Definition:
SiPixelRecHitQuality.h:54
SiPixelRecHitQuality::Packing
Definition:
SiPixelRecHitQuality.h:23
SiPixelRecHitQuality::Packing::probY_width
char probY_width
Definition:
SiPixelRecHitQuality.h:40
SiPixelRecHitQuality::Packing::probY_1_over_log_units
double probY_1_over_log_units
Definition:
SiPixelRecHitQuality.h:39
SiPixelRecHitQuality::Packing::qBin_width
char qBin_width
Definition:
SiPixelRecHitQuality.h:44
SiPixelRecHitQuality::Packing::twoROC_width
char twoROC_width
Definition:
SiPixelRecHitQuality.h:56
SiPixelRecHitQuality::Packing::qBin_mask
QualWordType qBin_mask
Definition:
SiPixelRecHitQuality.h:42
SiPixelRecHitQuality::Packing::bad_mask
QualWordType bad_mask
Definition:
SiPixelRecHitQuality.h:50
SiPixelRecHitQuality::QualWordType
uint32_t QualWordType
Definition:
SiPixelRecHitQuality.h:18
edm::hlt::Exception
error
Definition:
HLTenums.h:24
SiPixelRecHitQuality::Packing::twoROC_shift
int twoROC_shift
Definition:
SiPixelRecHitQuality.h:55
SiPixelRecHitQuality::Packing::edge_width
char edge_width
Definition:
SiPixelRecHitQuality.h:48
SiPixelRecHitQuality::Packing::bad_shift
int bad_shift
Definition:
SiPixelRecHitQuality.h:51
SiPixelRecHitQuality::Packing::edge_mask
QualWordType edge_mask
Definition:
SiPixelRecHitQuality.h:46
SiPixelRecHitQuality::Packing::bad_width
char bad_width
Definition:
SiPixelRecHitQuality.h:52
SiPixelRecHitQuality::Packing::probX_width
char probX_width
Definition:
SiPixelRecHitQuality.h:34
SiPixelRecHitQuality::Packing::probX_units
float probX_units
Definition:
SiPixelRecHitQuality.h:32
SiPixelRecHitQuality::Packing::spare_width
char spare_width
Definition:
SiPixelRecHitQuality.h:62
SiPixelRecHitQuality::Packing::probY_units
float probY_units
Definition:
SiPixelRecHitQuality.h:38
SiPixelRecHitQuality.h
SiPixelRecHitQuality::Packing::edge_shift
int edge_shift
Definition:
SiPixelRecHitQuality.h:47
SiPixelRecHitQuality::Packing::hasFilledProb_mask
QualWordType hasFilledProb_mask
Definition:
SiPixelRecHitQuality.h:58
SiPixelRecHitQuality::Packing::hasFilledProb_width
char hasFilledProb_width
Definition:
SiPixelRecHitQuality.h:60
Generated for CMSSW Reference Manual by
1.8.5