- jwebb's home page
- Posts
- 2019
- 2018
- 2017
- 2016
- 2015
- 2014
- 2013
- November (1)
- October (1)
- September (1)
- July (1)
- June (1)
- April (1)
- March (3)
- February (1)
- January (1)
- 2012
- 2011
- December (2)
- September (3)
- August (5)
- July (6)
- June (6)
- May (1)
- April (5)
- March (5)
- February (2)
- January (2)
- 2010
- December (3)
- October (3)
- September (2)
- August (2)
- June (2)
- May (4)
- April (4)
- March (2)
- February (4)
- January (10)
- 2009
- 2008
- 2007
- 2006
- July (1)
- My blog
- Post new blog entry
- All blogs
Event Generator Framework for starsim and starvmc
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:
- jwebb's blog
- Login or register to post comments