Gate
Gate copied to clipboard
Error in the angle when using a file for placement
Hello Gaters
I think there is something wrong in the last commit of GATE (I don't know if it was there before.)
In the attached file you will find a very simple main.mac. Please execute to understand.
In this main.mac, there is two ways to do the same placement of two objects (one is commented, the other is uncommented):
- The placement of two objects X1 and X2 is made in the mac file using the setRotation/ command
- The placement of X1 and X2 is made using a .placements file (in order to make a dynamic simulation)
The values of translations and rotation are exactly the same in both cases. BUT if you look the result is different (rotation angle).
Actually, I think that the part of GATE that reads the .placement file and gives the angle to GATE should change the sign of the rotation angle. I tried to find it in GATE code (to propose a pull request) but didn't find the good part (must be in GateGenericMove.cc ??)
Thank you for telling me I am wrong!
The effective code which read placement file is here but I dont think it will help you.
There is an use of a minus sign in method PushMyPlacements from the class GateVolumePlacement here. I don't fully understand why..
And there is no minus in the same method but in GateGenericMove https://github.com/OpenGATE/Gate/blob/b65f398f50501ec3b5875f2c0250a0f5b5db42fe/source/geometry/src/GateGenericMove.cc#L67
This is maybe the source of your trouble. I hope its help u.