iLCSoft / CEDViewer

Marlin processor for the CED event display
GNU General Public License v3.0
2 stars 9 forks source link

Bug in the DST Viewer: all tracks displayed wrongly starting from (0,0,0) #16

Closed dudarboh closed 2 years ago

dudarboh commented 2 years ago

As we found out with @yradkhorrami, the DSTViewer displays tracks with a wrong position.

It uses reference point for x, y, z arguments of MarlinCED::drawHelix()

https://github.com/iLCSoft/CEDViewer/blob/0809ad2ffa30402aaf38dfe4e885a559f2aff26d/src/DSTViewer.cc#L231-L234

https://github.com/iLCSoft/CEDViewer/blob/0809ad2ffa30402aaf38dfe4e885a559f2aff26d/src/DSTViewer.cc#L266-L267

while by the design of the MarlinCED::drawHelix() there should go x, y, z coordinates ON the helix which is not the same...

See, e.g. how it is implemented inside DDCEDViewer, where x, y, z are calculated correctly from the reference point.

https://github.com/iLCSoft/CEDViewer/blob/0809ad2ffa30402aaf38dfe4e885a559f2aff26d/src/DDCEDViewer.cc#L1030-L1039

This results in the shifted track. For the illustration, an example of such a track made by @yradkhorrami:

glced-4

Red helix --- properly displayed position of the track Green helix --- artificially starts at 0 because of the wrong input inside DSTViewer.