Generation of single particles for Professors

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

Yannick ARNOUD
Recipe tried by G.SAJOT





 
 

The method
Generation of single particles at ccali
Transformation of ascii file in dspack format at d0mino
mc_runjob on ccali
play with root on ccali


The method:

 You can easily simulate and fully reconstruct single particles  in 3 steps :

Generation of single particles at ccali
  The fortran file be found on
           /afs/in2p3.fr/group/d0/isng1/sajot/single/single.f
 or
           /afs/in2p3.fr/group/d0/isng1/arnoud/single/single.f

    Submit the generation by typing  ./single.exe
    You get one output file per slice of eta (for example 0.1). The name of this file contains the slice index :
                                 for example   hepevtph07.evt     for eta between 0.7 and 0.8
 

Transformation of ascii file  in dspack format at d0mino

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

setup n32
setup D0RunII p08.11.00
setup d0cvs
newrel -t p08.11.00 p0811
cd p0811
d0setwa
addpkg d0_mcpp
addpkg d0_mcpp_gen
cp -r /usrdisks/712/in2p_1/arnoud/p05dir/susygen susygen
cp /usrdisks/712/in2p_1/arnoud/p05dir/runMCsusygen.rcp runMCsusygen.rcp
cp /usrdisks/712/in2p_1/arnoud/p05dir/susygen.input susygen.input
Link susygen:
cd include
ln -sf ../susygen/susygen susygen
cd ..
Replace p0811/susygen/src/susygen.f with the read_ascii_file.f :
cd susygen/src
cp read_ascii_file.f susygen.f
cd ../..
Then compile:
gmake
You'll get warning messages, ignore them. It will take ~15 minutes, be patient.

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 p0811
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 interactively or in batch depending on the number of events you are simulating :

./bin/IRIX6-KCC_3_4/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 :

  change the name of the file to XXXXX.dat           (for example hepevtph07.dat)

mc_runjob on ccali
 Write the file on tape (after having created a tape by xtms. This tape has the name WVGSXX for me : WV
means ISN Grenoble and GS my name)
  For example to write hepevetph07.dat as file 1 on WVGS00 :
                                       xtagewrite -V WVGS00 -q 1 hepevtph07.dat
  Keep in mind the file number and the name of the file, you need it for the next step

  Create a new directory for example mcp06 on  $GROUP_DIR/isng1/sajot to get mc_runjob

                                         mkdir mcp06
                                         cd mcp06
                                         tar zxvf $THRONG_DIR/info_data/mcp06/mc_runjob.tar.gz
                                         source ./setup_mc_runjob.csh
                                         cd mc_runjob
                                         cd py_script
   edit one of the files :
                                          single_e_batch.macro
                                      or
                                          single_e_interactif.macro
       (which are in my case in the directory  /afs/in2p3.fr/group/d0/isng1/sajot/mcp06/mc_runjob/py_script )
        Change  :     MyName
                           JobName
                           TapeIN
                            SeqIN
                            InputFileName
                            NumRecords ( for d0gstar, d0sim, d0reco, recoanalyze)
     To submit interactively :
                python_Linker_ccin2p3.py script=single_e_interactif.macro
      To submit it in batch (same command  : 2000 events class 11)
       For example, the root tuple is stored at :
          /afs/in2p3.fr/group/d0/isng1/sajot/singleProd/WVGS00-1183163225/recoanalyze/p08.11.00/rAtpl.reco.sim.dig.null.root

    If you use HPSS :   few commands:
                rfdir = ls
           to copy a file from HPSS to your disk :
                rfcp /hpss/in2p3.fr/group/d0/mc_prod/mcp06/rAtpl.reco.sim.dig.null.root
 

play with root on ccali
      To get root :
                    type     root_env
                    then     root
 


Yannick Arnoud, Gerard Sajot