Problem by a C++ Program to run a root file

Hi,

ROOT has a geometry package that provide API to track any kind of particles in a geometry setup, see:
http://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuideChapters/Geometry.pdf

To check how such tracking algorithm could be implemented, you can have a look at: https://root.cern.ch/root/htmldoc/src/TGeoChecker.cxx.html#W.qKuC This can be called by invoking TGeoShape::CheckShape(3) for any of the ROOT shapes, built for example by one of the geometry tutorials.

Hope this helps,
Cheers,