Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
595 changes: 595 additions & 0 deletions t25_offline_digit/data/GateMaterials_pet.db

Large diffs are not rendered by default.

149 changes: 149 additions & 0 deletions t25_offline_digit/mac/PET_CylindricalPET_geom.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# *********************************************************************
# * DISCLAIMER *
# * *
# * Neither the authors of this software system, nor their employing *
# * institutes, nor the agencies providing financial support for this *
# * work make any representation or warranty, express or implied, *
# * regarding this software system or assume any liability for its *
# * use. *
# * *
# * This code implementation is the intellectual property of the *
# * OpenGATE collaboration. *
# * By copying, distributing or modifying the Program (or any work *
# * based on the Program) you indicate your acceptance of this *
# * statement, and all its terms. *
# *********************************************************************
#

#-------------------oooooOOOOO00000OOOOOooooo---------------------#
#
# D E F I N E Y O U R S C A N N E R A N D
#
# Y O U R C O M P L E T E S I M U L A T I O N
#
# F O R I M A G I N G A P P L I CA T I O N S
#
#-------------------oooooOOOOO00000OOOOOooooo---------------------#


#=====================================================
# GEOMETRY
#=====================================================


# W O R L D
#
/gate/world/geometry/setXLength 400. cm
/gate/world/geometry/setYLength 400. cm
/gate/world/geometry/setZLength 400. cm


#-------------------oooooOOOOO00000OOOOOooooo---------------------#
# #
# D E F I N I T I O N A N D D E S C R I T I O N #
# O F Y O U R P E T D E V I C E #
# #
#-------------------oooooOOOOO00000OOOOOooooo---------------------#

# CYLINDRICAL
/gate/world/daughters/name cylindricalPET
/gate/world/daughters/insert cylinder
/gate/cylindricalPET/placement/setTranslation 0.0 0.0 0.0 cm
/gate/cylindricalPET/geometry/setRmax 52.0 cm
/gate/cylindricalPET/geometry/setRmin 39.9 cm
/gate/cylindricalPET/geometry/setHeight 40.2 cm
/gate/cylindricalPET/setMaterial Air
/gate/cylindricalPET/vis/forceWireframe
/gate/cylindricalPET/vis/setColor white

# HEAD
/gate/cylindricalPET/daughters/name head
/gate/cylindricalPET/daughters/insert box
/gate/head/placement/setTranslation 44.0 0.0 0.0 cm
/gate/head/geometry/setXLength 8 cm
/gate/head/geometry/setYLength 32 cm
/gate/head/geometry/setZLength 40 cm
/gate/head/setMaterial Air
/gate/head/vis/setVisible 0


# BLOCK
/gate/head/daughters/name block
/gate/head/daughters/insert box
/gate/block/placement/setTranslation 0.0 0.0 0.0 cm
/gate/block/geometry/setXLength 30 mm
/gate/block/geometry/setYLength 16 mm
/gate/block/geometry/setZLength 20 mm
/gate/block/setMaterial Air
/gate/block/vis/setVisible 0

# C R Y S T A L
/gate/block/daughters/name crystal
/gate/block/daughters/insert box
/gate/crystal/placement/setTranslation 0.0 0.0 0.0 cm
/gate/crystal/geometry/setXLength 30 mm
/gate/crystal/geometry/setYLength 3.0 mm
/gate/crystal/geometry/setZLength 3.8 mm
/gate/crystal/setMaterial Air
/gate/crystal/vis/setVisible 0


# LSO layer
/gate/crystal/daughters/name LSO
/gate/crystal/daughters/insert box
/gate/LSO/placement/setTranslation -0.75 0.0 0.0 cm
/gate/LSO/geometry/setXLength 15 mm
/gate/LSO/geometry/setYLength 3.0 mm
/gate/LSO/geometry/setZLength 3.8 mm
/gate/LSO/setMaterial LSO
/gate/LSO/vis/setColor red

# BGO layer
/gate/crystal/daughters/name BGO
/gate/crystal/daughters/insert box
/gate/BGO/placement/setTranslation +0.75 0.0 0.0 cm
/gate/BGO/geometry/setXLength 15 mm
/gate/BGO/geometry/setYLength 3.0 mm
/gate/BGO/geometry/setZLength 3.8 mm
/gate/BGO/setMaterial BGO
/gate/BGO/vis/setColor yellow

# R E P E A T C R Y S T A L
/gate/crystal/repeaters/insert cubicArray
/gate/crystal/cubicArray/setRepeatNumberX 1
/gate/crystal/cubicArray/setRepeatNumberY 5
/gate/crystal/cubicArray/setRepeatNumberZ 5
/gate/crystal/cubicArray/setRepeatVector 0.0 3.2 4.0 mm


