<HTML><BODY>Hello! I want to simulate proton therapy. I found materials about CATANA facility. I think that I wrote all the necessary blocks in macros. One from my aims is to determine dose distribution in water phantom with box form. I use Dose Actor. Visualisation is not bad but there is no dose in phantom. I don't understand why it doesn't work. Please give me an advice how to solve this problem. There is a text of macro file below. Thanks in advance!<br><br>It is a main macros.<br><p># Proton therapy, Italian facility CATANA (beginning of work 2002) for treating of ocular tumours, pencil beam geometry</p><p>#=====================================================<br># VISUALISATION<br>#=====================================================</p><p>/vis/open OGLSX<br>/vis/viewer/zoom 2<br>/vis/viewer/set/viewpointThetaPhi 40 70<br>/vis/viewer/set/style volume<br>/vis/drawVolume<br>/vis/ogl/set/displayListLimit 5000000<br>/tracking/storeTrajectory 1<br>/vis/scene/add/trajectories <br>/vis/scene/endOfEventAction accumulate<br>/vis/viewer/update</p><p>#=====================================================<br># GEOMETRY<br>#=====================================================</p><p>/gate/geometry/setMaterialDatabase GateMaterials.db</p><p># World</p><p>/gate/world/geometry/setXLength 7 m<br>/gate/world/geometry/setYLength 7 m<br>/gate/world/geometry/setZLength 7 m<br>/gate/world/setMaterial Air</p><p># First box</p><p>/gate/world/daughters/name First_box<br>/gate/world/daughters/insert box<br>/gate/First_box/geometry/setXLength 6 cm<br>/gate/First_box/geometry/setYLength 6 cm<br>/gate/First_box/geometry/setZLength 10 cm<br>/gate/First_box/placement/setTranslation 0.0 0.0 -3.0 m<br>/gate/First_box/setMaterial Vacuum<br>/gate/First_box/vis/setVisible 1<br>/gate/First_box/vis/setColor white<br>/gate/First_box/vis/forceWireframe</p><p># Foil1</p><p>#/gate/First_box/daughters/name Foil1<br>#/gate/First_box/daughters/insert box<br>#/gate/Foil1/geometry/setXLength 5 cm<br>#/gate/Foil1/geometry/setYLength 5 cm<br>#/gate/Foil1/geometry/setZLength 15 um<br>#/gate/Foil1/placement/setTranslation 0.0 0.0 -3.04 m<br>#/gate/Foil1/setMaterial Tantalum<br>#/gate/Foil1/vis/setVisible 1<br>#/gate/Foil1/vis/setColor cyan<br>#/gate/Foil1/vis/forceWireframe</p><p># Kapton window</p><p>/gate/First_box/daughters/name Kapton_window<br>/gate/First_box/daughters/insert box<br>/gate/Kapton_window/geometry/setXLength 5 cm<br>/gate/Kapton_window/geometry/setYLength 5 cm<br>/gate/Kapton_window/geometry/setZLength 50 um<br>/gate/Kapton_window/placement/setTranslation 0.0 0.0 -2.96 m<br>/gate/Kapton_window/setMaterial Plexiglass<br>/gate/Kapton_window/vis/setVisible 1<br>/gate/Kapton_window/vis/setColor magenta<br>/gate/Kapton_window/vis/forceWireframe</p><p># Foil2</p><p>/gate/world/daughters/name Foil2<br>/gate/world/daughters/insert box<br>/gate/Foil2/geometry/setXLength 8 cm<br>/gate/Foil2/geometry/setYLength 8 cm<br>/gate/Foil2/geometry/setZLength 25 um<br>/gate/Foil2/placement/setTranslation 0.0 0.0 -2.5 m<br>/gate/Foil2/setMaterial Tantalum<br>/gate/Foil2/vis/setVisible 1<br>/gate/Foil2/vis/setColor cyan<br>/gate/Foil2/vis/forceWireframe</p><p># Brass stopper</p><p>/gate/Foil2/daughters/name Brass_stopper<br>/gate/Foil2/daughters/insert cylinder<br>/gate/Brass_stopper/geometry/setRmin 0 mm<br>/gate/Brass_stopper/geometry/setRmax 4 mm<br>/gate/Brass_stopper/geometry/setHeight 25 um<br>/gate/Brass_stopper/geometry/setPhiStart 0 deg<br>/gate/Brass_stopper/geometry/setDeltaPhi 360 deg<br>/gate/Brass_stopper/setMaterial Copper<br>/gate/Brass_stopper/vis/setVisible 1<br>/gate/Brass_stopper/vis/setColor gray<br>/gate/Brass_stopper/vis/forceWireframe</p><p># Range shifter 1</p><p>/gate/world/daughters/name Range_shifter_1<br>/gate/world/daughters/insert box<br>/gate/Range_shifter_1/geometry/setXLength 17 cm<br>/gate/Range_shifter_1/geometry/setYLength 17 cm<br>/gate/Range_shifter_1/geometry/setZLength 0.5 cm<br>/gate/Range_shifter_1/placement/setTranslation 0 0 -2.3 m<br>/gate/Range_shifter_1/setMaterial PMMA<br>/gate/Range_shifter_1/vis/setVisible 1<br>/gate/Range_shifter_1/vis/setColor blue<br>/gate/Range_shifter_1/vis/forceWireframe</p><p># Range modulator</p><p>/gate/world/daughters/name Range_modulator<br>/gate/world/daughters/insert box # it has to be a circle!<br>/gate/Range_modulator/geometry/setXLength 7 cm<br>/gate/Range_modulator/geometry/setYLength 7 cm<br>/gate/Range_modulator/geometry/setZLength 1 mm<br>/gate/Range_modulator/placement/setTranslation 0 0 -1.4 m<br>/gate/Range_modulator/setMaterial PMMA<br>/gate/Range_modulator/vis/setVisible 1<br>/gate/Range_modulator/vis/setColor red<br>/gate/Range_modulator/vis/forceWireframe</p><p># Range shifter 2</p><p>/gate/world/daughters/name Range_shifter_2<br>/gate/world/daughters/insert box<br>/gate/Range_shifter_2/geometry/setXLength 17 cm<br>/gate/Range_shifter_2/geometry/setYLength 17 cm<br>/gate/Range_shifter_2/geometry/setZLength 0.5 cm<br>/gate/Range_shifter_2/placement/setTranslation 0 0 -1 m<br>/gate/Range_shifter_2/setMaterial PMMA<br>/gate/Range_shifter_2/vis/setVisible 1<br>/gate/Range_shifter_2/vis/setColor blue<br>/gate/Range_shifter_2/vis/forceWireframe</p><p># Monitor ionisation chamber 1</p><p>/gate/world/daughters/name Chamber_1<br>/gate/world/daughters/insert box<br>/gate/Chamber_1/geometry/setXLength 8 cm<br>/gate/Chamber_1/geometry/setYLength 8 cm<br>/gate/Chamber_1/geometry/setZLength 1 cm<br>/gate/Chamber_1/placement/setTranslation 0 0 +0.2 m<br>/gate/Chamber_1/setMaterial Air<br>/gate/Chamber_1/vis/setVisible 1<br>/gate/Chamber_1/vis/setColor magenta<br>/gate/Chamber_1/vis/forceWireframe</p><p># Monitor ionisation chamber 2</p><p>/gate/world/daughters/name Chamber_2<br>/gate/world/daughters/insert box<br>/gate/Chamber_2/geometry/setXLength 8 cm<br>/gate/Chamber_2/geometry/setYLength 8 cm<br>/gate/Chamber_2/geometry/setZLength 1 cm<br>/gate/Chamber_2/placement/setTranslation 0 0 +0.5 m<br>/gate/Chamber_2/setMaterial Air<br>/gate/Chamber_2/vis/setVisible 1<br>/gate/Chamber_2/vis/setColor magenta<br>/gate/Chamber_2/vis/forceWireframe</p><p># Monitor ionisation chamber 3</p><p>/gate/world/daughters/name Chamber_3<br>/gate/world/daughters/insert box<br>/gate/Chamber_3/geometry/setXLength 8 cm<br>/gate/Chamber_3/geometry/setYLength 8 cm<br>/gate/Chamber_3/geometry/setZLength 1 cm<br>/gate/Chamber_3/placement/setTranslation 0 0 +0.8 m<br>/gate/Chamber_3/setMaterial Air<br>/gate/Chamber_3/vis/setVisible 1<br>/gate/Chamber_3/vis/setColor magenta<br>/gate/Chamber_3/vis/forceWireframe</p><p># Glass</p><p>/gate/world/daughters/name Glass_slab<br>/gate/world/daughters/insert box<br>/gate/Glass_slab/geometry/setXLength 17 cm<br>/gate/Glass_slab/geometry/setYLength 17 cm<br>/gate/Glass_slab/geometry/setZLength 5 cm<br>/gate/Glass_slab/placement/setTranslation 0 0 +2 m<br>/gate/Glass_slab/setMaterial Glass<br>/gate/Glass_slab/vis/setVisible 1<br>/gate/Glass_slab/vis/setColor gray<br>/gate/Glass_slab/vis/forceWireframe</p><p># The beginning of final collimator</p><p>/gate/world/daughters/name Begin_final_collim<br>/gate/world/daughters/insert cylinder<br>/gate/Begin_final_collim/geometry/setRmin 60 mm #25<br>/gate/Begin_final_collim/geometry/setRmax 65 mm #30<br>/gate/Begin_final_collim/geometry/setHeight 5 cm<br>/gate/Begin_final_collim/geometry/setPhiStart 0 deg<br>/gate/Begin_final_collim/geometry/setDeltaPhi 360 deg<br>/gate/Begin_final_collim/placement/setTranslation 0 0 +1.925 m<br>/gate/Begin_final_collim/setMaterial Copper<br>/gate/Begin_final_collim/vis/setVisible 1<br>/gate/Begin_final_collim/vis/setColor yellow<br>/gate/Begin_final_collim/vis/forceWireframe</p><p># The part of final collimator in glass_slab</p><p>/gate/Glass_slab/daughters/name Collim_in_glass<br>/gate/Glass_slab/daughters/insert cylinder<br>/gate/Collim_in_glass/geometry/setRmin 60 mm<br>/gate/Collim_in_glass/geometry/setRmax 65 mm<br>/gate/Collim_in_glass/geometry/setHeight 5 cm<br>/gate/Collim_in_glass/geometry/setPhiStart 0 deg<br>/gate/Collim_in_glass/geometry/setDeltaPhi 360 deg<br>/gate/Collim_in_glass/setMaterial Copper<br>/gate/Collim_in_glass/vis/setVisible 1<br>/gate/Collim_in_glass/vis/setColor yellow<br>/gate/Collim_in_glass/vis/forceWireframe</p><p># The end of final collimator</p><p>/gate/world/daughters/name End_final_collim<br>/gate/world/daughters/insert cylinder<br>/gate/End_final_collim/geometry/setRmin 60 mm<br>/gate/End_final_collim/geometry/setRmax 65 mm<br>/gate/End_final_collim/geometry/setHeight 27 cm<br>/gate/End_final_collim/geometry/setPhiStart 0 deg<br>/gate/End_final_collim/geometry/setDeltaPhi 360 deg<br>/gate/End_final_collim/placement/setTranslation 0 0 +2.185 m<br>/gate/End_final_collim/setMaterial Copper<br>/gate/End_final_collim/vis/setVisible 1<br>/gate/End_final_collim/vis/setColor yellow<br>/gate/End_final_collim/vis/forceWireframe</p><p># Phantom</p><p>/gate/world/daughters/name Phantom<br>/gate/world/daughters/insert box<br>/gate/Phantom/geometry/setXLength 60 cm<br>/gate/Phantom/geometry/setYLength 60 cm<br>/gate/Phantom/geometry/setZLength 50 cm<br>/gate/Phantom/placement/setTranslation 0 0 +2.5 m<br>/gate/Phantom/setMaterial Water<br>/gate/Phantom/vis/setVisible 1<br>/gate/Phantom/vis/setColor green<br>/gate/Phantom/vis/forceWireframe</p><p>#=====================================================<br># PHYSICS<br>#=====================================================</p><p>/gate/geometry/setIonisationPotential Water 75 eV<br>/gate/geometry/setIonisationPotential Air 85.7 eV<br>/gate/geometry/setIonisationPotential PMMA 74 eV</p><p>/control/execute physicslist_EM_std.mac<br>/control/execute physicslist_HAD_std.mac</p><p>/gate/physics/Gamma/SetCutInRegion world 1 mm<br>/gate/physics/Electron/SetCutInRegion world 1 mm<br>/gate/physics/Positron/SetCutInRegion world 1 mm</p><p>/gate/physics/Gamma/SetCutInRegion Phantom 0.1 mm<br>/gate/physics/Electron/SetCutInRegion Phantom 0.1 mm<br>/gate/physics/Positron/SetCutInRegion Phantom 0.1 mm</p><p>/gate/physics/SetMaxStepSizeInRegion world 1 mm<br>/gate/physics/SetMaxStepSizeInRegion Phantom 0.1 mm<br>/gate/physics/ActivateStepLimiter proton</p><p>/gate/physics/displayCuts<br>/gate/physics/print physics.txt</p><p>#=====================================================<br># DETECTORS<br>#=====================================================</p><p>/gate/actor/addActor DoseActor doseDistribution<br>/gate/actor/doseDistribution/save IDD-proton.txt<br>/gate/actor/doseDistribution/attachTo Phantom<br>/gate/actor/doseDistribution/stepHitType random<br>/gate/actor/doseDistribution/setPosition 0 0 +2.262 m<br>#/gate/actor/doseDistribution/setResolution 1 1 400 <br>#/gate/actor/doseDistribution/setSize 10 10 10 cm<br>/gate/actor/doseDistribution/setVoxelSize 2 2 2 mm<br>/gate/actor/doseDistribution/saveEveryNSeconds 60<br>/gate/actor/doseDistribution/enableEdep false<br>/gate/actor/doseDistribution/enableUncertaintyEdep false<br>/gate/actor/doseDistribution/enableDose true<br>/gate/actor/doseDistribution/enableUncertaintyDose false<br>/gate/actor/doseDistribution/enableNumberOfHits false</p><p>/gate/actor/addActor SimulationStatisticActor stat<br>/gate/actor/stat/save stat-proton.txt<br>/gate/actor/stat/saveEveryNSeconds 60</p><p>#=====================================================<br># INITIALISATION<br>#=====================================================</p><p>/gate/run/initialize</p><p>#=====================================================<br># BEAMS<br>#=====================================================</p><p>/control/execute sourcePBS.mac</p><p>#=====================================================<br># START BEAMS<br>#=====================================================</p><p>/gate/random/setEngineName MersenneTwister<br>/gate/random/setEngineSeed auto<br>/gate/application/setTotalNumberOfPrimaries 50<br>/gate/application/start</p>It is a macros with description of source.<br><p># SOURCE PBS<br>/gate/source/addSource PBS PencilBeam</p><p>#activity<br>/gate/source/PBS/setActivity 1000000. becquerel</p><p>#particle type<br>/gate/source/PBS/setParticleType proton</p><p>#energy spectrum<br>/gate/source/PBS/setEnergy 62 MeV<br>/gate/source/PBS/setSigmaEnergy 0.4 MeV</p><p>#position<br>/gate/source/PBS/setPosition 0 0 -3.2 m</p><p># spot size<br>/gate/source/PBS/setSigmaX 4 mm<br>/gate/source/PBS/setSigmaY 4 mm</p><p>#divergence<br>/gate/source/PBS/setSigmaTheta 3 mrad<br>/gate/source/PBS/setSigmaPhi 3 mrad</p><p>#emittance<br>/gate/source/PBS/setEllipseXThetaEmittance 30 mm*mrad<br>/gate/source/PBS/setEllipseYPhiEmittance 30 mm*mrad</p><p>#positive-> converging beam; negative diverging beam<br>/gate/source/PBS/setEllipseXThetaRotationNorm negative<br>/gate/source/PBS/setEllipseYPhiRotationNorm negative</p><p>#beam direction rotation<br>#/gate/source/PBS/setRotationAxis 0 0 1<br>#/gate/source/PBS/setRotationAngle 180 deg</p><br><br><br>-- <br>Best regards, Leonid</BODY></HTML>