initPythia.cc

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////
00002 // garren@fnal.gov, April 2007
00003 //
00004 // Initialize pythia
00005 // Using a separate cc file allows us to test issues with PythiaWrapper.h
00006 //
00007 //////////////////////////////////////////////////////////////////////////
00008 
00009 #include "HepMC/PythiaWrapper.h"
00010 
00011 void initPythia()
00012 {
00013     // (Some platforms may require the initialization of pythia PYDATA block 
00014     //  data as external - if you get pythia initialization errors try 
00015     //  commenting in/out the below call to initpydata() )
00016     // initpydata();
00017     //
00018     // Select W+gamma process (process number 20) 
00019     // (here we have to be careful of C/F77 differences: arrays in C 
00020     //  start at 0, F77 at 1, so we need to subtract 1 from the process #)
00021     pysubs.msel=0;
00022     pysubs.msub[20-1] = 1;
00023     // set random number seed (mandatory!)
00024     pydatr.mrpy[0]=55122 ;
00025     // Tell Pythia not to write multiple copies of particles in event record.
00026     pypars.mstp[128-1] = 2;
00027     // Example of setting a Pythia parameter: set the top mass 
00028     pydat2.pmas[1-1][6-1]= 175;  
00029     //
00030     // Call pythia initialization
00031     call_pyinit( "CMS", "p", "p", 14000. );
00032 }

Generated on Wed Aug 31 09:44:48 2011 for HepMCAnalysis by  doxygen 1.4.7