# R E P E A T BLOCK
/gate/block/repeaters/insert cubicArray
/gate/block/cubicArray/setRepeatNumberX 1
/gate/block/cubicArray/setRepeatNumberY 20
/gate/block/cubicArray/setRepeatNumberZ 20
/gate/block/cubicArray/setRepeatVector 0.0 1.6 2.0 cm


# R E P E A T HEAD
/gate/head/repeaters/insert ring
/gate/head/ring/setRepeatNumber 4


# A T T A C H S Y S T E M
/gate/systems/cylindricalPET/rsector/attach head
/gate/systems/cylindricalPET/module/attach block
/gate/systems/cylindricalPET/crystal/attach crystal
/gate/systems/cylindricalPET/layer0/attach LSO
/gate/systems/cylindricalPET/layer1/attach BGO

# A T T A C H C R Y S T A L SD
#I do not think that attach SD is necessary

/gate/LSO/attachCrystalSD
/gate/BGO/attachCrystalSD

/gate/systems/cylindricalPET/describe



#==========
244 changes: 244 additions & 0 deletions t25_offline_digit/mac/main1.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@

/control/execute mac/verbose.mac
#/control/execute mac/visu.mac

# GEOMETRY
/gate/geometry/setMaterialDatabase data/GateMaterials_pet.db

/gate/world/geometry/setXLength 400. cm
/gate/world/geometry/setYLength 400. cm
/gate/world/geometry/setZLength 400. cm


# CYLINDRICAL
/gate/world/daughters/name cylindricalPET
/gate/world/daughters/insert cylinder
/gate/cylindricalPET/placement/setTranslation 0.0 0.0 0.0 cm
/gate/cylindricalPET/geometry/setRmax 52.0 cm
/gate/cylindricalPET/geometry/setRmin 39.9 cm
/gate/cylindricalPET/geometry/setHeight 40.2 cm
/gate/cylindricalPET/setMaterial Air
/gate/cylindricalPET/vis/forceWireframe
/gate/cylindricalPET/vis/setColor white

# HEAD
/gate/cylindricalPET/daughters/name head
/gate/cylindricalPET/daughters/insert box
/gate/head/placement/setTranslation 44.0 0.0 0.0 cm
/gate/head/geometry/setXLength 8 cm
/gate/head/geometry/setYLength 32 cm
/gate/head/geometry/setZLength 40 cm
/gate/head/setMaterial Air
/gate/head/vis/setVisible 0


# BLOCK
/gate/head/daughters/name block
/gate/head/daughters/insert box
/gate/block/placement/setTranslation 0.0 0.0 0.0 cm
/gate/block/geometry/setXLength 30 mm
/gate/block/geometry/setYLength 16 mm
/gate/block/geometry/setZLength 20 mm
/gate/block/setMaterial Air
/gate/block/vis/setVisible 0

# C R Y S T A L
/gate/block/daughters/name crystal
/gate/block/daughters/insert box
/gate/crystal/placement/setTranslation 0.0 0.0 0.0 cm
/gate/crystal/geometry/setXLength 30 mm
/gate/crystal/geometry/setYLength 3.0 mm
/gate/crystal/geometry/setZLength 3.8 mm
/gate/crystal/setMaterial Air
/gate/crystal/vis/setVisible 0


# LSO layer
/gate/crystal/daughters/name LSO
/gate/crystal/daughters/insert box
/gate/LSO/placement/setTranslation -0.75 0.0 0.0 cm
/gate/LSO/geometry/setXLength 15 mm
/gate/LSO/geometry/setYLength 3.0 mm
/gate/LSO/geometry/setZLength 3.8 mm
/gate/LSO/setMaterial LSO
/gate/LSO/vis/setColor red

# BGO layer
/gate/crystal/daughters/name BGO
/gate/crystal/daughters/insert box
/gate/BGO/placement/setTranslation 0.75 0.0 0.0 cm
/gate/BGO/geometry/setXLength 15 mm
/gate/BGO/geometry/setYLength 3.0 mm
/gate/BGO/geometry/setZLength 3.8 mm
/gate/BGO/setMaterial BGO
/gate/BGO/vis/setColor yellow

# R E P E A T C R Y S T A L
/gate/crystal/repeaters/insert cubicArray
/gate/crystal/cubicArray/setRepeatNumberX 1
/gate/crystal/cubicArray/setRepeatNumberY 5
/gate/crystal/cubicArray/setRepeatNumberZ 5
/gate/crystal/cubicArray/setRepeatVector 0.0 3.2 4.0 mm


# R E P E A T BLOCK
/gate/block/repeaters/insert cubicArray
/gate/block/cubicArray/setRepeatNumberX 1
/gate/block/cubicArray/setRepeatNumberY 20
/gate/block/cubicArray/setRepeatNumberZ 20
/gate/block/cubicArray/setRepeatVector 0.0 1.6 2.0 cm


