##Visualization /vis/disable #/vis/open OGLSX #/vis/viewer/set/viewpointThetaPhi 30 30 #/vis/viewer/zoom 1.0 #/vis/drawVolume #/vis/viewer/flush #/vis/scene/add/trajectories /gate/geometry/setMaterialDatabase GateMaterials.db ##World /gate/world/geometry/setXLength 500 mm /gate/world/geometry/setYLength 500 mm /gate/world/geometry/setZLength 500 mm ## Create the SPECT system /gate/world/daughters/name SPECThead /gate/world/daughters/insert box /gate/SPECThead/geometry/setZLength 60. mm /gate/SPECThead/geometry/setYLength 100. mm /gate/SPECThead/geometry/setXLength 100. mm /gate/SPECThead/placement/setTranslation 0. 0. 130.0 mm /gate/SPECThead/setMaterial Air /gate/SPECThead/attachPhantomSD /gate/SPECThead/vis/setColor white /gate/SPECThead/vis/setLineWidth 3 /gate/SPECThead/vis/forceWireframe ## Create crystal volume /gate/SPECThead/daughters/name crystal /gate/SPECThead/daughters/insert box /gate/crystal/geometry/setZLength 8.0 mm /gate/crystal/geometry/setYLength 50.0 mm /gate/crystal/geometry/setXLength 50.0 mm /gate/crystal/placement/setTranslation 0. 0. -30. mm /gate/crystal/setMaterial Air /gate/crystal/vis/setColor yellow /gate/crystal/vis/forceWireframe /gate/crystal/vis/setLineWidth 2 /gate/systems/SPECThead/crystal/attach crystal /gate/crystal/attachCrystalSD /gate/systems/SPECThead/describe /gate/crystal/daughters/name pixel /gate/crystal/daughters/insert box /gate/pixel/geometry/setXLength 1.0 mm /gate/pixel/geometry/setYLength 1.0 mm /gate/pixel/geometry/setZLength 1.0 mm /gate/pixel/setMaterial CZT /gate/pixel/vis/setColor red /gate/pixel/vis/forceSolid /gate/pixel/vis/setLineWidth 5 /gate/systems/SPECThead/pixel/attach pixel /gate/pixel/attachCrystalSD /gate/pixel/repeaters/insert cubicArray /gate/pixel/cubicArray/setRepeatNumberX 50 /gate/pixel/cubicArray/setRepeatNumberY 50 /gate/pixel/cubicArray/setRepeatNumberZ 8 /gate/pixel/cubicArray/setRepeatVector 1 1 0.0 mm /gate/pixel/cubicArray/autoCenter true ## Physics /gate/physics/addProcess PhotoElectric /gate/physics/addProcess LowEnergyCompton /gate/physics/addProcess LowEnergyRayleighScattering /gate/physics/addProcess ElectronIonisation /gate/physics/addProcess Bremsstrahlung /gate/physics/addProcess MultipleScattering e- /gate/physics/processList Enabled /gate/physics/processList Initialized ## Cuts for particles /gate/physics/Gamma/SetCutInRegion SPECThead 1.0 mm /gate/physics/Electron/SetCutInRegion SPECThead 10.0 mm ## Initialization /gate/run/initialize ## Define the source /gate/source/addSource pointsource1 /gate/source/pointsource1/gps/type Point /gate/source/pointsource1/gps/centre 0. 0. 0. mm /gate/source/pointsource1/gps/particle gamma /gate/source/pointsource1/setForcedUnstableFlag true /gate/source/pointsource1/gps/energy 140. keV /gate/source/pointsource1/setForcedHalfLife 21672. s /gate/source/pointsource1/setActivity 100.e-6 Ci /gate/source/pointsource1/gps/angtype iso /gate/source/pointsource1/gps/mintheta 180. deg /gate/source/pointsource1/gps/maxtheta 180. deg /gate/source/pointsource1/gps/minphi 0. deg /gate/source/pointsource1/gps/maxphi 0. deg ## Digitizer ## The digitizer tracks what happens in the detection system and in the electronics ## Build a digitizer that first computes the centroid of interactions /gate/digitizer/Singles/insert adder /gate/digitizer/Singles/insert readout /gate/digitizer/Singles/readout/setDepth 2 /gate/digitizer/Singles/insert blurring /gate/digitizer/Singles/blurring/setResolution 0.09 /gate/digitizer/Singles/blurring/setEnergyOfReference 140. keV /gate/digitizer/Singles/insert spblurring /gate/digitizer/Singles/spblurring/setSpresolution 3.7 mm /gate/digitizer/Singles/spblurring/verbose 2 /gate/digitizer/Singles/insert thresholder /gate/digitizer/Singles/thresholder/setThreshold 126. keV /gate/digitizer/Singles/insert upholder /gate/digitizer/Singles/upholder/setUphold 154. keV ## Output-Select the options of the data output ## As there are several modules, settings have to be defined for each module, especially in SPECT, where there ## are a lots of hits for only a few counts, so it's better to limit the amount of data produced ## Here the SingleDigi output can be used if you have your own program to process the data /gate/output/root/enable /gate/output/root/setFileName czt1 /gate/output/root/setRootSinglesAdderFlag 1 /gate/output/root/setRootSinglesBlurringFlag 1 /gate/output/root/setRootSinglesSpblurringFlag 1 /gate/output/root/setRootSinglesThresholderFlag 1 /gate/output/root/setRootSinglesUpholderFlag 1 /gate/output/ascii/enable /gate/output/ascii/setFileName czt1 /gate/output/ascii/setOutFileHitsFlag 1 /gate/output/ascii/setOutFileSinglesFlag 1 /gate/output/ascii/setOutFileSinglesSpblurringFlag 1 /gate/output/ascii/setOutFileSinglesBlurringFlag 1 /gate/output/ascii/setOutFileSinglesAdderFlag 1 /gate/output/ascii/setOutFileSinglesReadoutFlag 1 ## Random # JamesRandom Ranlux64 MersenneTwister /gate/random/setEngineName Ranlux64 #/gate/random/setEngineSeed default /gate/random/setEngineSeed auto #/gate/random/setEngineSeed 123456789 #/gate/random/resetEngineFrom fileName /gate/random/verbose 0 ## Projections-Makes a set of projections from the crystal hits ## Define the binning the projection module to be used /gate/output/projection/enable /gate/output/projection/setFileName czt1 /gate/output/projection/pixelSizeX 0.3 mm /gate/output/projection/pixelSizeY 0.3 mm /gate/output/projection/pixelNumberX 1024 /gate/output/projection/pixelNumberY 1024 ## Specify the projection plane (XY, YZ or ZX) /gate/output/projection/projectionPlane XY ## Experiment-Define the parameters of the experiment (start time, stop time and time slice) ## The number of projections depends on the number of time slice, the rotation speed of the system and the ## number of heads /gate/application/setTimeSlice 1. ms /gate/application/setTimeStart 0. ms /gate/application/setTimeStop 1. ms ## Verbosity /control/verbose 0 /run/verbose 0 /event/verbose 0 /tracking/verbose 0 # L E T' S R U N T H E S I M U L A T I O N ! /gate/application/startDAQ