How to use TGeoVolume::RandomRays

Dear all,

I’m new in root and I’m using v5.34.30 version in order to implement a root geometry.

In order to check the geometry I want to use the RandomRays function but I have some difficulties to understand how to draw the result of this function.

thanks,
Matthieu

If you are new to ROOT I would strongly recommend you go directly to ROOT 6.

It is not possible because i’m using root in a firm which only use this version.

Hi, you can try:

.x $ROOTSYS/tutorial/geom/rootgeom.C
// shoot 100000 rays from (0,0,0) and draw crossing of the rays with all visible volumes
gGeoManager->GetTopVolume()->RandomRays(100000);
// shoot 100000 rays from (0,0,0), draw only crossings with volume "bar1" and show normal vectors at crossing points
gGeoManager->GetTopVolume()->RandomRays(10000, 0, 0, 0, "bar1", true);

Hi,

Many thanks. It’s working perfectly.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.