Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Vesna Cuplov committed Sep 17, 2012
1 parent 648af9e commit 4d5055c
Show file tree
Hide file tree
Showing 17 changed files with 196 additions and 108 deletions.
9 changes: 6 additions & 3 deletions benchmarks/benchPET/benchPET.mac
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@
/gate/random/verbose 1

# S T A R T
/gate/application/setTimeSlice 120. s
/gate/application/setTimeStart 0. s
/gate/application/setTimeStop 240. s
#/gate/application/setTimeSlice 120. s
#/gate/application/setTimeStart 0. s
#/gate/application/setTimeStop 240. s

/gate/application/setTimeSlice 1. s
/gate/application/setTimeStart 0. s
/gate/application/setTimeStop 1. s

/gate/application/startDAQ
14 changes: 7 additions & 7 deletions benchmarks/benchPET/physics.mac
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
/gate/physics/addProcess RayleighScattering
/gate/physics/processes/RayleighScattering/setModel LivermoreModel

/gate/physics/addProcess ElectronIonisation
/gate/physics/processes/ElectronIonisation/setModel StandardModel e-
/gate/physics/processes/ElectronIonisation/setModel StandardModel e+
#/gate/physics/addProcess ElectronIonisation
#/gate/physics/processes/ElectronIonisation/setModel StandardModel e-
#/gate/physics/processes/ElectronIonisation/setModel StandardModel e+

/gate/physics/addProcess Bremsstrahlung
/gate/physics/processes/Bremsstrahlung/setModel StandardModel e-
/gate/physics/processes/Bremsstrahlung/setModel StandardModel e+

/gate/physics/addProcess PositronAnnihilation
#/gate/physics/addProcess PositronAnnihilation

/gate/physics/addProcess MultipleScattering e+
/gate/physics/addProcess MultipleScattering e-
#/gate/physics/addProcess MultipleScattering e+
#/gate/physics/addProcess MultipleScattering e-

/gate/physics/addProcess RadioactiveDecay
#/gate/physics/addProcess RadioactiveDecay

