Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
c70aa04f
Commit
c70aa04f
authored
Apr 03, 2020
by
Jens Kroeger
Browse files
Revert "Detector: correct getRow/getColumn and getLocalPosition memeber functions"
This reverts commit
75552e28
.
parent
b92277eb
Changes
1
Show whitespace changes
Inline
Side-by-side
src/core/detector/Detector.cpp
View file @
c70aa04f
...
@@ -383,14 +383,13 @@ bool Detector::hitMasked(Track* track, int tolerance) const {
...
@@ -383,14 +383,13 @@ bool Detector::hitMasked(Track* track, int tolerance) const {
// Functions to get row and column from local position
// Functions to get row and column from local position
double
Detector
::
getRow
(
const
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
)
const
{
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
()
-
1
)
/
2.
;
double
row
=
localPosition
.
Y
()
/
m_pitch
.
Y
()
+
static_cast
<
double
>
(
m_nPixels
.
Y
()
)
/
2.
+
(
1
-
m_nPixels
.
Y
()
%
2
)
/
2.
;
return
row
;
return
row
;
}
}
double
Detector
::
getColumn
(
const
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
)
const
{
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
()
-
1
)
/
2.
;
double
column
=
localPosition
.
X
()
/
m_pitch
.
X
()
+
static_cast
<
double
>
(
m_nPixels
.
X
()
)
/
2.
+
(
1
-
m_nPixels
.
X
()
%
2
)
/
2.
;
return
column
;
return
column
;
}
}
...
@@ -398,7 +397,7 @@ double Detector::getColumn(const PositionVector3D<Cartesian3D<double>> localPosi
...
@@ -398,7 +397,7 @@ double Detector::getColumn(const PositionVector3D<Cartesian3D<double>> localPosi
PositionVector3D
<
Cartesian3D
<
double
>>
Detector
::
getLocalPosition
(
double
column
,
double
row
)
const
{
PositionVector3D
<
Cartesian3D
<
double
>>
Detector
::
getLocalPosition
(
double
column
,
double
row
)
const
{
return
PositionVector3D
<
Cartesian3D
<
double
>>
(
return
PositionVector3D
<
Cartesian3D
<
double
>>
(
m_pitch
.
X
()
*
(
column
-
(
m_nPixels
.
X
()
-
1
)
/
2
.
),
m_pitch
.
Y
()
*
(
row
-
(
m_nPixels
.
Y
()
-
1
)
/
2
.
),
0.
);
m_pitch
.
X
()
*
(
column
-
m_nPixels
.
X
()
/
2
),
m_pitch
.
Y
()
*
(
row
-
m_nPixels
.
Y
()
/
2
),
0.
);
}
}
// Function to get in-pixel position
// Function to get in-pixel position
...
...
Write
Preview
Markdown
is supported
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