STAR  Computing  Simulation  
Starsim
  Maintenance

Testing and Performance of starsim

We want to compare results and performace of the starsim application to the staf. In addition, we have both gcc and icc compilers availble when building starsim, so we have to compare those versions of the executable as well.

1.Performance Comparison

Tests were done with the STAR geometry y2004, current as of March 4, 2004. The columns in the following tables are marked with "opt" (optimized version) and "noopt" (not optimized version). Note that staf was linked to the not-optimized version of the Geant libraries, for historical reasons.

Description staf (opt)starsim gcc (noopt)starsim icc (noopt)starsim gcc (opt)starsim icc (opt)
A single muon event (based on 1k sample) 0.1220.1320.1240.1160.096
Single AuAu200 event (averaged over 2 events) 442492536440362

We observe that the icc compiler may yield approximately 20% increase in performace with respect to the gcc.

2. Event by event comparison

a) Single muon hit test

In order to spot potential differences, we shot a particle (muon) through the y2004 geometry, using the old staf application, and the new executables compiled with icc (intel 80) and gcc 3.2 compilers. The random number seed was set to same value in all tests. The output was captured in files:

hits.icc.nodebug,hits.staf, hits.gcc.debug.

We observe that while gcc-compiled starsim produces results identical to icc, the old staf executable produces similar, yet slightly different results (a few extra hits in the calorimeter). This can be explained as a consequence of starsim being linked to the newer version of Geant 3.21 libraries, and also having incremental code changes in itself.

b) Omega decays

Comparing omega decays as simulated with gcc and icc based versions of starsim, we see slight difference in the actual simulated event content:

It is likely that the source of this is the round-off error quantization. Different compilers can prudce results that are slightly different, in the sixth or seventh decimal place, triggering different branches of logic.

Summary: the results coming from staf and the two versions of starsim are different when looked at on the event-by-event basis, necessitating a statistical comparison.

3. Statistical comparison (validation)

a) Gamma conversion study

We look at the rate of gamma conversion in the fixed geometry (y2003b) and also at the momentum conservation in such process. The photons were created using the command:
gkine 1 1 0.1 3 -2 2.

The plots produced look like this:

and represent the difference between the momentum of the gamma and the total momentum of the e+e- pair created in a conversion. The plots are available here:

starsim/gcc px py pz
starsim/icc px py pz
staf/gcc px py pz

Summary: the results coming from staf and the two versions of starsim are in fact compatible, demostrating same conversion rate and numerical characteristics of the momenta of the e+e- pairs.

b) Lambda decays

This allows to check the branching ratio as well as spectra. The lambdas were created using the command:
gkine 1 18 0.1 1 -2 2.

Here's an example of the resulting pt distribution for neutrons:

And for the complete set of plots:
starsim/gcc neutron pt neutron pz proton pt proton pz pi0 pt pi0 pz pi- pt pi- pz
starsim/icc neutron pt neutron pz proton pt proton pz pi0 pt pi0 pz pi- pt pi- pz
staf/gcc: neutron pt neutron pz proton pt proton pz pi0 pt pi0 pz pi- pt pi- pz

Summary: the results coming from staf and the two versions of starsim are compatible, demostrating the same (correct) branching ratios and numerical characteristics of the momenta of the decays products.

c) Barrel EMC response

We would like to check the response of the barrel calorimeter, as a useful regerssion test. The electrons were created using the command:
gkine 1 3 1 1 0.1 0.2.

Here's an example of the resulting Barrel EMC signal distribution:

Comparison of the spectra claculated with staf and starsim reveals that the results are virtually same.


Last updated by Maxim Potekhin on 11/05/2004