Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DataFormats
SiPixelCluster
src
SiPixelCluster.cc
Go to the documentation of this file.
1
#include "
DataFormats/SiPixelCluster/interface/SiPixelCluster.h
"
2
3
//---------------------------------------------------------------------------
15
//---------------------------------------------------------------------------
16
17
18
SiPixelCluster::SiPixelCluster
(
const
SiPixelCluster::PixelPos
& pix,
int
adc
) :
19
detId_(0),
// &&& To be fixed ??
20
// The center of pixel with row # N is at N+0.5 in the meas. frame!
21
// theSumX( (pix.row()+0.5) * float(adc)),
22
// theSumY( (pix.col()+0.5) * float(adc)),
23
// theCharge( float(adc)),
24
theMinPixelRow( pix.row()),
25
// theMaxPixelRow( pix.row()),
26
theMinPixelCol( pix.col()),
27
// theMaxPixelCol( pix.col()),
28
// ggiurgiu@fnal.gov, 01/05/12
29
// Initialize the split cluster errors to un-physical values.
30
// The CPE will check these errors and if they are not un-physical,
31
// it will recognize the clusters as split and assign these (increased)
32
// errors to the corresponding rechit.
33
err_x(-99999.9),
34
err_y(-99999.9)
35
{
36
// First pixel in this cluster.
37
thePixelADC
.push_back( adc );
38
thePixelOffset
.push_back( pix.
row
() -
theMinPixelRow
);
39
thePixelOffset
.push_back( pix.
col
() -
theMinPixelCol
);
40
}
41
42
void
SiPixelCluster::add
(
const
SiPixelCluster::PixelPos
& pix,
int
adc
) {
43
44
// The center of pixel with row # N is at N+0.5 in the meas. frame!
45
//theSumX += (pix.row()+0.5) * float(adc);
46
//theSumY += (pix.col()+0.5) * float(adc);
47
//theCharge += float(adc);
48
// thePixels.push_back( Pixel( pix.row(), pix.col(), adc ) );
49
50
int
minRow =
theMinPixelRow
;
51
int
minCol =
theMinPixelCol
;
52
bool
recalculate =
false
;
53
54
if
(pix.
row
() <
theMinPixelRow
) {
55
theMinPixelRow
= pix.
row
();
56
recalculate =
true
;
57
}
58
if
(pix.
col
() <
theMinPixelCol
) {
59
theMinPixelCol
= pix.
col
();
60
recalculate =
true
;
61
}
62
if
(recalculate) {
63
int
isize =
thePixelADC
.size();
64
for
(
int
i
=0;
i
<isize; ++
i
) {
65
int
xoffset = (
thePixelOffset
[
i
*2] ) + minRow -
theMinPixelRow
;
66
int
yoffset = (
thePixelOffset
[
i
*2+1] ) + minCol -
theMinPixelCol
;
67
thePixelOffset
[
i
*2] = xoffset;
68
thePixelOffset
[
i
*2+1] = yoffset;
69
}
70
}
71
72
thePixelADC
.push_back( adc );
73
thePixelOffset
.push_back( (pix.
row
() -
theMinPixelRow
) );
74
thePixelOffset
.push_back( (pix.
col
() -
theMinPixelCol
) );
75
}
76
ecalMGPA::adc
int adc(sample_type sample)
get the ADC sample (12 bits)
Definition:
EcalMGPASample.h:11
i
int i
Definition:
DBlmapReader.cc:9
SiPixelCluster::PixelPos
Definition:
SiPixelCluster.h:49
SiPixelCluster::PixelPos::col
int col() const
Definition:
SiPixelCluster.h:54
SiPixelCluster::thePixelADC
std::vector< uint16_t > thePixelADC
Definition:
SiPixelCluster.h:176
SiPixelCluster::PixelPos::row
int row() const
Definition:
SiPixelCluster.h:53
SiPixelCluster::add
void add(const PixelPos &pix, int adc)
Definition:
SiPixelCluster.cc:42
SiPixelCluster::thePixelOffset
std::vector< uint8_t > thePixelOffset
Definition:
SiPixelCluster.h:175
SiPixelCluster::theMinPixelRow
uint8_t theMinPixelRow
Definition:
SiPixelCluster.h:184
SiPixelCluster::theMinPixelCol
uint16_t theMinPixelCol
Definition:
SiPixelCluster.h:185
SiPixelCluster.h
SiPixelCluster::SiPixelCluster
SiPixelCluster()
Definition:
SiPixelCluster.h:71
Generated for CMSSW Reference Manual by
1.8.5