[Gate-users] visualization of a volume for second time

Marc Chamberland MarcChamberland at cmail.carleton.ca
Wed Aug 15 13:38:28 CEST 2012


Hi!

It depends how you're running your macro. If you're simply doing:

>Gate your_macro.mac

from the command line, then yes, it is weird that you get an extra crystal when you run it a second time (assuming that you quit Gate in between runs).

If instead you launch Gate, then run the macro from within Gate:

Idle> /control/execute your_macro.mac

then it is normal. Gate will not delete the previous volume that you created in your macro. And it's a good thing! This allows you to setup full simulations by running several macros in a row, each adding a different component to your simulation.

I hope this helps!
Marc



__________________________

Marc Chamberland, MSc
PhD candidate
Department of Physics
Carleton University
Ottawa (ON)

Le 2012-08-15 à 3:01 AM, open researcher <openresearcher90 at gmail.com<mailto:openresearcher90 at gmail.com>>
 a écrit :

Hi gate users,
I have written a macro file for defining a NaI crystal. According to the
commands in the macro i should see only two volumes (world and crystal). I
am seeing two volumes only when i run the macro for the first time, when i
run it for the second time or more i am seeing a third volume (a small gray
color box at the center) and getting an error  --
Warning: the selected insertion name ('crystal') was already in use.
Name 'crystal2' will be used instead.

is gate storing 'crystal' after running for the second time also (is it not
deleting the previous one)?

if i want to  simulate, should i have to run a macro only once ?

the macro is given below-

/vis/open OGLIX
/vis/viewer/set/viewpointThetaPhi 60 60
/vis/viewer/set/style surface
/vis/drawVolume
/tracking/storeTrajectory 1
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate

/gate/geometry/setMaterialDatabase GateMaterials.db

/gate/world/geometry/setXLength 80. cm
/gate/world/geometry/setYLength 80. cm
/gate/world/geometry/setZLength 20. cm

/gate/world/daughters/name crystal
/gate/world/daughters/insert box
/gate/crystal/geometry/setXLength 59.4 cm
/gate/crystal/geometry/setYLength 44.5 cm
/gate/crystal/geometry/setZLength 25.4 cm
/gate/crystal/setMaterial NaI
/gate/crystal/vis/setColor yellow
/gate/crystal/vis/forceWireframe
/vis/viewer/zoom 3
/gate/geometry/rebuild
_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org>
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users




More information about the Gate-users mailing list