Skip to content

Commit

Permalink
Merge pull request #98 from DUNE/63-mixed-orientations-reconstruction
Browse files Browse the repository at this point in the history
Bug fix for end and start position being assigned 0.0 in y
  • Loading branch information
AsaNehm authored Apr 23, 2024
2 parents bec4248 + 44a306b commit f00db31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/TMS_Reco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ std::vector<TMS_Track> TMS_TrackFinder::TrackMatching3D() {
else if (UTracks.front().GetPlaneNumber() >= 20 && std::abs(UTracks.front().GetZ() - XTracks.front().GetZ() < 90)) stereo_view = false;
}
if (stereo_view) {
CalculateRecoY(VTracks.front(), UTracks.front());
aTrack.End[0] = 0.5 * (VTracks.front().GetNotZ() + UTracks.front().GetNotZ());
aTrack.End[1] = VTracks.front().GetRecoY();
aTrack.End[2] = VTracks.front().GetZ();
Expand All @@ -1220,6 +1221,7 @@ std::vector<TMS_Track> TMS_TrackFinder::TrackMatching3D() {
else if (UTracks.back().GetPlaneNumber() >= 20 && std::abs(UTracks.back().GetZ() - XTracks.back().GetZ() < 90)) stereo_view = false;
}
if (stereo_view) {
CalculateRecoY(UTracks.back(), VTracks.back());
aTrack.Start[0] = 0.5 * (VTracks.back().GetNotZ() + UTracks.back().GetNotZ());
aTrack.Start[1] = VTracks.back().GetRecoY();
aTrack.Start[2] = VTracks.back().GetZ();
Expand Down
2 changes: 1 addition & 1 deletion src/TMS_TreeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ void TMS_TreeWriter::Fill(TMS_Event &event) {
}
// Can manually compute direction if it hasn't been set
if ( (RecoTrackDirection[itTrack][0] == 0) && (RecoTrackDirection[itTrack][1] == 0) && (RecoTrackDirection[itTrack][2] == 0) )
{ // If true^ it seems the direction hasn't been set
{ // If true it seems the direction hasn't been set
for (int j = 0; j < 3; j++)
{ // Right now no need to make sure this is a unit vector
RecoTrackDirection[itTrack][j] = RecoTrack->End[j] - RecoTrack->Start[j];
Expand Down

0 comments on commit f00db31

Please sign in to comment.