Software and Computing : Understanding STAR Simulation frame work "starsim"

Starsim is the centerpiece of the STAR simulation software.

Starsim contains all of the functionality of PAW and as such interprets all 
the standard KUIP commands. Starsim also contains a heavily instrumented GEANT 3.21 library, allowing for a rich functionality to be quickly implemented in a simulation app.


How to log in to stasim interface?

On rcf type                             ->   starsim -w 1
                                                              

To turn the debug mode on    ->   debug on

Load the geometry and other settings  ->    detp geometry [some settings]    e.g. detp geometry y2012
                                                                 gexec $STAR_LIB/geometry.so  
                                                                 gclose all



Now you can do PYTHIA  or GSTAR simulation work on starsim interface.



Running PYTHIA on starsim interface



Run                         ->         stardev

Load Pythia Library ->          gexec $STAR_LIB/[PYTHIA]            ; [PYTHIA]  -> PYTHIA library you want to load  e.g. libPythia6_4_22
                                             gexec $STAR_LIB /bpythia.so 

Now you can run a kumac script to generate events or type commands on starsim specifying your needs to generate events.
Refer to this page to learn how to run write a kumac code:

http://drupal.star.bnl.gov/STAR/blog/devika/2013/jun/07/pythia-general-interpretation-a-kumac-code

 

Runing kumac code on starsim: (if you have all the commands to log in to starsim in the kumac code itself)

>> stardev
 >> starsim -w 0 -b filename.kumac "input values"




Running GSTAR on starsim

Once you load the geometry to starsim,
  • show subsystems by typing
    display detm
     
  • draw some detector subsystem
    draw TPCE
    or optionally define cuts
    dcut TPCE z 1 10 10
    (order: [volume] [axis] [cut] [horiz origin] [vert origin] [horiz scale] [vert scale]) the example above will give a view of the TPC along the z axis, with a cut at z=0, and put the origin at coordinate (10, 10) of the window.
    to draw everything:
    /geant/drawing/draw cave 70 30 30 10 10 0.02 0.02
    (order: [volume] [theta] [phi] [psi] [horiz origin] [vert origin] [horiz scale] [vert scale])
  • generate some particle tracks, type
    gkine 2 8 0.1 1 -1 1
    (the order is [# tracks] [particle type] [low pT] [hi pT] [lo rapidity] [hi rapidity])
    trigger event,
    trig
    finally, detect hits,
    dhits