Event Generator Framework for starsim and starvmc

Abstract: The accurate simulation of pp and heavy ion collisions at STAR requires the use of validated, well tuned event generators. As we begin to transition from starsim to starvmc, it is important to develop a framework in which we can validate event generators in the existing Monte Carlo application so that we have confidence in them when we begin testing the physics in the future VMC application.
 
The interface between starsim and its "standard" event generators (Pythia, Herwig, Hijing, etc...) is through the HEPEVT standard common block [1].  The common block is defined as follows:
 
The HEPEVT specification communicates everything the Monte Carlo needs to know about the event. Which event, how many particles where generated, the kinematics and inheritance (mother/daughter decay relationships) of each particle, and whether the particle is a stable, final state particle suitable for tracking, or an intermediate particle which is only used in the MC event record.  In the Virtual Monte Carlo approach, a different route is to be taken.  The VMC utilizes a "particle stack" to communicate between the event generator and the concrete MC implementation.  The "stack" is a class whose base class is the TVirtualMCStack.  The stack is responsible for providing TParticles to the concrete MC implementation.  
 
To facilitate the transition from starsim to starvmc, we propose the implemetation of a StarHepevtStack.  This class will provide (1) storage of particles in the  /HEPEVT/ common block used in starsim, (2) storage of particles as a stack of TParticles as used in the VMC application, (3) a user-access method to add tracks to the particle stack, and (4) methods to Import particles into the TParticle stack from the HEPEVT common block, and to Export particles from the TParticle stack into the HEPEVT common block.  Thus, the StarHepevtStack class can serve as a bridge between event generators which currently work with starsim, and their eventual deployment within the starvmc framework.
 
Figure 1 -- Schematic representation of the StarHepevtStack interface.  Event generators such as pythia 6.4.22, hijing, etc... can make their events available to the concrete MC's through the HEPEVT common block.  The StarHepevtStack provides an intermediate layer which can import events into the array of TParticles stored in the class.  Then, the concrete Monte Carlo can make use of either storage area.
 

 

Validation Test of Pythia 6.4.22 in "USER" mode

As a test of this scheme, we setup pythia 6.4.22  to use the "user" path designated in figure 1.  Events are generated by the pythia 6.4.22 event generator.  While pythia can export its events directly to the HEPEVT common block, we did not require it to do so for this test.  Instead, we looped over all events in the pythia event record and used the PushTrack(...) method in the particle stack.  The PushTrack() method creates a TParticle and adds it to the clones array on every call.  Thus, at the end of the event generation the StarHepevtStack had a full list of TParticles which were generated by pythia.  In order to utilize these in starsim, we used the Export() method defined on the particle stack.  StarHepevtStack::Export() loops over all particles in the array of particles and writes an entry in the HEPEVT common block.  These events were then histogrammed in starsim.

 

Figure 2 -- A comparison between the old and new interface between starsim and the event generator.  A simple mortran code was written to fill hbook histograms with statistics from each event.  These included (h100) the number of tracks in the event record, (h101) the number of final state tracks which the MC will transport, (h102) the PID of each of the final state tracks.  It also accumulated (h200) the PT and (h201) ETA distributions of the final state tracks.  In the figure, the "old" interface corresponds to the standard method of interfacing pythia and starsim which we have used for many years.  The "new" interface implements a StarVmcGenerator class which links the starsim application to the pythia generator, and the pythia generator to the StarHepevtStack.  10k events were run with identical random number seeds.  The "prob" is the result of the Kolmogorov test of compatability between the two histograms.  In this case, the histograms are identical, indicating that starsim will see the same event using either interface.

 

Plug-n-Play Framework

1. Implement a StarVmcGenerator class which provides the interface between the concrete MC and the event generator.

2. On the starsim side, create a generic interface to these generators using KUIP:

starsim> vmcplugin/generator/use StarPythia6Generator

will call a vmc_plugin_action routine, which looks something like:

StarVmcGenerator *_gener = 0;
extern "C" {

    void use_gener_( Char_t *name ) {

        _gener = TClass::GetClass(name)->New();

     }
}

Additional parameters to be defined using, e.g.
 
starsim> vmcplugin/generator/set MSEL=1
starsim> vmcplugin/generator/set CKIN(3)=5.0

 

References:

[1] http://home.fnal.gov/~mrenna/lutp0613man2/node49.html; T. Sjöstrand et al., in `Z physics at LEP 1', eds. G. Altarelli, R. Kleiss and C. Verzegnassi, CERN 89-08 (Geneva, 1989), Vol. 3, p. 143