Closed dudarboh closed 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()
x
y
z
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.
DDCEDViewer
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:
Red helix --- properly displayed position of the track Green helix --- artificially starts at 0 because of the wrong input inside DSTViewer.
As we found out with @yradkhorrami, the DSTViewer displays tracks with a wrong position.
It uses reference point for
x
,y
,z
arguments ofMarlinCED::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
, wherex
,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:
Red helix --- properly displayed position of the track Green helix --- artificially starts at 0 because of the wrong input inside DSTViewer.