I would like to perform a track reflection using TGeoNavigator engine.
I have tried it by hand, computing the new direction using information from gGeoManager->FindNormal(), but I got wrong normal vectors most of the time.
Can you please tell me the best way to proceed, if it is possible?
thanks in advance,
Please use FindNormalFast() as FindNormal() is obsolete. I will make it point to FindNormalFast()
Yes, I am using FindNormalFast().
It seems the problem is the normal computation on the TGeoSubtraction class.
I am sending my macro.
As you can see, some times the normal computation for the cone part is wrong.
I am using last root version in svn (5.29).
teste7.C (11.8 KB)
I have played a bit with your macro, exaggerating a bit the cones and shooting a parallel beam instead of a single ray (to see better the normals on the desired hit point. I’ve also fixed some algorithmic problem when tracking after reflections. I see no problem with the normal vector computation. I attached the new version of your test macro.
teste8.C (10.3 KB)
I have found some normal computation problems in the macro you sent to me.
I just commented the line 247 (pl->Draw()) in order to see only the normal green lines.
Take a look on the picture attached.
Interesting, just compiling the macro makes the error disappear. Try to run the attached macro both with:
Weird enough, no time to investigate why. Normals are good. Another good test using normals is Raytrace() if the interesting surface is visible. Try it independently for your volumes.
teste7.C (10.7 KB)
Still having problems.
I am sending latest version.
The goal is to propagating the photon until find a PMT.
Maybe now I am using a wrong sequence of commands.
Reflexao.C (17.5 KB)
But that is what happens…
Yes, I know.
It works most of the time, but some time it fails.