# S.E. Mazzaglia May 4 2010 # Example macro file to show how to change geometric properties and voxelization of the phantom/detector ####################### # Set of the verboses # ####################### # /control/verbose 1 /tracking/verbose 0 /run/verbose 1 /event/verbose 0 ########################## # Set of the physic models # /Physics/addPhysics QGSP_BIC_EMY # Initialize geometry and physic /run/initialize ############################# # Initialize graphic system # ############################# # /vis/scene/create /vis/open OGL /vis/viewer/flush /vis/viewer/set/viewpointThetaPhi 30 140 deg /tracking/storeTrajectory 1 /vis/scene/endOfEventAction accumulate -1 # this accumulate infinite tracks # zoom to phantom... /vis/viewer/panTo 1.5 0.5 /vis/viewer/zoomTo 3 ########################## # Set here the cut and the step max for the tracking. # Suggested values of cut and step: # # Set cuts OUTSIDE the detector /run/setCut 0.01 mm # Set cuts ONLY inside the detector /run/setCutForRegion DetectorLog 0.01 mm /Step/waterPhantomStepMax 1 mm ######################### ######################### # Set the primary particle type, # energy and position along the X direction # #---------------------------gps----------------- /gps/pos/shape Circle /gps/pos/centre -310. 0. 0. cm /gps/pos/radius 0. mm /gps/pos/sigma_r 2. mm /gps/particle proton /gps/pos/type Beam # the incident surface is in the y-z plane /gps/pos/rot1 0 1 0 /gps/pos/rot2 0 0 1 # the beam energy is in gaussian profile # /gps/ene/type Gauss /gps/energy 62 MeV /gps/ene/sigma 300 keV /gps/direction 1 0 0 #################################### # Change Phantom/Detector geometry # #################################### ########################################################################################## # Cut & paste the following commands in order to create, starting from the default sizes, # a full voxellized (40 by 40 by 40) detector /changePhantom/size 4 4 4 cm /changeDetector/size 4 4 4 cm /changeDetector/voxelSize 1 1 1 mm # Put the detector in the lower left corner of the phantom /changeDetector/displacement 0 0 0 /changePhantom/update ########################################################################################## /run/beamOn 1000