STAR   Computing  
STAR Software Design Basics - tutorial given 3 Dec 99
  Maintained by K. Turner

Basic Offline Software Design, Layout and Information

The offline software consists of code to do the following:

  1. event generators (for simulating physics events)
  2. geant detector simulation for STAR ( == gstar)
  3. simulation of signals in the detector
  4. read in raw data events and unpack and reformat if needed (use instead of #1-3 above)
  5. databases to store any values needed
  6. reconstruction for each detector: hit/cluster finding, tracking, etc.
  7. global reconstruction of the events: tracking using all detectors, event vertex finding, refitting tracks using vertex, 2ndary vertex finding, dE/dX measurement, etc.
  8. calculation of physics quantities such as identified particle finding, efficiencies, physics analysis etc.
  9. writing of DSTs (Data Summary Tapes)
  10. read DSTs and do physics analyses

The framework that the offline software framework runs in is ROOT. A ton of info about ROOT and its use in STAR can be found from STAR -> computing -> Root in STAR (smack dab in middle of page) and also on Tutorials pages.

Although all new code is to be written in C++, we have a lot of fortran and C legacy code.

Some of the different pieces of software to do specific tasks are called packages or pams (Physics Analysis Module) and are in C or fortran. Others are C++ classes.

Code that isn't C++ must be "wrapped" so it can be used in ROOT. We do this by having "Maker" classes which call the "packages". Maker classes can also just do the software task themselves, without calling packages (if it's all in C++).

Please review the STAR coding standards at STAR -> computing -> standards (middle of page, right side)

Please read the Basic Documentation requirements for code that you write (!!) which is given at STAR -> computing -> ROOT in STAR -> STAR Documentation (near top)

All the code is organized into different "release" versions which are labelled DEV (development), NEW, PRO (production) and OLD. You can find out the release status from STAR -> computing -> Releases and the release policy by clicking on "release organization and policy" under the Releases page.

The code management system we use is CVS. This is a library where you check in and out versions of code. You can get info about the CVS system from STAR -> computing -> Tutorials -> Using CVS in STAR (near top). You can look up versions of software that's in CVS by using the CVS browser at top of Computing page (CVS: offline,online,recent,user)

When you specify a particular version of the software (e.g. PRO is set by typing starpro at linux prompt) and then cd $STAR, you get put in the PRO directory of the code: /afs/rhic/star/packages/SL99f (as of 1/3/00). All other code hangs under this main directory.

The codes exist under the main directory (see above) in two basic places:

  1. StRoot - all C++ classes that run in ROOT
  2. pams - all fortran/C code - will be called from a "Maker" class to be used in ROOT

To browse the directories of code, use the Software Guide - from top of Computing page.

To run something in ROOT, you give commands in a "macro" (which is analagous to a kumac in PAW)