Skip to content

DepositionGeant4: further reduce restrictions for type "macro"

Simon Spannagel requested to merge deposition_macro into master

There are a few more commands supported by the Geant4 GeneralParticleSource which we should support, specifically the possibility to add multiple sources (e.g. requested here

In principle, this is easily done as implemented in the MR, but one problem remains:

We currently use the source_position from our configuration file to automatically extend the world volume to include the respective source. With multiple sources, this is not possible anymore, since the syntax is simply (taken form a G4 example):

# two beams in a generator

# beam #1
# default intensity is 1 now change to 5.
/gps/source/intensity 5. 
/gps/particle proton 
/gps/pos/type Beam

# The position is off in x by one mm:
/gps/pos/centre 1. 0. 0. mm 

# the beam energy is in gaussian profile centered at 400 MeV
/gps/ene/type Gauss 
/gps/ene/mono 400 MeV 
/gps/ene/sigma 50. MeV

# beam #2
# 2x the instensity of beam #1
/gps/source/add 10.
/gps/particle e- 
/gps/pos/type Beam

# The beam is centered at the orgin
/gps/pos/centre 0. 0. 0. mm 

# Gaussian energy profile 
/gps/ene/type Gauss 
/gps/ene/mono 600 MeV 
/gps/ene/sigma 50. MeV 

So we need access to the /gps/pos/centre command to be able to place them at different positions. This would mean that we would have to remove the automatic inclusion in the world volume for source_type = "macro".

Any thoughts?

Edited by Simon Spannagel

Merge request reports