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
49445031
Commit
49445031
authored
Mar 18, 2019
by
Simon Spannagel
Browse files
Swap column/row in Detector::getLocalPosition to be consistent
parent
38f40f19
Pipeline
#760142
passed with stages
in 17 minutes and 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core/detector/Detector.cpp
View file @
49445031
...
...
@@ -322,7 +322,7 @@ double Detector::getColumn(const PositionVector3D<Cartesian3D<double>> localPosi
}
// Function to get local position from row and column
PositionVector3D
<
Cartesian3D
<
double
>>
Detector
::
getLocalPosition
(
double
row
,
double
column
)
const
{
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.
);
...
...
src/core/detector/Detector.hpp
View file @
49445031
...
...
@@ -203,8 +203,8 @@ namespace corryvreckan {
double
getRow
(
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
)
const
;
double
getColumn
(
PositionVector3D
<
Cartesian3D
<
double
>>
localPosition
)
const
;
// Function to get local position from
row and column
PositionVector3D
<
Cartesian3D
<
double
>>
getLocalPosition
(
double
row
,
double
column
)
const
;
// Function to get local position from
column (x) and row (y) coordinates
PositionVector3D
<
Cartesian3D
<
double
>>
getLocalPosition
(
double
column
,
double
row
)
const
;
/**
* Transformation from local (sensor) coordinates to in-pixel coordinates
...
...
src/modules/AnalysisCLICpix/AnalysisCLICpix.cpp
View file @
49445031
...
...
@@ -409,7 +409,7 @@ StatusCode AnalysisCLICpix::run(std::shared_ptr<Clipboard> clipboard) {
// Get the pixel global position
LOG(TRACE) <<"New pixel, row = "<<(*itPixel)->row()<<", column = "<<(*itPixel)->column();
PositionVector3D<Cartesian3D<double> > pixelPositionLocal =
m_detector->getLocalPosition((*itPixel)->
row
(),(*itPixel)->
column
()); PositionVector3D<Cartesian3D<double> >
m_detector->getLocalPosition((*itPixel)->
column
(),(*itPixel)->
row
()); PositionVector3D<Cartesian3D<double> >
pixelPositionGlobal = *(m_detector->m_localToGlobal) * pixelPositionLocal;
// Check if it is close to the track
...
...
@@ -586,7 +586,7 @@ void AnalysisCLICpix::fillResponseHistos(double trackInterceptX, double trackInt
Pixel
*
pixel
=
(
*
itp
);
// Get the pixel local then global position
PositionVector3D
<
Cartesian3D
<
double
>>
pixelPositionLocal
=
m_detector
->
getLocalPosition
(
pixel
->
row
(),
pixel
->
column
());
m_detector
->
getLocalPosition
(
pixel
->
column
(),
pixel
->
row
());
PositionVector3D
<
Cartesian3D
<
double
>>
pixelPositionGlobal
=
m_detector
->
localToGlobal
(
pixelPositionLocal
);
// Fill the response histograms
...
...
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