Commit c81c4693 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

EtaCorrection: use new globalToLocal method

parent f6793b33
Pipeline #291540 passed with stages
in 4 minutes and 32 seconds
......@@ -61,7 +61,7 @@ StatusCode EtaCorrection::run(Clipboard* clipboard) {
// Get the in-pixel track intercept
PositionVector3D<Cartesian3D<double>> trackIntercept = m_detector->getIntercept(track);
PositionVector3D<Cartesian3D<double>> trackInterceptLocal = *(m_detector->globalToLocal()) * trackIntercept;
PositionVector3D<Cartesian3D<double>> trackInterceptLocal = m_detector->globalToLocal(trackIntercept);
double pixelInterceptX = m_detector->inPixelX(trackInterceptLocal);
double pixelInterceptY = m_detector->inPixelY(trackInterceptLocal);
(pixelInterceptX > m_detector->pitchX() / 2. ? pixelInterceptX -= m_detector->pitchX() / 2.
......@@ -86,9 +86,11 @@ StatusCode EtaCorrection::run(Clipboard* clipboard) {
if(dutCluster->columnWidth() == 2) {
m_etaDistributionX->Fill(inPixelX, pixelInterceptX);
m_etaDistributionXprofile->Fill(inPixelX, pixelInterceptX);
// Apply the eta correction
double newX = floor(dutCluster->localX() / m_detector->pitchX()) * m_detector->pitchX() +
m_etaCorrectorX->Eval(inPixelX);
PositionVector3D<Cartesian3D<double>> positionLocal(newX, dutCluster->localY(), 0);
PositionVector3D<Cartesian3D<double>> positionGlobal = m_detector->localToGlobal(positionLocal);
dutCluster->setClusterCentre(positionGlobal);
......
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