Example Macro-file¶
As an example of the concept of operations of MULASSIS, the code block below provides the macro-file to simulate proton transport in aluminium and silicon layers. This macro is found as manual_example.g4mac in the top directory of the distribution.
# Remove the default geometry /geometry/layer/delete 0 # Now build a new geometry # First define new material water. There are 4 predefined materials # 1: Vacuum 2: Air 3: Aluminium 4: Silicon /geometry/material/add Water H2-O 1.0 /geometry/material/list # There are three layers in the geometry # The Format is: add position materialName colourIndex thickness unit /geometry/layer/add 0 Aluminium 4 5. mm /geometry/layer/add 1 Vacuum 2 4. mm /geometry/layer/add 2 Aluminium 5 5. mm /geometry/layer/add 3 Silicon 8 0.1 mm /geometry/layer/list 0 # update MUST be called if the geometry has been changed /geometry/update # Select hadronic processes without EM (electron-gamma) nor # low-energy neutrons. /phys/scenario hadron-em-ln #Define global cuts as a function of particle. /phys/cuts/global/default 0.5 mm /phys/cuts/global/electron 1 mm /phys/cuts/global/positron 2 mm #Lower cuts for the Silicon layer /phys/region/add Detector /phys/region/addalayer Detector 4 /phys/cuts/region/setcut Detector 0.02 mm #Lower cuts for the aluminium layer in front the silicon /phys/region/add Low-cut-Al /phys/region/addalayer Low-cut-Al 3 /phys/cuts/region/cutperparticle Low-cut-Al gamma 0.1 mm /phys/cuts/region/cutperparticle Low-cut-Al e- 0.3 mm /phys/cuts/region/cutperparticle Low-cut-Al e+ 0.3 mm # Define the name of the CSV file for output. /analysis/file Mulassis_Example /analysis/normalise 1 cm2 # Delete the default pulse-height analysis settings, and set layer # 4 for PHA /analysis/phs/delete 0 /analysis/phs/add 4 /analysis/phs/list # Delete the default fluence analysis settings, and set layers 1 and 4 # for fluence analysis in units of /cm^2 /analysis/fluence/unit cm2 /analysis/fluence/type omni /analysis/fluence/delete 0 /analysis/fluence/add 1 /analysis/fluence/add 4 /analysis/fluence/list # Set the particles for fluence analysis as proton, neutron, # electron and muon. /analysis/fluence/particle/add proton /analysis/fluence/particle/add neutron /analysis/fluence/particle/add e- /analysis/fluence/particle/add muon /analysis/fluence/particle/list # Perform total dose analysis on layer 4 in units of MeV. /analysis/dose/add 4 /analysis/dose/unit MeV # Perform NIEL analysis on layer 4 using coefficients from CERN. /analysis/niel/add 4 /analysis/niel/function cern # Define energy binning scheme for fluence spectra. /analysis/fluence/energy/mode lin /analysis/fluence/energy/min 0 keV /analysis/fluence/energy/max 100 MeV /analysis/fluence/energy/nbin 10 /analysis/fluence/energy/list # Define angular binning scheme for fluence spectra. /analysis/fluence/angle/mode arb /analysis/fluence/angle/min 0 deg /analysis/fluence/angle/max 180 deg /analysis/fluence/angle/clear /analysis/fluence/angle/add 45 deg /analysis/fluence/angle/add 90 deg /analysis/fluence/angle/list # Define energy binning scheme for energy deposition spectra. /analysis/phs/energy/mode log /analysis/phs/energy/min 10 keV /analysis/phs/energy/max 5 MeV /analysis/phs/energy/nbin 20 /analysis/phs/energy/list # Define the incident particle spectra /gps/ang/type cos /gps/ang/maxtheta 10. deg /gps/ene/type Arb /gps/hist/type arb /gps/hist/point 1.01E+02 1.27E-01 /gps/hist/point 2.01E+02 2.52E-01 /gps/hist/point 3.00E+02 3.76E-01 /gps/hist/point 4.00E+02 5.03E-01 /gps/hist/point 5.06E+02 6.36E-01 /gps/hist/point 6.06E+02 7.61E-01 /gps/hist/point 7.05E+02 8.86E-01 /gps/hist/point 8.09E+02 1.02E+00 /gps/hist/point 8.21E+02 1.03E+00 /gps/hist/point 8.32E+02 1.05E+00 /gps/hist/point 8.43E+02 1.06E+00 /gps/hist/point 8.55E+02 1.07E+00 /gps/hist/point 8.67E+02 1.09E+00 /gps/hist/point 8.79E+02 1.10E+00 /gps/hist/point 8.91E+02 1.12E+00 /gps/hist/point 9.04E+02 1.14E+00 /gps/hist/point 1.01E+03 1.27E+00 /gps/hist/point 2.01E+03 2.53E+00 /gps/hist/point 3.00E+03 3.77E+00 /gps/hist/point 4.01E+03 5.04E+00 /gps/hist/point 5.00E+03 6.29E+00 /gps/hist/point 6.07E+03 7.63E+00 /gps/hist/point 7.07E+03 8.88E+00 /gps/hist/point 8.00E+03 1.01E+01 /gps/hist/point 9.06E+03 1.14E+01 /gps/hist/point 1.01E+04 1.27E+01 /gps/hist/point 2.02E+04 2.53E+01 /gps/hist/point 3.01E+04 3.78E+01 /gps/hist/point 4.02E+04 5.05E+01 /gps/hist/point 5.02E+04 6.30E+01 /gps/hist/point 6.00E+04 7.54E+01 /gps/hist/point 7.08E+04 8.90E+01 /gps/hist/point 8.02E+04 1.01E+02 /gps/hist/point 9.08E+04 1.14E+02 /gps/hist/point 1.00E+05 1.26E+02 /gps/hist/inter Lin /gps/particle proton # Set visualisation parameters. #/control/execute display1.mac # Output results to the CSV file every 10000 primary particles. /event/printModulo 10000 # Limit the execution time to 60,000 CPU seconds. /run/cputime 60000. # Commence simulation of 100,000 primary particles. /run/beamOn 100000
Mulassis/ml-v02-00/r342