[Gate-users] No output file generated

Dmitry Hits dmitry.hits at phys.ethz.ch
Thu Feb 18 19:16:34 CET 2021


Dear Gate-users,

I am trying to figure out the minimum amount of lines I need to put in the macro file in order to generate a root file with 'hits' in it.

As far a I understand from the manual the macro I pasted below should work. I get no errors, but also no output.

Would you please let me know what I'm missing?

Cheers,

Dmitry

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

/gate/geometry/setMaterialDatabase data/GateMaterials.db

# World
/gate/world/geometry/setXLength 50 cm
/gate/world/geometry/setYLength 50 cm
/gate/world/geometry/setZLength 50 cm
/gate/world/setMaterial Air
#system
/gate/world/daughters/name              scanner
/gate/world/daughters/insert            box
/gate/scanner/geometry/setXLength      20 cm
/gate/scanner/geometry/setYLength      3 cm
/gate/scanner/geometry/setZLength      20 cm
/gate/scanner/placement/setTranslation 0.0 0.0 0.0 cm
/gate/scanner/setMaterial Air
/gate/scanner/vis/setVisible 1
/gate/scanner/vis/setColor cyan

#sensor
/gate/scanner/daughters/name sensor1
/gate/scanner/daughters/insert box
/gate/sensor1/geometry/setXLength      20 cm
/gate/sensor1/geometry/setYLength      1 cm
/gate/sensor1/geometry/setZLength      20 cm
/gate/sensor1/setMaterial Silicon
/gate/sensor1/placement/setTranslation 0.0 0.0 0.0 cm
/gate/sensor1/vis/setVisible 1
/gate/sensor1/vis/setColor yellow
/gate/systems/scanner/level1/attach sensor1
/gate/sensor1/attachCrystalSD
#=====================================================
# PHYSICS
#=====================================================

/gate/physics/addPhysicsList QGSP_BERT_EMV
/gate/physics/Gamma/SetCutInRegion      world 1 mm
/gate/physics/Electron/SetCutInRegion   world 1 mm
/gate/physics/Positron/SetCutInRegion   world 1 mm
/gate/physics/Gamma/SetCutInRegion      scanner 0.1 mm
/gate/physics/Electron/SetCutInRegion   scanner 0.1 mm
/gate/physics/Positron/SetCutInRegion   scanner 0.1 mm
/gate/physics/addProcess HadronIonisation proton
#==================================================
# OUTPUT
#==================================================
/gate/output/root/enable
/gate/output/root/setFileName TrackerHits
/gate/output/root/setRootHitFlag                  1
#/gate/output/tree/addFileName TrackerHits.root
#/gate/output/tree/hits/enable
#=====================================================
# INITIALISATION
#=====================================================

/gate/run/initialize

#=====================================================
# BEAMS
#=====================================================
/gate/source/addSource PBS PencilBeam
/gate/source/PBS/setParticleType proton
/gate/source/PBS/setEnergy 250.0 MeV
/gate/source/PBS/setSigmaEnergy 1.0 MeV
/gate/source/PBS/setPosition 0 250 0 mm
/gate/source/PBS/setSigmaX 2 mm
/gate/source/PBS/setSigmaY 2 mm
/gate/source/PBS/setSigmaTheta 3 mrad
/gate/source/PBS/setSigmaPhi 3 mrad
/gate/source/PBS/setEllipseXThetaEmittance 15 mm*mrad
/gate/source/PBS/setEllipseYPhiEmittance 15 mm*mrad
/gate/source/PBS/setRotationAxis 1 0 0
/gate/source/PBS/setRotationAngle 90 deg
/gate/application/setTotalNumberOfPrimaries 100

#=====================================================
# VISUALISATION
#=====================================================

/control/execute mac/visu.mac

#=====================================================
# START BEAMS
#=====================================================

/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed 123456


/gate/application/noGlobalOutput
#/gate/application/setTotalNumberOfPrimaries 200
/gate/application/start
exit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20210218/f85c9f77/attachment.html>


More information about the Gate-users mailing list