The following are available:-
For example, let's suppose you want to generate positions randomly within a box. There is no built in generator to do this so you will need your own version of POS_USER and must modify it so that it takes the box dimensions from the MCPI bank. To do this you have to carry out the following steps:-
include SNO_INCDIR:monte.inc
include /usr/snoguest/snoman/2_07/code/monte.incAn easy way to globally change such hardwiring is to copy all the .for files into a temporary file, do a global replace, and then use EXTRACT to split the file apart again.
FORT/INCLUDE=U1:[WEST.SNOMAN.3_00.CODE] pos_user.forand UNIX:-
f77 -I../snoman/$SNO_SNOMAN_VER/code pos_user.for
The last solution is by far the best if the facility is available to you. Of the other schemes, none is ideal although 3 and 4 do allow you to move the code to a new directory without having to worry about the include files. They all require you to review their use when changing versions of SNOMAN. However this is no bad thing; the .inc files represent a large part of the interface between SNOMAN and the user code and this should be checked when changing versions.
subroutine pos_user( ipart,xyz ) * Pick position within a box. implicit none include 'monte.inc' integer ipart real xyz(3) real snoran xyz(1) = pos_param(ipart,1) + snoran(1)*pos_param(ipart,2) xyz(2) = pos_param(ipart,3) + snoran(1)*pos_param(ipart,4) xyz(3) = pos_param(ipart,5) + snoran(1)*pos_param(ipart,6) end
$SNO_TOOLS/link_snolib.scr "*.o"This will combine all the object files together with SNOlib and create the executable file my_snoman.exe. Note: on VMS you cannot wildcard object files. To link selected object files specify a space separated (VMS: comma separated) list of names. To define the output file supply it as the optional second parameter e.g.:-
(VMS: @SNO_TOOLS:LINK_SNOLIB pos_user)
$SNO_TOOLS/link_snolib.scr "a.o b.o" test.exelinks the object files a and b to make the executable file test.exe.
(VMS: @SNO_TOOLS:LINK_SNOLIB A.OBJ,B.OBJ TEST.EXE)
40 2. 1000000. 1. 2120000. 1. 0. 0. 0. 0. 0.to:-
60 1. 1. 10. 20. 100. 300. 0. 0. 0. 0.which, with the new version of POS_USER, creates points with X in the range 1. to 2., Y in the range 10. to 30. and Z in the range 100. to 400.