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
211d2f19
Commit
211d2f19
authored
Nov 10, 2017
by
Simon Spannagel
Browse files
Detector: minor improvements
parent
074594be
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/Detector.cpp
View file @
211d2f19
...
...
@@ -108,10 +108,8 @@ void Detector::initialise() {
m_globalToLocal
=
new
Transform3D
();
(
*
m_globalToLocal
)
=
m_localToGlobal
->
Inverse
();
// Find the normal to the detector surface. Build two points, the origin and
// a unit step in z,
// transform these points to the global co-ordinate frame and then make a
// vector pointing between them
// Find the normal to the detector surface. Build two points, the origin and a unit step in z,
// transform these points to the global co-ordinate frame and then make a vector pointing between them
m_origin
=
PositionVector3D
<
Cartesian3D
<
double
>>
(
0.
,
0.
,
0.
);
m_origin
=
(
*
m_localToGlobal
)
*
m_origin
;
PositionVector3D
<
Cartesian3D
<
double
>>
localZ
(
0.
,
0.
,
1.
);
...
...
@@ -231,10 +229,8 @@ double Detector::getColumn(PositionVector3D<Cartesian3D<double>> localPosition)
// Function to get local position from row and column
PositionVector3D
<
Cartesian3D
<
double
>>
Detector
::
getLocalPosition
(
double
row
,
double
column
)
{
PositionVector3D
<
Cartesian3D
<
double
>>
positionLocal
(
return
PositionVector3D
<
Cartesian3D
<
double
>>
(
m_pitchX
*
(
column
-
m_nPixelsX
/
2.
),
m_pitchY
*
(
row
-
m_nPixelsY
/
2.
),
0.
);
return
positionLocal
;
}
// Function to get in-pixel position (value returned in microns)
...
...
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