Export geometry to root macro

Dear ROOTers,
I have some file with geometry, I would like to export it into macro - to modify the physical structure of t he detector. However when I export top node I get “messy variables” for example

  TGeoRotation* pMatrix0 = new TGeoRotation("", thx, phx, thy, phy, thz, phz);
  pMatrix0               = new TGeoCombiTrans("", dx, dy, dz, pMatrix0);
  // Translation: tSecPlate
  dx                        = 0;
  dy                        = 2.3149999999999999;
  dz                        = -145.90000000000001;
  TGeoTranslation* pMatrix0 = new TGeoTranslation("tSecPlate", dx, dy, dz);
  // Translation: tSecPlate
  dx                        = 0;
  dy                        = 1.385;
  dz                        = -145.90000000000001;
  TGeoTranslation* pMatrix0 = new TGeoTranslation("tSecPlate", dx, dy, dz);
  // Translation: tSecPlate
  dx                        = 0;
  dy                        = 2.3149999999999999;
  dz                        = 140.90000000000001;
  TGeoTranslation* pMatrix0 = new TGeoTranslation("tSecPlate", dx, dy, dz);

The same things happens with TGeoTranslation, only TGEoShapes have uqinque names.
Is there any simple way to have more usefull structure of the output macro?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Well, maybe @agheata can help with this

Hi,
Unfortunately not. Exporting geometry as a macro is not intended to replace the original geometry representation but rather to help understanding the content. Another option is to try to export in GDML format.

1 Like

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