[Gate-users] Error with the command "setMaterial NaI"

Elnur Sadihov forward1292 at gmail.com
Mon Sep 5 22:18:26 CEST 2016


Hello, Gate users!

I use virtual Gate. I am simulating CT system. I've written several
mac-files based on the example_CT. I am trying to run the main macro but an
error appears:

[G4]
[G4] *************************************************************
[G4]  Geant4 version Name: geant4-09-02-patch-03    (29-January-2010)
[G4]                       Copyright : Geant4 Collaboration
[G4]                       Reference : NIM A 506 (2003), 250-303
[G4]                             WWW : http://cern.ch/geant4
[G4] *************************************************************
[G4]
[Core-0] Initialization of geometry
[Core-0] Initialization of physics
[Core-0] Initialization of actors
[Core-0]
[Core-0]
**********************************************************************
[Core-0]  GATE version name: gate_v6.0_p01

[Core-0]                     Copyright : OpenGATE Collaboration

[Core-0]                     Reference : Phys. Med. Biol. 49 (2004)
4543-4561
[Core-0]                     WWW : http://www.opengatecollaboration.org/

[Core-0]
**********************************************************************
[Core-0]
[Core-0] Starting macro benchmarkCT.mac
[G4] Got standard cmap
[G4] Window name: viewer-0 (OpenGLStoredX)
[G4] /tracking/storeTrajectory 1
[G4] ABSLENGTH
[G4] MPV[0]: (1.84e-06, 50000)
[G4] MPV[1]: (4.08e-06, 50000)
[G4]  Done DumpVector of 2 entries
[G4] RINDEX
[G4] MPV[0]: (1.84e-06, 1.00028)
[G4] MPV[1]: (4.08e-06, 1.00028)
[G4]  Done DumpVector of 2 entries
[G4-cerr] ***** COMMAND NOT FOUND </gate/detector1/geometry/setMaterial
NaI> *****
[Gate] Sorry, error in a macro command : abort.

NaI is presented in GateMaterials.db. The file Materials.xml is in the
current directory where all macros are, and also in the parent gate
directory.

Are there any ideas on the solution of this problem? Thanks in advance!

Below I'm attaching the macro file scanner.mac which is responsible for
setting the geometry of the system, and also the main file bencmarkCT.mac:

*scanner.mac*

####################
# Gantry #
####################
/gate/world/daughters/name scanner
/gate/world/daughters/insert cylinder
/gate/scanner/placement/setTranslation 0. 0. 0. cm
/gate/scanner/geometry/setRmin 20. cm
/gate/scanner/geometry/setRmax 50. cm
/gate/scanner/geometry/setHeight 10. cm
/gate/scanner/geometry/setPhiStart 0. deg
/gate/scanner/geometry/setDeltaPhi 360. deg
/gate/scanner/setMaterial Air
/gate/scanner/vis/forceSolid
/gate/scanner/vis/setColor green

####################
# Whole detector system #
####################
/gate/scanner/daughters/name detector1
/gate/scanner/daughters/insert cylinder
/gate/detector1/geometry/setRmin 20. cm
/gate/detector1/geometry/setRmax 21. cm
/gate/detector1/geometry/setHeight 2. cm
/gate/detector1/geometry/setPhiStart 225. deg
/gate/detector1/geometry/setDeltaPhi 315. deg
/gate/detector1/geometry/setMaterial NaI
/gate/detector1/vis/forceWireframe
/gate/detector1/vis/setColor red

###################
# Detector module #
###################
/gate/detector1/daughters/name module1
/gate/detector1/daughters/insert box
/gate/module1/placement/setTranslation -14.142 -14.142 0. cm
/gate/module1/geometry/setXLength 1.57 cm
/gate/module1/geometry/setYLength 1. cm
/gate/module1/geometry/setZLength  2. cm
/gate/module1/setMaterial NaI
/gate/module1/vis/forceSolid
/gate/module1/vis/setColor red

# Repeat detector module
/gate/module1/repeaters/insert genericRepeater
/gate/module1/genericRepeater/setPlacementsFilename data/module1.placements
/gate/module1/genericRepeater/useRelativeTranslation 1

# ATTACH SYSTEM
/gate/systems/scanner/level1/attach detector1
/gate/systems/scanner/level2/attach module1

# ATTACH LAYER
/gate/module1/attachCrystalSD

*benchmarkCT.mac*

############################

# VISUALIZATION PARAMETERS #

############################

/control/execute visu.mac

#/vis/disable


#########################

# SET MATERIAL DATABASE #

#########################

#/gate/geometry/setMaterialDatabase ../../GateMaterials.db

/gate/geometry/setMaterialDatabase ./GateMaterials.db


#########

# WORLD #

#########

/gate/world/geometry/setXLength 300. cm

/gate/world/geometry/setYLength 300. cm

/gate/world/geometry/setZLength 300. cm

/gate/world/setMaterial Air


#######################################

# CT scanner #

#######################################

/control/execute scanner.mac


###################################

# phantom in translation (1 mm/s) : #

###################################

/control/execute phantom.mac

/gate/waterBox/moves/insert translation

/gate/waterBox/translation/setSpeed 0 0 -1 mm/s


###########

# PHYSICS #

###########

/control/execute physics.mac


#############

# DIGITIZER #

#############

/control/execute digitizer.mac


##############

# SOURCE GPS #

##############

/control/execute source.mac


##########

# OUTPUT #

##########

/control/execute output.mac


#############

# VERBOSITY #

#############

/control/execute verbose.mac


##################

# INITIALIZATION #

##################

/gate/run/initialize


###############

# ACQUISITION #

###############

/control/execute acquisition.mac

exit
-------------------------------------------------------------------------------------------------

Best regards,
Elnur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20160905/819f3f5e/attachment.html>


More information about the Gate-users mailing list