Dear experts,
I have another question, this time about local and global uniform electric fields. As a new geant4 user, I’m curious how to correctly apply global/local (and combinations of both…) uniform electric fields.
For this purpose, I built a very simple geometry: 2 Stainless steel plates, 300cm x 20cm x 5cm.
The distance between them is set by me, (manually) to be 5cm or 50cm.(see the reason below)
I apply a local uniform electric field on each slice, with different direction, just to test if I can correctly apply it. To check this, I use the UI command /vis/scene/add/electricField.
And now on to the problem. When the distance of the slices is 50cm, the UI commands works perfectly, but when the distance between them is 5cm, I get the message “No Electric field in this extent”.(See screenshots below):
- Slices 50cm apart
- Slices 5cm apart
Is it just a visualization problem, or something else?
Why I get the “No Electric field in this extent” on the second case?
Any help is greatly appreciated!
I have also uploaded the DetectorCostruction.hh/cc If someone wants to check the code(sorry for the messy code! I’m still learning!)
DetectorConstruction.cc (8.4 KB)
DetectorConstruction.hh (1.8 KB)
PS: In the code you will see that I also declare a uniform global electric field, but it is currently set to zero.