Notes on Event Generator Frameworks

First crack at a prototype:

$ alias starsim++ root4star -b starsim.C
$ starsim++
...
root4star [2] command("gprint kine")

   Kine  Name        Type     Px         Py         Pz       Energy  Vorigin Vgener
      1  PION 0        7     1.0000     1.0000    14.0000    14.0719     1     2
      2  GAMMA         1     1.0000     1.0000    14.0000    14.0712     1
      3  GAMMA         1     1.0000     1.0000    14.0000    14.0712     1
      4  GAMMA         1     0.3059     0.3942     4.7618     4.7879     2
      5  GAMMA         1     0.6941     0.6058     9.2382     9.2840     2

The first 3 particles are the pi0, and two photons which I added to the stack.  They are associated with the primary vertex (vertex 1).  Lines 4 and 5 are inserted by geant which decays the pi0.

root4star [9] command("gprint hits fgtd")

 ====> HITS  IN DETECTOR ** FGZC ** OF SET ** FGTH ** <====

  HITS TRACK FGTD FGTQ      ZZ        YY        XX        PTOT      CX        CY        CZ        SLEN      TOF       STEP
                  ELOS  
     1     2    5    1    110.      8.04      8.91     2.289E-03 7.910E-02 0.790     0.597      2.22     3.716E-09 0.520  4.959E-07
     2     2    6    1    120.      9.14      14.9     6.866E-03-0.788     0.462     0.397      18.9     4.250E-09 0.790  2.205E-06

Hits are present in the FTG for some odd reason....

 

 Few lessons learned from prototyping:

(1) Use of GSVERT and GSKINE (or AGSVERT and AGSKINE) is preffered way to stack particles into geant... the /HEPEVT/ common block is hidden by libEG.so... so use of the /HEPEVT/ common for interface to starsim is problematic.

(2) It will be useful to cretate the  parent -> (vertex) -> daughter1 ... daughter N  relationships after the event record is finished.