next up previous
Next: Helpcomments, etc. Up: GSIM User's Guide Version Previous: Quick start

Customizing the run

 

There are 2 ways to customize the run: run-time customization uses the default executables; compile-time customization requires relinking your own version of gsim.

Run-time customization

 

Run-time customization will work for you if the standard geometry is acceptable, the built-in kinematics generators are acceptable or you can supply a BOS/FPACK or `Liz-format' input kinematics file, and all you want to do is turn on or off some physics processes, turn off some detectors, modify the B field strength, etc. Here you analyze the run using the BOS/FPACK output file.

See the appendix on kinematics generators for information on the built-in kinematics generators. All possible run-time customization options are listed in the gsim help file ($CLAS_DOC/gsim.hlp), or type: gsim_bat -help), and in the CERN Geant manual in section BASE040. See also the appendices on command line flags, environment variables, ffread flags, and switch usage.

Compile-time customization

  Compile-time customization is required if you want to modify the geometry, provide a custom kinematics generator, spy on the internal workings of GSIM, fill histograms during the simulation, etc. Linking your own personal copy of GSIM involves use of the CLAS code management system. For full details see CLAS-NOTE-95-007 by Dieter Cords.

See also the appendix on user routines for a list of routines than can be modified by the user.

Briefly (see CLAS-NOTE-95-007), after:

setup gnu
setup tcl
setup cernlib
(the above can be done in your own .cshrc file).
  1. Clone your own personal gsim tree:
    cloneGsim
    to create a new directory tree gsim/ in the current directory.

  2. If you wish, edit gsim/gsim_bat/hpf77.plt/imports.imp or gsim/gsim_int/hpf77.plt/imports.imp to modify compiler flags, change the default link library order, etc.

  3. In gsim/gsim.lib/s check out (unlocked!) and edit the guser_xxxx routines you want to modify, e.g.:
    co guser_book.F guser_hist.F
    ALL routines in this directory will be compiled and linked into the executable, so you may place additional source routines here.  

  4. If you wish, edit the default main programs gsim/gsim_bat/s/gsim_bat.F or gsim/gsim_int/s/gsim_int.F.

  5. In gsim/gsim_bat/hpf77.plt or gsim/gsim_int/hpf77.plt, type:
    make depends
    to generate an include file dependency list from the fortran source files in gsim.lib/s and gsim_bat/s or gsim_int/s (for make). This must be redone only when the list of include files used in the source files changes.

  6. Type:
    make RCS_UPD=yes full
    or
    make_upd full
    to compile and link with the production or test libraries, respectively. The executables are named gsim_bat and gsim_int.

  7. Run the executables as described in the Quick Start section.  

  8. Repeat steps 3 to 7 as required.

  9. Type:
    make clean
    to clean up all object files and core files, leaving only the executables.



next up previous
Next: Helpcomments, etc. Up: GSIM User's Guide Version Previous: Quick start



Elliott Wolin
Tue Apr 2 15:43:53 EST 1996