Commit 565d30d0 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Merge branch 'fix_coord_transformation_again' into 'master'

Fix fix of coord transformation

See merge request !275
parents f9476e32 45c3e835
Pipeline #1539316 passed with stages
in 32 minutes and 25 seconds
......@@ -271,13 +271,13 @@ bool PixelDetector::hitMasked(Track* track, int tolerance) const {
// Functions to get row and column from local position
double PixelDetector::getRow(const PositionVector3D<Cartesian3D<double>> localPosition) const {
double row = localPosition.Y() / m_pitch.Y() + static_cast<double>(m_nPixels.Y() - 1) / 2.;
// (1-m_nPixelsY%2)/2. --> add 1/2 pixel pitch if even number of columns
double row = localPosition.Y() / m_pitch.Y() + static_cast<double>(m_nPixels.Y()) / 2. + (1 - m_nPixels.Y() % 2) / 2.;
return row;
}
double PixelDetector::getColumn(const PositionVector3D<Cartesian3D<double>> localPosition) const {
double column = localPosition.X() / m_pitch.X() + static_cast<double>(m_nPixels.X() - 1) / 2.;
// (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.;
return column;
}
......@@ -285,7 +285,7 @@ double PixelDetector::getColumn(const PositionVector3D<Cartesian3D<double>> loca
PositionVector3D<Cartesian3D<double>> PixelDetector::getLocalPosition(double column, double row) const {
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
......
......@@ -19,4 +19,4 @@ chi2ndof_cut = 8
time_cut_frameedge = 10ns
#DEPENDS test_write.conf
#PASS Total efficiency of detector W0013_G02: 100%, measured with 30344/30344 matched/total tracks
#PASS Total efficiency of detector W0013_G02: 100%, measured with 31858/31858 matched/total tracks
......@@ -24,4 +24,4 @@ spatial_cut_abs = 200um, 200um
[AnalysisTelescope]
#DATASET timepix3tel_dut150um_ebeam120_sim
#PASS Ev: 3.3k Px: 70.2k Tr: 3.2k (0.958/ev) t = 33us
\ No newline at end of file
#PASS Ev: 3.3k Px: 70.2k Tr: 3.2k (0.957/ev) t = 33us
......@@ -23,4 +23,4 @@ spatial_cut_abs = 200um, 200um
#DATASET timepix3tel_ebeam120
#PASS Ev: 18.8k Px: 6.23M Tr: 196.8k (10.5/ev) t = 3.76s
\ No newline at end of file
#PASS Ev: 18.8k Px: 6.23M Tr: 197.4k (10.5/ev) t = 3.76s
......@@ -24,4 +24,4 @@ volume_scattering_length=304m
#DATASET timepix3tel_ebeam120
#PASS Ev: 18.8k Px: 6.23M Tr: 185.9k (9.89/ev) t = 3.76s
\ No newline at end of file
#PASS Ev: 18.8k Px: 6.23M Tr: 186.5k (9.92/ev) t = 3.76s
......@@ -30,4 +30,4 @@ chi2ndof_cut = 8
time_cut_frameedge = 10ns
#DATASET timepix3tel_ebeam120
#PASS Total efficiency of detector W0013_G02: 100%, measured with 30062/30062 matched/total tracks
#PASS Total efficiency of detector W0013_G02: 100%, measured with 31556/31556 matched/total tracks
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment