Geometry/track/hit visualization with new classes


The new web-based 3D graphics libraries are looking very nice. I would like to implement a very simple event display to begin testing them and have a questions about the current suggested approach.

At the moment, it seems that RGeomViewer cannot display 3D lines/tracks or hits. This is unfortunate, because it provides a gorgeous display with extremely easy TGeoManager interfacing (auto viewer = make_shared<RGeomViewer>(geom)) and trivial configuration via SetDrawOptions.

Eve7, on the other hand, will obviously be the successor to Eve for powerful event displays with tracks/hits, but does not seem to support simple imports of TGeoManager geometries, like we can currently do with Eve via TEveGeoTopNode.

What is the best current (v6.28) approach for taking advantage of the new graphics libraries to achieve both simple track/hit visualization and easy TGeo intergration?


Hi Lindsey,

RGeomViewer is developed as generic viewer for geometries. By the way - RGeomViewer is used by default once ROOT started with root --web arguments. It is based on my experience of geometry display with JSROOT - but at the same time let reuse existing ROOT code. Actually, with JSROOT you already can display many different primitives together - see tracks, hits, projections examples.

eve7 is powerful tool to implement online event displays - which includes data access, working with data collections in tables, draw selected primitives (tracks, hits, jets, geometry volumes) with different projections. And most important - interactions with such data. Not to forget - multi-user support, when many operators can look on the same data together.

Typically one do not display events on top of full detector geometry. Rather only several sub-elements which are hit by particles. At least this was approach up to now.

Currently we (I, @matevz, @alja) are working on more close integration of geometry viewer into eve7.
First of all, this will let to display and browse geometry from eve7. And as next steps - combine events and geometry displays together.

Hopefully all these new features will appear in next ROOT release. Already now you can see in master branch some of new functionality for RGeomViewer - selection of top node, switching visibility of physical and logical nodes, context menus.

I guess, @matevz or @alja can add there comments as well. But most probably we need more information about your plans and your ideas to understand that is possible already now with existing eve7 code and that is missing, but can be implemented in the future.


Thank you for the answer and for all the work on the many packages you manage!

Answering your question - what I am looking to do, at least in this starting phase, is very basic. I am defining a simple (O(100) elements) geometry using TGeo* - since it provides an easy way to verify and visualize the layouts. The next natural step to me was to draw a few hits (markers or boxes) and tracks (just lines, really - no need for propagation or anything) over this, producing a very simple (compared to full eve capabilities) event display.

Probably I should look more at the JSROOT examples you point to, but it wasn’t clear to me how to use it as part of an application (as one does with RGeomViewer) vs reading and displaying info from pre-built root files. If it is possible, a dead simple example that draws a box, a line and a hit from a root macro would be immensely valuable.

Anyway, thanks again for the excellent work.


There is simple example in tutorials/http/httpgeom.C showing usage of JSROOT and THttpServer to display geometry with several tracks. Just start it and open in the web browser http://localhost:8090.

Example can be extend to display some hits on top.
Produced objects also can be stored in ROOT file and drawn with plain JSROOT - if it required.

1 Like

Hi Lindsey,

I’m just adding information to Sergey’s messages as Eve developer.

Eve7/REve can display tracks and hits. If you need just a few hundreds of geometrical shapes that are accessible though TGeoManager you can look at the example tutorials/eve7/geom_cms.C. The tutorials/eve7/event_demo.C may seem heavy, but it has review of available physics objects to visualize.

Returning back to RGeomViewer topic, Sergey has put a lot of effort to integrate it in REve and added features to change color, filter and move in hierarchy. This integration in REve will be available in the next root release.


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