GSIM - Event Generators


Introduction:

For GSIM to have anything to do at all it needs a set of input vectors that describe the particles to be traced through the CLAS detector. Enter the field of "event generators", which stretches from the trivial to "very complex physics model". Event generators are usually seperate programs that create an input file for GSIM. As such they are really a completely seperate package, and are thus not officially part of the GSIM distribution (note: that is indeed a disclaimer.)  However, they are essential so I may as well devote some space to them.
If you have an event generator that you would like to distribute and make compatible with GSIM, please contact me.

Some Event Generators:

The following list are the event generators that I am aware of and that work with GSIM. For more information click on the generator name.
 
Generator Location Contact Person Description
Celeg $CLAS_PACK/celeg John Price Physics: Baryon Resonances on Nucleon
Build-in GSIM internal CERN One particle per event - "on the fly"
Example Code: gsim_bos_io $CLAS_PACK/utilities/bosanal Maurik Holtrop Programming example.
 

Build in Generator:

I recommend that you do not put your own generator inside GSIM. Instead use the example code to create a stand alone generator.
The simplest method of generating some events is by using the "build in" event generator. This is done by setting the kine switch to 0 or 3.

Kine 0

Setting the swith to 1 will cause a call to the routine guser_kine. This routine can be modified by the user to contain his/her own physics. The default is a dummy generator that creates 4 random tracks (an e-, pi+.pi-,pi0) with momentum 0.8<p<4.0 GeV. It contains no physics and momentum is not conserved !

Kine 3

The kine 3 switch allows you to send your own particle though GSIM, one at a time.  The additional arguments are: geant_part_id, pmin, pmax, theta_min, theta_max, phi_min, phi_max.
The following little kumac macro uses this feature to scan electrons through the CLAS:
 

Example Generator:

An example generator to create a BOS file can be found in the code $CLAS_PACK/utilities/bosanal/gsim_bos_io.c. This tiny little program is an example how to create a BOS file using the c_bos_io library. It can be used as a "fill in the blanks" template for your own generator. It can also be used as is to read the contends of an existing GSIM input file or as a converter to convert an old format BOS file (with MCTK and MCVX banks) to a new format BOS file (with the PART bank.)To get the source code set up your clas environment and execute:
cvs checkout utilities/bosanal/gsim_bos_io.c utilities/bosanal/Makefile
to compile enter the utilities/bosanal directory that was just created and execute:
make gsim_bos_io
Help on using the program is given with gsim_bos_io -help.

For comments or questions: holtrop(at)jlab.org