From PYTHIA to DSPACK

D0 experiment at Tevatron (F.N.A.L.)
Institut des Sciences Nucléaires de Grenoble (FRANCE)

Auguste BESSON, Yannick ARNOUD





Introduction and outlook
Pythia output file
Getting Susygen on d0mino
Copying your ascii file on d0mino
Run the executable


Introduction and outlook

You can easily produce a dspack file from a pythia ascii file :

Pythia output format

We'll suppose that you have run pythia to produce a given set of events, which are stored in the PYJETS common

For each event, the common HEPEVT has to be filled from the PYJETS common with the command call pyhepc(1).
Then you can write the common with the following code :

*.... HEPEVT COMMON

      INTEGER NMXHEP,NEVHEP,NHEP,ISTHEP,IDHEP,JMOHEP,JDAHEP
      REAL*8 PHEP,VHEP
      PARAMETER (NMXHEP=4000)
      COMMON /HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
     &JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
      SAVE/HEPEVT/

...

*... Fill HEPEVT from PYTHIA common
      CALL PYHEPC(1)

*... Write HEPEVT common into LUN ascii file (to be previously defined and opened)
      WRITE(LUN,*) NEVHEP,NHEP,             ! if you forget the *, a binary file will be generated
     &            (ISTHEP(III),IDHEP(III),
     &            (JMOHEP(JJJ,III),JJJ=1,2),
     &            (JDAHEP(JJJ,III),JJJ=1,2),
     &            (PHEP(JJJ,III),JJJ=1,5),
     &            (VHEP(JJJ,III),JJJ=1,4),III=1,NHEP)
      ENDIF
 

Be carefull not to generate too many events at a time as output file will grow enormously !

You now have to install susygen on d0mino...
 

Getting Susygen on d0mino

On d0mino, you can get a susygen version interfaced with mcpp and d0_mcpp. Do the following :
 

setup n32
setup D0RunII p11.07.00
setup d0cvs
newrel -t p11.07.00 p11dir
cd p11dir
d0setwa
addpkg -h susygen
addpkg d0_mcpp_gen
cp susygen/rcp/runMCsusygen.rcp .
cp susygen/rcp/susygen.input .
Replace the file p11dir/susygen/src/susygen.f with the read_ascii_file.f :
cd susygen/src
cp read_ascii_file.f susygen.f
cd ../..

Replace p11dir/susygen/bin/GNUmakefile with this GNUmakefile
and p11dir/d0_mcpp_gen/bin/GNUmakefile with that GNUmakefile

Then compile:

gmake susygen.all
It will take ~5 minutes, be patient.

Copying your ascii file on d0mino

Logon on d0mino and transfer your file.
The executable code will read your ascii file via a link named input and create a dspack MCevents.dat file.
Create a link to your ascii file :

cd p11dir
ln -sf your_ascii_file input
Edit the rcp file ./d0_mcpp_gen/rcp/MCNewEvent.rcp which control the number of runs / events such that it will match the number of events in your ascii file

Run the executable

Run the executable interactively or in batch depending on the number of events you are simulating :

./bin/IRIX6.5-KCC_4_0/MCsusygen.x -rcp runMCsusygen.rcp
Eventhough susygen is not used you have to run with the corresponding rcp file for it defines all other control files, as the previous ./d0_mcpp_gen/rcp/MCNewEvent.rcp
 

MC++ output RPC files are :



Yannick Arnoud, Auguste Besson