AIDASoft / DD4hep

Detector Description Toolkit for High Energy Physics
http://dd4hep.cern.ch
GNU Lesser General Public License v3.0
49 stars 95 forks source link

problem with geant4 visualization #977

Closed saraheno closed 1 year ago

saraheno commented 2 years ago

Hi, I am having problems opening the geant4 visualization with ddsim. I am setting up my environment using

source /cvmfs/sft.cern.ch/lcg/views/LCG_101/x86_64-centos7-gcc11-opt/setup.sh

I am running ddsim with a command like

ddsim --compactFile=./DRSingleCrystal.xml --runType=vis -G --steeringFile SCEPCALsteering.py --outputFile=testSCEPCAL.root --part.userParticleHandler='' -G --gun.position="0.,10.,0." --gun.direction "0 -1 0" --gun.energy "1*GeV" --gun.particle="mu-" --gun.distribution=uniform

I am running CentOS Linux release 7.9.2009 (Core)

I attach a screen grab with the error message

any help would be appreciated. Even just hearing if other people maybe running on lxplus are able to do this successfully?

vis

andresailer commented 2 years ago

Works for me from centos7 to lxplus with ssh -Y

image

andresailer commented 1 year ago

I will close this issue and refer also to the comment from Marko a few years ago: https://github.com/AIDASoft/DD4hep/issues/826#issuecomment-844112756

Visualization is quite tricky as it does not solely depend on how lxplus is configured but also on the particular version of X you are running and on the particular version of root. In general we recommend to visualize always locally.

saraheno commented 1 year ago

Hi Andre, My apologies for coming back to this, but it is very non-trivial to install cvmfs on ones own laptop and compile dd4hep on one's own lap top. I tried to compile dd4hep at cern and run it there, and the visualization still crashes (command like ddsim --compactFile=./SiD.xml --runType=vis -G -N=2 --steeringFile steering.py --outputFile=testSiD.root --gun.position "0.0 0.0 1.0cm" --gun.direction "1.0 1.0 0.1" --gun.energy "30GeV" --part.userParticleHandler="" --gun.particle "e-" --runType vis )

You seem to have run a visualization on lxplus using ddsim. Can you give me the exact commands you used to produce the visualization from login, including compiling? This is such a useful tool for students, and it is difficult not having it available, even if I run on lxplus.

Sarah Eno

On Wed, Sep 28, 2022 at 7:59 AM Andre Sailer @.***> wrote:

I will close this issue and refer also to the comment from Marko a few years ago:

826 (comment)

https://github.com/AIDASoft/DD4hep/issues/826#issuecomment-844112756

Visualization is quite tricky as it does not solely depend on how lxplus is configured but also on the particular version of X you are running and on the particular version of root. In general we recommend to visualize always locally.

— Reply to this email directly, view it on GitHub https://github.com/AIDASoft/DD4hep/issues/977#issuecomment-1260798533, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHZIOAIADT52H4ELN4RUW3WAQXI7ANCNFSM6AAAAAAQRG5CE4 . You are receiving this because you authored the thread.Message ID: @.***>

andresailer commented 1 year ago

Hi Sarah,

My steps are, to be explicit:

1) Use a centos7 desktop PC 2) ssh -Y lxplus.cern.ch 3) source /cvmfs/sft.cern.ch/lcg/views/LCG_101/x86_64-centos7-gcc11-opt/setup.sh 4) ddsim --compactFile=/cvmfs/sft.cern.ch/lcg/releases/DD4hep/01.18-20d6a/x86_64-centos7-gcc11-opt/DDDetectors/compact/SiD.xml --runType vis 5) /vis/open OGLIX 6) /vis/drawVolume

Graphics work! Thus, as far as I can tell there is nothing wrong with the installation of dd4hep, geant4 etc. I can appreciate your problem, you and I discussed before how to install a virtual machine, which then can use CVMFS, so beyond that I can't see that there is anything we can do for you.

saraheno commented 1 year ago

but Andre!!!! You did help me!!

I needed OGLIX instead of OGLSXm

Thank you!!!!

On Fri, Oct 21, 2022 at 3:43 AM Andre Sailer @.***> wrote:

Hi Sarah,

My steps are, to be explicit:

  1. Use a centos7 desktop PC
  2. ssh -Y lxplus.cern.ch
  3. source /cvmfs/ sft.cern.ch/lcg/views/LCG_101/x86_64-centos7-gcc11-opt/setup.sh
  4. ddsim --compactFile=/cvmfs/ sft.cern.ch/lcg/releases/DD4hep/01.18-20d6a/x86_64-centos7-gcc11-opt/DDDetectors/compact/SiD.xml --runType vis
  5. /vis/open OGLIX
  6. /vis/drawVolume

Graphics work! Thus, as far as I can tell there is nothing wrong with the installation of dd4hep, geant4 etc. I can appreciate your problem, you and I discussed before how to install a virtual machine, which then can use CVMFS, so beyond that I can't see that there is anything we can do for you.

— Reply to this email directly, view it on GitHub https://github.com/AIDASoft/DD4hep/issues/977#issuecomment-1286584456, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHZIOG5ZWLHGVYAIR2KHL3WEJCRPANCNFSM6AAAAAAQRG5CE4 . You are receiving this because you authored the thread.Message ID: @.***>

andresailer commented 1 year ago

Awesome!

saraheno commented 1 year ago

Hey Andre. Very sorry to open this again. :)

I have a student that is using a MAC with xquartz. The OGLIX does not seem to work. Do you know anybody who does this with a mac? What visualizer do they use?

andresailer commented 1 year ago

Hi @saraheno,

Sorry, I can't help you there.

veprbl commented 1 year ago

Qt visualizer is working fine on mac. In addition to change in the steering macro, you'd need to swap --runType vis with --runType qt.

saraheno commented 11 months ago

so for macs, in addition to using -runType qt, you should also do

defaults write org.xquartz.X11 enable_iglx -bool true

with this it works.