Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
e29b1152
Commit
e29b1152
authored
Jun 08, 2016
by
Daniel Hynds
Browse files
added cluster width in row and column direction
Former-commit-id: 7f2552a7d4a1720866fcfd02a2b718589c576f0f
parent
77ce2225
Changes
1
Hide whitespace changes
Inline
Side-by-side
branches/trunk/objs/Cluster.h
View file @
e29b1152
...
...
@@ -17,7 +17,7 @@ class Cluster : public TestBeamObject {
public:
// Constructors and destructors
Cluster
(){}
Cluster
(){
m_columnWidth
=
0.
;
m_rowWidth
=
0.
;
}
virtual
~
Cluster
(){}
// Copy constructor
Cluster
(
Cluster
*
cluster
){
...
...
@@ -30,12 +30,17 @@ public:
m_error
=
cluster
->
error
();
m_detectorID
=
cluster
->
detectorID
();
m_timestamp
=
cluster
->
timestamp
();
m_columnWidth
=
0.
;
m_rowWidth
=
0.
;
}
// Functions
// Add a new pixel to the cluster
void
addPixel
(
Pixel
*
pixel
){
m_pixels
.
push_back
(
pixel
);
if
(
m_columnHits
.
count
(
pixel
->
m_column
)
!=
0
)
m_columnWidth
++
;
if
(
m_rowHits
.
count
(
pixel
->
m_row
)
!=
0
)
m_rowWidth
++
;
m_columnHits
[
pixel
->
m_column
]
=
true
;
m_rowHits
[
pixel
->
m_row
]
=
true
;
}
// Retrieve cluster parameters
double
row
(){
return
m_row
;}
...
...
@@ -49,6 +54,8 @@ public:
double
localY
(){
return
m_localY
;}
double
localZ
(){
return
m_localZ
;}
int
size
(){
return
m_pixels
.
size
();}
int
columnWidth
(){
return
m_columnWidth
;}
int
rowWidth
(){
return
m_rowWidth
;}
long
long
int
timestamp
(){
return
m_timestamp
;}
std
::
string
detectorID
(){
return
m_detectorID
;}
Pixels
pixels
(){
return
m_pixels
;}
...
...
@@ -77,6 +84,8 @@ public:
double
m_column
;
double
m_tot
;
double
m_error
;
double
m_columnWidth
;
double
m_rowWidth
;
long
long
int
m_timestamp
;
double
m_globalX
;
double
m_globalY
;
...
...
@@ -85,6 +94,8 @@ public:
double
m_localY
;
double
m_localZ
;
std
::
string
m_detectorID
;
std
::
map
<
int
,
bool
>
m_rowHits
;
std
::
map
<
int
,
bool
>
m_columnHits
;
// ROOT I/O class definition - update version number when you change this class!
ClassDef
(
Cluster
,
1
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment