Skip to content

Commit

Permalink
Merge pull request #10 from rest-for-physics/nkx111-patch-1
Browse files Browse the repository at this point in the history
TRestReadout handles correctly for non-90 deg rotation
  • Loading branch information
KonradAltenmueller authored Jun 24, 2021
2 parents addce59 + c9479a7 commit 488f3ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TRestDetectorReadoutPlane.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ Double_t TRestDetectorReadoutPlane::GetX(Int_t modID, Int_t chID) {
if (deltaY < deltaX) x = rModule->GetPixelCenter(chID, 0).X();
}
} else {
// we choose to ouput x only when deltaY > deltaX under non-90 deg rotation
// otherwise it is a y channel and should return nan
if (deltaY > deltaX) x = rModule->GetPixelCenter(chID, 0).X();
}
}
Expand Down Expand Up @@ -224,7 +226,9 @@ Double_t TRestDetectorReadoutPlane::GetY(Int_t modID, Int_t chID) {
if (deltaY > deltaX) y = rModule->GetPixelCenter(chID, 0).Y();
}
} else {
if (deltaY < deltaX) y = rModule->GetPixelCenter(chID, 0).X();
// we choose to ouput y only when deltaY < deltaX under non-90 deg rotation
// otherwise it is a x channel and should return nan
if (deltaY < deltaX) y = rModule->GetPixelCenter(chID, 0).Y();
}
}

Expand Down

0 comments on commit 488f3ae

Please sign in to comment.