Commit e726fcd6 authored by Valentina Fioretti's avatar Valentina Fioretti
Browse files

GDM example added

parent 8633684c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -121,7 +121,15 @@ Writing the mass model to a GDML file:
- activating the writing to GDML file:`GEOM.WRITE.GDML = true/false` (default = false)
- setting the name of the output file: `GEOM.WRITE.GDML.NAME = <name>.gdml`

Setting the world dimension [mm]:
- side of the box associated to the world: `WORLD.BOX.SIDE = 5000`

The `GEOM.VERSION` flag sets the name of the geometry class to use in the application:
`GEOM.VERSION = <class_name>` [example: ProtonScattering]

The user can create custom parameters in the user geometry class to modify parameters at runtime. See the geometry template for an example on how to add custom parameters. Additional information is provided in the section "Geometry and physics".


## Macro file

The file <name>.mac contains the commands to configure the source of primary particle and the number of simulated particles. BoGEMMS-HPC uses the Geant4 General Particle Source and all the commands are described in the Geant4 documentation. The user can find in the provided examples different applications of the Geant4 GPS. If the visualization driver is installed, the macro file allows allows to set the driver and the visualization commands. The GDML reading example generates a VRML output file to visualize the imported volumes.
+8 KiB

File added.

No diff preview for this file type.

+83 −0
Original line number Diff line number Diff line
######################################################
# Selection of output files
IO.FILETYPE.FITS = true
IO.FILETYPE.FITSEND = false 

IO.FILE.XYZ = true

#######################################################
# IO XYZ file configuration
IOXYZ.EVT_ID = true
IOXYZ.TRK_ID = true
IOXYZ.PARENT_TRK_ID = true
IOXYZ.VOLUME_ID = true
IOXYZ.VOLUME_NAME = true
IOXYZ.MOTHER_ID = true
IOXYZ.E_DEP = true
IOXYZ.X_ENT = true
IOXYZ.Y_ENT = true
IOXYZ.Z_ENT = true
IOXYZ.X_EXIT = true
IOXYZ.Y_EXIT = true
IOXYZ.Z_EXIT = true
IOXYZ.E_KIN_ENT = true
IOXYZ.E_KIN_EXIT = true
IOXYZ.MDX_ENT = true
IOXYZ.MDY_ENT = true
IOXYZ.MDZ_ENT = true
IOXYZ.MDX_EXIT = true
IOXYZ.MDY_EXIT = true
IOXYZ.MDZ_EXIT = true
IOXYZ.GTIME_ENT = true
IOXYZ.GTIME_EXIT = true
IOXYZ.PARTICLE_ID = true
IOXYZ.PARTICLE_NAME = false
IOXYZ.PROCESS_ID = true
IOXYZ.PROCESS_NAME = false

#volume selection
IOXYZ.volumeselection.number = 1
IOXYZ.volumeselection.0.start = 0
IOXYZ.volumeselection.0.end = 1000000000

#number of rows for each file
IOXYZ.NRows  = 1000

#write only volume with energy deposit (this do not exclude the world)
IOXYZ.writeonlyifenergydeposit = 0

#exclude the world
#NB: the world contains the initial energy and momentum
IOXYZ.removeWorldEvent = 0

########################################################
# physical process

PHYS.VERSION = AREMBESPhys
AREMBESPhys.PHYSLIST = SpacePhysics_QGSP_BIC_HP
AREMBESPhys.DEFAULT.CUT = 0.001

# activating SPL EM parameters
AREMBESPhys.SPACEPHYS.ACTIVATE = 0

# region cuts
REGION.TARGET.CUT = 0.1
REGION.TARGET.PROTON.CUT = 0.1


########################################################
# geometry configuration

# setting the world dimension [mm]
WORLD.BOX.SIDE = 100

GEOM.VERSION = GDMLread

GEOM.GDML.PATH = /Users/fioretti/G4_Projects/BoGEMMS-HPC/gdml_files
GEOM.GDML.FILENAME = solids.gdml

# define the number of sensitive logical volumes
N.SENSITIVE.VOLUMES = 2
# define the name of the sensitive logical volumes
NAME.SENSITIVE.VOLUME.0 = vol0
NAME.SENSITIVE.VOLUME.1 = vol1
+55 −0
Original line number Diff line number Diff line
/run/verbose 0

#Standard setup
/vis/scene/create
/vis/open VRML2FILE

/vis/scene/add/volume
/vis/scene/add/trajectories
#/vis/scene/add/hits
/vis/viewer/set/lightsThetaPhi 90. 0.
#/vis/viewer/set/viewpointThetaPhi 0. 90.
/vis/viewer/set/viewpointVector 0 1 0
#/vis/viewer/set/style surface
/vis/viewer/zoom 1

#/vis/set/lineWidth 0.1

#/vis/viewer/set/hiddenEdge true
#Create drawByParticleID model, highlighting photons
/vis/modeling/trajectories/create/drawByParticleID
/vis/modeling/trajectories/drawByParticleID-0/set gamma green
/vis/modeling/trajectories/drawByParticleID-0/set e- yellow
/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
/vis/modeling/trajectories/drawByParticleID-0/set mu- red
/vis/modeling/trajectories/drawByParticleID-0/set mu+ red
/vis/modeling/trajectories/drawByParticleID-0/set proton blue
/vis/modeling/trajectories/drawByParticleID-0/set neutrino grey

#Create drawByCharge model, colouring photons white
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 blue
#/vis/modeling/trajectories/drawByCharge-0/set -1 red
#/vis/modeling/trajectories/drawByCharge-0/set 0 white

/vis/scene/endOfEventAction accumulate

/gps/particle gamma

/gps/pos/type Plane
/gps/pos/shape Rectangle
/gps/pos/halfx 2 cm
/gps/pos/halfy 2 cm
/gps/pos/centre 0.0 0.0 5.0 cm
/gps/direction 0 0 -1



/gps/ene/mono 50 keV


# Set number of particles and start
/random/resetEngineFrom currentEvent.rndm
/run/beamOn 100
/random/saveThisRun