Error when dividing G4Polyhedra

Dear experts

I am trying to divide a G4Polyhedra using G4PVDivision. The code compiles correctly, but when executed it throws an error that 'Divisions for G4Polyhedra currently NOT supported in MT-mode.' I am using G4RunManager instead of G4MTRunManager and yet the error persists. And then I also have set the value of of the environment variable G4MULTITHREADED to 0 in geant4make.sh file manually, but the error remains. What is the possible solution?

I had installed G4 with the G4MULTITHREADED = ON flag though.

Regards
Shubham

Hi Shubham,

you cannot use divided polyhedra in MT mode (you have an MT installation and cannot change the installation by setting an environment variable). It is one of the documented limitations.
Simply avoid divided polyhedra if you need MT.

Cheers, Gabriele

Ok. Thanks for your prompt response.
Can you suggest then how else to make a hexagonal shape?

The best way to make a hexagonal prism is to use G4ExtrudedSolid.

Hello

Thanks for your response. Actually, I need something that can be divided. I don’t think G4ExtrudedSolid can be divided using G4PVDivision. Can they?

Regards

Hi Shubham,

No, G4ExtrudedSolid can not be divided. If you need something that can be divided then you should use G4Polyhedra.

Alternately, you can try to represent the hexagonal volume as a couple of G4Trd.

Cheers,
Evgueni

BTW, a triangular prism can also be implemented as G4Trd