ROOT transformation to GEANT4

Hello experts,

I looked through ROOT documentation it seems that it is possible to model with root majority of geometries…
At least what could satisfy my production needs.
I need to establish whether it is possible to create in ROOT description of detector which will be exported into GEANT4 for Monte-Carlo simulation. It is a solid geometry, and better if it will not be represented by triangles finally in GEANT4, i.e. another basic elements will be used, voxels, cubes…

But one of my college says that ROOT has several shortcomings.
1)It is oriented on GEANT3, instead of GEANT4, so not all features will be represented in GEANT4.
2)And it is used for describing multi-leaf collimators(detectors), therefore, not all shapes can be represented…
My questions are:

  1. Is it possible to model in ROOT not just multi-leaf collimators, for instance x-ray tube?

  2. Does all ROOT geometry can be represented in GEANT4, maybe it has some known issues, or shortcomings?

  3. If I export geometry into GDML, what kind of basic elements is used?

I read about two opportunities one is export geometry into GDML and load into GEANT4.
Second is to use GEANT4 VMC. So all shapes should be represented in GEANT4.

As far as I understood it is framework, so it is possible to define any kind of geometry in code. From my point of view not so intuitive how to start some kind of graphical designer, but it is not the biggest problem…

you will get an answer later today


ROOT geometry is quite compatible with GEANT4 one, both in capabilities and possibility to represent geometry setups. There are of course some features and helper utilities that make them different, but a conversion from one to another is always possible unless some special features are used.

It is not accurate to say that ROOT geometry is GEANT3 oriented, at least no more than the GEANT4 one is. It is the VMC interface to create geometry which is G3 oriented, but you are not forced to use it to use VMC. You can define a geometry having the full features of ROOT geometry (and using the native class interface) and then use it in a GEANT4 simulation via VMC.

Now talking about possibilities, it doesn’t look like the X-ray tube geometry is much of a challenge for both ROOT/G4 geometries, so don’t worry - we have examples of structures much more complex than that.

Once the geometry is defined in ROOT, you can export in GDML (what do you mean what elements are used - the xml equivalent of the solids, materials, … used in your geometry) You can afterwards import in a G4 native application. Much better you can use the ROOT geometry directly via VMC with no conversion penalties.


Rene, Andrei
Thanks for your replies.

To Andrei:

As far as I understood ROOT shapes would be mapped to the corresponding GDML shapes.
So sphere from ROOT will be represented as xml (if such node exist in GDML) in GDML, not like a set of triangles.
I remember a case when I imported sphere in FASTRAD application from file having STEP format, and exported it into GDML. In GDML file sphere was described as set of triangles, therefore redrawing in GEANT4 took too much time.