Draw GDML file from ROOT with 'ogl' show the canvas camera badly

Dear experts,
I dumped a gdml file and tried to draw it from my mac.

this is the macro i am using

void geom_lhcb()
{
  gSystem->Load("libGeom");
  // TGeoManager::Import("run3_2024.Q1.2-v00.00.gdml");
  TGeoManager::Import("LHCb_run5_20August2024.gdml"); //LHCb_upgrade_simplified_orig.gdml"); //LHCb.gdml");
  gGeoManager->SetVisLevel(4);
  // gGeoManager->ls();
  // gGeoManager->GetTopVolume()->Print();
  gGeoManager->GetTopVolume()->Draw("ogl");
}

When drawing the canvas displayed is the following :

Somewhat it seems like the center of the graphic is wrong, is there a way to force the centering and zoom to be at specific values?

$|=>root --version
ROOT Version: 6.30/04
Built for macosxarm64 on Feb 05 2024, 18:52:59
From heads/latest-stable@

Hi and welcome on the forum,

Can you provide GDML file with your geometry?

Regards,
Sergey

Hi @linev , i cannot upload a .gdml file directly, would renaming to .root fine?

Generally also when i run locally the tutorials of gl displaying the first canvas shown is setting the origin basically at the top right of the pad. With arrows and openGL commands i can center the screen. It is however weird that the first displayed canvas do not put the origin at the center of the figure.

If renaming to .root the gdml file and uploading won’t break the file, i can upload it.
Cheers and thanks

You can download the gdml at CERNBox

I checked few gdmls and it alwayss behave like this on my mac, seems like a glitch of ROOT an openGL which do not display the canvas. centered properly when drawn at first. One can interactively move the screen (arrows command following the openGL guide for interactive visualization) to better visualize, but it’s a bit annoying

Hi,

Running with ROOT master - both OpenGL and Web-based geometry works fine.

web-based:

You also can try web-based display with ROOT 6.30 running root --web geom_lhcb.C.

Open-GL:

Seems to be problem was fixed in recent ROOT versions.

Regards,
Sergey

Indeed, thanks a lot, However on my mac i get directed to

WARNING!
Web mode switch --web is disabled for security reasons.
See https://root.cern/about/security/#2023-11-26-open-port-for-control-of-web-gui-allows-read-and-write-access-to-file-system for more information.
For environments controlling the security issues you can enable web display by calling
gROOT->SetWebDisplay(); in ROOT prompt or in startup scripts

I added in the script gROOT->SetWebDisplay(); and it works fine now.

Yes, in 6.30 we disable web feature because of security issue.
The best you can do - update to ROOT 6.32.

1 Like

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