Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
75552e28
Commit
75552e28
authored
Mar 09, 2020
by
Jens Kroeger
Browse files
Detector: correct getRow/getColumn and getLocalPosition memeber functions
parent
39bcf883
Pipeline
#1474280
failed with stages
in 7 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core/detector/Detector.cpp
View file @
75552e28
...
...
@@ -385,13 +385,14 @@ bool Detector::hitMasked(Track* track, int tolerance) const {
// Functions to get row and column from local position
double
Detector
::
getRow
(
const
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
)
const
{
// (1-m_nPixelsX%2)/2. --> add 1/2 pixel pitch if even number of rows
double
row
=
localPosition
.
Y
()
/
m_pitch
.
Y
()
+
static_cast
<
double
>
(
m_nPixels
.
Y
()
)
/
2.
+
(
1
-
m_nPixels
.
Y
()
%
2
)
/
2.
;
double
row
=
localPosition
.
Y
()
/
m_pitch
.
Y
()
+
static_cast
<
double
>
(
m_nPixels
.
Y
()
-
1
)
/
2.
;
return
row
;
}
double
Detector
::
getColumn
(
const
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
)
const
{
// (1-m_nPixelsX%2)/2. --> add 1/2 pixel pitch if even number of columns
double
column
=
localPosition
.
X
()
/
m_pitch
.
X
()
+
static_cast
<
double
>
(
m_nPixels
.
X
()
)
/
2.
+
(
1
-
m_nPixels
.
X
()
%
2
)
/
2.
;
double
column
=
localPosition
.
X
()
/
m_pitch
.
X
()
+
static_cast
<
double
>
(
m_nPixels
.
X
()
-
1
)
/
2.
;
return
column
;
}
...
...
@@ -399,7 +400,7 @@ double Detector::getColumn(const PositionVector3D<Cartesian3D<double>> localPosi
PositionVector3D
<
Cartesian3D
<
double
>>
Detector
::
getLocalPosition
(
double
column
,
double
row
)
const
{
return
PositionVector3D
<
Cartesian3D
<
double
>>
(
m_pitch
.
X
()
*
(
column
-
m_nPixels
.
X
()
/
2
),
m_pitch
.
Y
()
*
(
row
-
m_nPixels
.
Y
()
/
2
),
0.
);
m_pitch
.
X
()
*
(
column
-
(
m_nPixels
.
X
()
-
1
)
/
2
.
),
m_pitch
.
Y
()
*
(
row
-
(
m_nPixels
.
Y
()
-
1
)
/
2
.
),
0.
);
}
// Function to get in-pixel position
...
...
Jens Kroeger
@jekroege
mentioned in merge request
!275 (merged)
·
Apr 03, 2020
mentioned in merge request
!275 (merged)
mentioned in merge request !275
Toggle commit list
Jens Kroeger
@jekroege
mentioned in commit
0d1c52f1
·
Jun 18, 2020
mentioned in commit
0d1c52f1
mentioned in commit 0d1c52f1c9caf0c11977ee096c76e4c6526ecf80
Toggle commit list
Jens Kroeger
@jekroege
mentioned in commit
c70aa04f
·
Jun 18, 2020
mentioned in commit
c70aa04f
mentioned in commit c70aa04f23a3a6b9b6a098f3d87f34e7f598545e
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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