I am trying to execute simulation with two point sources,
so I decided to define the sources via macro file on [DepositionGeant4] section.
Below is what I added in macro file, but it seems that nothing happens. I mean in the pixel hits file, no pixel hits are recorded. However the code executes with no problem.
Can you give me advice on what to add? Is there anythings that I need to revise?`
In principle your source looks okay. I copied it and had a play around, and it seems that the issue is the use of tabs instead of spaces. If I do this instead:
# Point Source 1
/gps/source/intensity 5.
/gps/particle e+
/gps/pos/type Point
/gps/pos/centre 0. 0. -10 mm
/gps/ene/type Mono
/gps/ene/mono 1 MeV
/gps/ang/type iso
/gps/direction 0 0 1
# Point Source 2
/gps/source/add 10.
/gps/particle e+
/gps/pos/type Point
/gps/pos/centre 5 0 -10 mm
/gps/ene/type Mono
/gps/ene/mono 500 keV
/gps/ang/type iso
/gps/direction 0 0 1
I end up with this in [VisualizationGeant4] (after doing /run/beamOn 1000 on its command line):
The initial conical shape here comes from that my dummy setup is in air, so things scatter immediately.
Hope this helps!
As a sidenote, gps/ang/type iso does nothing as you set the direction afterwards, but this is not very important (just in case you want to tidy up the code a little).
Thank you so much!
After I replaced the tab into space, it worked well.
Additionally, thanks for giving me the comment on angle definition. it helped a lot