File: initPythia.cc

package info (click to toggle)
hepmc 2.06.09-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 11,524 kB
  • ctags: 1,521
  • sloc: sh: 9,138; cpp: 8,113; ansic: 682; makefile: 240; csh: 6; fortran: 4
file content (33 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//////////////////////////////////////////////////////////////////////////
// garren@fnal.gov, April 2007
//
// Initialize pythia
// Using a separate cc file allows us to test issues with PythiaWrapper.h
//
//////////////////////////////////////////////////////////////////////////

#include "HepMC/PythiaWrapper.h"
#include "PythiaHelper.h"

void initPythia()
{
    // (Some platforms may require the initialization of pythia PYDATA block 
    //  data as external - if you get pythia initialization errors try 
    //  commenting in/out the below call to initpydata() )
    // initpydata();
    //
    // Select W+gamma process (process number 20) 
    // (here we have to be careful of C/F77 differences: arrays in C 
    //  start at 0, F77 at 1, so we need to subtract 1 from the process #)
    pysubs.msel=0;
    pysubs.msub[20-1] = 1;
    // set random number seed (mandatory!)
    pydatr.mrpy[0]=55122 ;
    // Tell Pythia not to write multiple copies of particles in event record.
    pypars.mstp[128-1] = 2;
    // Example of setting a Pythia parameter: set the top mass 
    pydat2.pmas[1-1][6-1]= 175;  
    //
    // Call pythia initialization
    call_pyinit( "CMS", "p", "p", 14000. );
}