# R E P E A T HEAD
/gate/head/repeaters/insert ring
/gate/head/ring/setRepeatNumber 4


# A T T A C H S Y S T E M
/gate/systems/cylindricalPET/rsector/attach head
/gate/systems/cylindricalPET/module/attach block
/gate/systems/cylindricalPET/crystal/attach crystal
/gate/systems/cylindricalPET/layer0/attach LSO
/gate/systems/cylindricalPET/layer1/attach BGO

# A T T A C H C R Y S T A L SD

/gate/LSO/attachCrystalSD
/gate/BGO/attachCrystalSD

/gate/systems/cylindricalPET/describe



#=====================================================
# P H A N T O M
#=====================================================

#/gate/world/daughters/name phantom
#/gate/world/daughters/insert box

#/gate/phantom/geometry/setXLength 10 cm
#/gate/phantom/geometry/setYLength 10 cm
#/gate/phantom/geometry/setZLength 10 cm
#/gate/phantom/setMaterial Water
#/gate/phantom/vis/forceSolid
#/gate/phantom/vis/setColor blue

#/gate/phantom/attachPhantomSD


#=====================================================
# PHYSICS
#=====================================================

/gate/physics/addPhysicsList emstandard_opt4

#=====================================================
# CUTS
#=====================================================

/gate/physics/Gamma/SetCutInRegion LSO 1.0 cm
/gate/physics/Electron/SetCutInRegion LSO 1.0 cm
/gate/physics/Positron/SetCutInRegion LSO 1.0 cm

/gate/physics/Gamma/SetCutInRegion BGO 1.0 cm
/gate/physics/Electron/SetCutInRegion BGO 1.0 cm
/gate/physics/Positron/SetCutInRegion BGO 1.0 cm


#/gate/physics/Gamma/SetCutInRegion phantom 0.1 mm
#/gate/physics/Electron/SetCutInRegion phantom 0.1 mm
#/gate/physics/Positron/SetCutInRegion phantom 0.1 mm

#/gate/physics/SetMaxStepSizeInRegion phantom 0.01 mm

#=====================================================
# INITIALISATION
#=====================================================

/gate/run/initialize

#/control/execute mac/visu.mac

#=====================================================
# D I G I T I Z E R: DETECTOR ELECTRONIC RESPONSE
#=====================================================

/gate/digitizer/Singles/insert adder
#/gate/digitizer/Singles/insert readout
#/gate/digitizer/Singles/readout/setDepth 1

#/gate/digitizer/Singles/insert blurring
#/gate/digitizer/Singles/blurring/setResolution 0.26
#/gate/digitizer/Singles/blurring/setEnergyOfReference 511. keV

/gate/digitizer/Singles/insert thresholder
/gate/digitizer/Singles/thresholder/setThreshold 350. keV
/gate/digitizer/Singles/insert upholder
/gate/digitizer/Singles/upholder/setUphold 650. keV

#=====================================================
# C O I N C I D E N C E S O R T E R
#=====================================================

/gate/digitizer/Coincidences/setWindow 10. ns

#=====================================================
# P A R T I C L E S O U R C E
#=====================================================

/gate/source/addSource posiC11

/gate/source/posiC11/setType backtoback

# The particles emitted by the source are gammas
/gate/source/posiC11/gps/particle gamma

# The gammas have an energy of 511 keV
/gate/source/posiC11/gps/energytype Mono
/gate/source/posiC11/gps/monoenergy 0.511 MeV

/gate/source/posiC11/setActivity 10000 becquerel

/gate/source/posiC11/setForcedUnstableFlag true
/gate/source/posiC11/setForcedHalfLife 1223 s
/gate/source/posiC11/gps/angtype iso

/gate/source/posiC11/visualize red

/gate/source/list

#=====================================================
# D A T A O U T P U T
#=====================================================

# global stat
/gate/actor/addActor SimulationStatisticActor stat
/gate/actor/stat/save output/stats1.txt

/gate/output/root/enable
/gate/output/root/setFileName output/output1
/gate/output/root/setRootHitFlag 1
/gate/output/root/setRootSinglesFlag 1
/gate/output/root/setRootCoincidencesFlag 1

#====================================================
# R A N D O M E N G I N E A N D S E E D
#====================================================
# JamesRandom Ranlux64 MersenneTwister
/gate/random/setEngineName MersenneTwister
#/gate/random/setEngineSeed default
#/gate/random/setEngineSeed auto
/gate/random/setEngineSeed 123456789
#/gate/random/setEngineSeed default
#/gate/random/resetEngineFrom fileName
#/gate/random/verbose 1

#=====================================================
# M E A S U R E M E N T S E T T I N G S
#=====================================================

/gate/application/setTimeSlice 20 s
/gate/application/setTimeStart 0 s
/gate/application/setTimeStop 20 s
/gate/application/startDAQ
Loading