/gate/physics/processList Enabled
/gate/physics/processList Initialized
Expand Down
2 changes: 1 addition & 1 deletion examples/example_OPTICAL/DrawBranches.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void DrawBranches() {

canvas->Print("validation_reference.ps[");

TFile *f = new TFile("./OpticalSimulation_Reference.root");
TFile *f = new TFile("./OpticalSimulation.root");
TTree *t = (TTree*)f->Get("EventData");

cout << t->GetEntries() << endl;
Expand Down
51 changes: 39 additions & 12 deletions examples/example_OPTICAL/Materials.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,29 +89,56 @@

<material name="Water">
<propertiestable>
<propertyvector name="ABSLENGTH" unit="m" energyunit="eV">
<!-- <propertyvector name="ABSLENGTH" unit="m" energyunit="eV">
<ve energy="1.0" value="50"/>
<ve energy="1.97" value="50"/>
<ve energy="2.34" value="50"/>
<ve energy="4.0" value="50"/>
</propertyvector>
</propertyvector>-->
<propertyvector name="RINDEX" energyunit="eV">
<ve energy="1.0" value="1.33"/>
<ve energy="1.97" value="1.33"/>
<ve energy="2.34" value="1.33"/>
<ve energy="4.0" value="1.33"/>
<ve energy="5.0" value="1.2"/>
<ve energy="6.0" value="1.2"/>
<ve energy="7.0" value="1.2"/>
</propertyvector>
<!-- For Rayleigh scattering testing purpose you can use these values for the Rayleigh scattering lengths -->
<propertyvector name="RAYLEIGH" unit="mm" energyunit="eV">
<ve energy="1.0" value="0.8"/>
<ve energy="1.97" value="0.8"/>
<ve energy="2.34" value="0.3"/>
<ve energy="4.0" value="0.4"/>
</propertyvector>
<!-- <propertyvector name="RAYLEIGH" unit="mm" energyunit="eV">
<ve energy="1.0" value="10.8"/>
<ve energy="1.97" value="10.8"/>
<ve energy="2.34" value="10.3"/>
<ve energy="4.0" value="10.4"/>
</propertyvector>-->
<!-- The *real* values: photon energy = [1eV, 1.97eV, 2.34eV, 4eV] ==> scattering lengths = [km, 900m, 500m, 70m] -->
<!-- If you do not provide any RAYLEIGH property vector for Water, Geant4 automatically calculates Water scattering
lengths using Einstein-Smoluchowski formula -->
<!-- </propertiestable>-->
<!-- <property name="MIEHG_FORWARD" value="0.6" />
<property name="MIEHG_BACKWARD" value="0.6" />
<property name="MIEHG_FORWARD_RATIO" value="1.0" />
<propertyvector name="MIEHG" unit="mm" energyunit="eV">
<ve energy="5.0" value="5.3"/>
<ve energy="6.0" value="6.2"/>
<ve energy="7.0" value="6.7"/>
</propertyvector>-->
</propertiestable>
</material>

<material name="Lung">
<propertiestable>
<propertyvector name="RINDEX" energyunit="eV">
<ve energy="5.0" value="1.4"/>
<ve energy="6.0" value="1.4"/>
<ve energy="7.0" value="1.4"/>
</propertyvector>
<property name="MIEHG_FORWARD" value="0.6" />
<property name="MIEHG_BACKWARD" value="0.6" />
<property name="MIEHG_FORWARD_RATIO" value="1.0" />
<propertyvector name="MIEHG" unit="mm" energyunit="eV">
<ve energy="5.0" value="2.3"/>
<ve energy="6.0" value="3.2"/>
<ve energy="7.0" value="4.7"/>
</propertyvector>
</propertiestable>
</material>

</materials>

58 changes: 27 additions & 31 deletions examples/example_OPTICAL/Optical_System.mac
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
# VISUALISATION and VERBOSE
#=====================================================

/vis/disable
#/control/execute ./macro/Visualisation.mac
#/vis/disable
/control/execute ./macro/Visualisation.mac
/control/execute ./macro/Verbose.mac

#=====================================================
Expand All @@ -43,9 +43,9 @@
# W O R L D
#=====================================================

/gate/world/geometry/setXLength 100. cm
/gate/world/geometry/setYLength 100. cm
/gate/world/geometry/setZLength 100. cm
/gate/world/geometry/setXLength 200. cm
/gate/world/geometry/setYLength 200. cm
/gate/world/geometry/setZLength 200. cm
/gate/world/setMaterial Air


Expand All @@ -68,16 +68,18 @@
#=======================================================

#/gate/OpticalSystem/moves/insert orbiting
#/gate/OpticalSystem/orbiting/setSpeed 20 deg/s
#/gate/OpticalSystem/orbiting/setPoint1 0 0 0 cm
#/gate/OpticalSystem/orbiting/setPoint2 0 1 0 cm
#/gate/OpticalSystem/orbiting/setSpeed 22.5 deg/s
#/gate/OpticalSystem/orbiting/setPoint1 0 1 0 cm
#/gate/OpticalSystem/orbiting/setPoint2 0 0 0 cm
#/gate/geometry/update

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

/control/execute ./macro/Phantom.mac

#/control/execute ./macro/Phantom.mac
#/control/execute ./macro/VoxelizedPhantom.mac
/control/execute ./macro/waterMousePhantom.mac

#=====================================================
# P H Y S I C S
Expand All @@ -96,8 +98,8 @@
# A C T O R
#=====================================================
# This actor will record information on your simulation:
/gate/actor/addActor SimulationStatisticActor stat
/gate/actor/stat/save OpticalSimulation_stat.txt
#/gate/actor/addActor SimulationStatisticActor stat
#/gate/actor/stat/save OpticalSimulation_stat.txt

#=====================================================
# INITIALISATION
Expand All @@ -108,41 +110,36 @@
#=====================================================
# D I G I T I Z E R: DETECTOR ELECTRONIC RESPONSE
#=====================================================
/gate/digitizer/name OpticalSingles
/gate/digitizer/insert singleChain

# If you want to apply an upper cut (usually it is the case for fluorescence experiments)
# This cut will be taken into account in the the ProjectionSet result.
/gate/digitizer/OpticalSingles/setInputName Singles
/gate/digitizer/OpticalSingles/insert upholder
# Fluorescent photons have an energy smaller than the excitation photon energy:
/gate/digitizer/OpticalSingles/upholder/setUphold 2.0 eV
# new

/gate/digitizer/OpticalSingles/insert opticaladder
/gate/digitizer/OpticalSingles/insert readout
/gate/digitizer/OpticalSingles/readout/setDepth 2

/gate/digitizer/Singles/insert opticaladder
/gate/digitizer/Singles/insert readout
# for pixels:
#/gate/digitizer/Singles/readout/setDepth 2
# for crystal:
/gate/digitizer/Singles/readout/setDepth 1

#=====================================================
# S O U R C E
#=====================================================

/control/execute ./macro/Source.mac
#/control/execute ./macro/Source.mac
/control/execute ./macro/VoxelizedSource.mac

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

/gate/output/root/enable
/gate/output/root/setFileName OpticalSimulation
/gate/output/root/setRootHitFlag 0
/gate/output/root/setRootSinglesFlag 0
/gate/output/root/setRootOpticalFlag 1

/gate/output/analysis/enable
/gate/output/fastanalysis/enable

/control/execute ./macro/Projection.mac


#=====================================================
# R A N D O M
#=====================================================
Expand All @@ -163,10 +160,9 @@
# A C Q U I S I T I O N

#/gate/application/noGlobalOutput

/control/execute ./macro/StartPrimaries.mac
#/control/execute ./macro/StartPrimaries.mac

# If using DAQ: setActivity is needed in the Source
#/control/execute ./macro/StartDAQ.mac
/control/execute ./macro/StartDAQ.mac


85 changes: 55 additions & 30 deletions examples/example_OPTICAL/macro/Geometry.mac
Original file line number Diff line number Diff line change
Expand Up @@ -20,66 +20,91 @@
/gate/world/daughters/name OpticalSystem
/gate/world/daughters/insert box

/gate/OpticalSystem/geometry/setXLength 10.5 cm
/gate/OpticalSystem/geometry/setYLength 10.5 cm
#/gate/OpticalSystem/geometry/setXLength 10.5 cm
#/gate/OpticalSystem/geometry/setYLength 10.5 cm
/gate/OpticalSystem/geometry/setXLength 20. cm
/gate/OpticalSystem/geometry/setYLength 40. cm
/gate/OpticalSystem/geometry/setZLength 2.0 cm
/gate/OpticalSystem/placement/setTranslation 0 0 0 cm
/gate/OpticalSystem/placement/setTranslation 0 0 3.0 cm
/gate/OpticalSystem/setMaterial Air

#/gate/OpticalSystem/repeaters/insert ring
#/gate/OpticalSystem/ring/setRepeatNumber 16
#/gate/OpticalSystem/ring/setPoint1 0. 1. 0. mm
#/gate/OpticalSystem/ring/setPoint2 0. 0. 0. mm

# === crystal: pixels and an additionnal volume behind the pixels ===
/gate/OpticalSystem/daughters/name crystal
/gate/OpticalSystem/daughters/insert box
/gate/crystal/geometry/setXLength 10.5 cm
/gate/crystal/geometry/setYLength 10.5 cm
/gate/crystal/geometry/setXLength 20. cm
/gate/crystal/geometry/setYLength 40. cm
/gate/crystal/geometry/setZLength 1.0 cm
/gate/crystal/placement/setTranslation 0 0 -0.5 cm
/gate/crystal/setMaterial Air
/gate/crystal/vis/forceWireframe 1
/gate/crystal/vis/setColor green
/gate/crystal/vis/forceSolid
/gate/crystal/attachCrystalSD
/gate/systems/OpticalSystem/crystal/attach crystal


# === pixels ===
/gate/crystal/daughters/name pixel
/gate/crystal/daughters/insert box
/gate/pixel/geometry/setXLength 2. cm
/gate/pixel/geometry/setYLength 2. cm
/gate/pixel/geometry/setZLength 1 cm
/gate/pixel/setMaterial Air
/gate/pixel/placement/setTranslation 0 0 0 cm
/gate/pixel/vis/setColor red
/gate/pixel/repeaters/insert cubicArray
/gate/pixel/cubicArray/setRepeatNumberX 5
/gate/pixel/cubicArray/setRepeatNumberY 5
/gate/pixel/cubicArray/setRepeatNumberZ 1
/gate/pixel/cubicArray/setRepeatVector 2.1 2.1 0 cm
/gate/pixel/vis/forceSolid
/gate/pixel/attachCrystalSD
/gate/systems/OpticalSystem/pixel/attach pixel
#/gate/crystal/daughters/name pixel
#/gate/crystal/daughters/insert box
#/gate/pixel/geometry/setXLength 2. cm
#/gate/pixel/geometry/setYLength 2. cm
#/gate/pixel/geometry/setXLength 0.105 cm
#/gate/pixel/geometry/setYLength 0.105 cm
#/gate/pixel/geometry/setZLength 1 cm
#/gate/pixel/setMaterial Air
#/gate/pixel/placement/setTranslation 0 0 0 cm
#/gate/pixel/vis/setColor red
#/gate/pixel/repeaters/insert cubicArray
#/gate/pixel/cubicArray/setRepeatNumberX 5
#/gate/pixel/cubicArray/setRepeatNumberY 5
#/gate/pixel/cubicArray/setRepeatNumberX 100
#/gate/pixel/cubicArray/setRepeatNumberY 100
#/gate/pixel/cubicArray/setRepeatNumberZ 1
#/gate/pixel/cubicArray/setRepeatVector 2.1 2.1 0 cm
#/gate/pixel/cubicArray/setRepeatVector 0.105 0.105 0 cm
#/gate/pixel/vis/forceSolid
#/gate/pixel/attachCrystalSD
#/gate/systems/OpticalSystem/pixel/attach pixel


# === additionnal volume behind pixels (ex: electronic board) ===
/gate/OpticalSystem/daughters/name Electronics
/gate/OpticalSystem/daughters/insert box
/gate/Electronics/geometry/setXLength 10.5 cm
/gate/Electronics/geometry/setYLength 10.5 cm
/gate/Electronics/geometry/setXLength 20. cm
/gate/Electronics/geometry/setYLength 40. cm
/gate/Electronics/geometry/setZLength 1.0 cm
/gate/Electronics/setMaterial Air
/gate/Electronics/placement/setTranslation 0 0 0.5 cm
/gate/Electronics/vis/setColor yellow
/gate/Electronics/vis/forceSolid




#===============================================================
# Optical photons Detection Surface should be DIELECTRIC-METAL
#===============================================================

/gate/pixel/surfaces/name Detection1
/gate/pixel/surfaces/insert Electronics
/gate/pixel/surfaces/Detection1/setSurface perfect_apd
#/gate/pixel/surfaces/name Detection1
#/gate/pixel/surfaces/insert Electronics
#/gate/pixel/surfaces/Detection1/setSurface perfect_apd

#/gate/Electronics/surfaces/name Detection2
#/gate/Electronics/surfaces/insert pixel
#/gate/Electronics/surfaces/Detection2/setSurface perfect_apd


/gate/crystal/surfaces/name Detection1
/gate/crystal/surfaces/insert Electronics
/gate/crystal/surfaces/Detection1/setSurface perfect_apd

/gate/Electronics/surfaces/name Detection2
/gate/Electronics/surfaces/insert pixel
/gate/Electronics/surfaces/insert crystal
/gate/Electronics/surfaces/Detection2/setSurface perfect_apd





2 changes: 1 addition & 1 deletion examples/example_OPTICAL/macro/Phantom.mac
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/gate/casper/geometry/setXLength 50.0 mm
/gate/casper/geometry/setYLength 50.0 mm
/gate/casper/geometry/setZLength 17.0 mm
/gate/casper/placement/setTranslation 0.0 0.0 -4.0 cm
/gate/casper/placement/setTranslation 0.0 0.0 -40.0 cm

## The phantom is made of a fluorescent material, named GFP:
/gate/casper/setMaterial GFP
Expand Down
11 changes: 4 additions & 7 deletions examples/example_OPTICAL/macro/Projection.mac
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@

/gate/output/projection/enable

# Only photons with Energy < 2eV (see the digitization details in main macro)
/gate/output/projection/setInputDataName OpticalSingles

/gate/output/projection/setFileName ./OpticalSimulationProjection

/gate/output/projection/pixelSizeX 0.105 cm
/gate/output/projection/pixelSizeY 0.105 cm
/gate/output/projection/pixelNumberX 100
/gate/output/projection/pixelNumberY 100
/gate/output/projection/pixelSizeX 0.02 cm
/gate/output/projection/pixelSizeY 0.04 cm
/gate/output/projection/pixelNumberX 1000
/gate/output/projection/pixelNumberY 1000

# GATE can not decide which sampling plane you want to use, as it depends
# on the orientation you have chosen when you built the head
Expand Down
Loading

0 comments on commit 4d5055c

Please sign in to comment.