1 // LHAFortran.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2008 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
6 // Header file for Fortran Les Houches Accord user process information.
7 // LHAupFortran: derived class with the HEPRUP and HEPEUP Fortran info.
8 // You are expected to supply the fillHepRup and fillHepEup methods.
10 #ifndef Pythia8_LHAFortran_H
11 #define Pythia8_LHAFortran_H
13 #include "PythiaStdlib.h"
17 //**************************************************************************
19 // Give access to the HEPRUP and HEPEUP Fortran commonblocks.
26 int pdfgup[2], pdfsup[2], idwtup, nprup;
27 double xsecup[100], xerrup[100], xmaxup[100];
33 double xwgtup, scalup, aqedup, aqcdup;
34 int idup[500], istup[500], mothup[500][2], icolup[500][2];
35 double pup[500][5], vtimup[500],spinup[500];
42 // A derived class with initialization information from the HEPRUP
43 // Fortran commonblock and event information from the HEPEUP one.
45 class LHAupFortran : public LHAup {
52 // Routine for doing the job of setting initialization info.
54 // Call the routine that does the job.
55 if (!fillHepRup()) return false;
56 // Store beam and strategy info.
57 setBeamA(heprup_.idbmup[0], heprup_.ebmup[0], heprup_.pdfgup[0],
59 setBeamB(heprup_.idbmup[1], heprup_.ebmup[1], heprup_.pdfgup[1],
61 setStrategy(heprup_.idwtup);
62 // Store process info. Protect against vanishing cross section.
63 for (int ip = 0; ip < heprup_.nprup; ++ip) {
64 double xsec = max( 1e-10, heprup_.xsecup[ip]);
65 addProcess( heprup_.lprup[ip], xsec, heprup_.xerrup[ip],
72 // Routine for doing the job of setting info on next event.
73 bool setEvent(int idProcIn = 0) {
74 // In some strategies the type of the next event has been set.
75 hepeup_.idprup = idProcIn;
76 // Call the routine that does the job.
77 if (!fillHepEup()) return false;
78 // Store process info.
79 setProcess(hepeup_.idprup, hepeup_.xwgtup, hepeup_.scalup,
80 hepeup_.aqedup, hepeup_.aqcdup);
81 // Store particle info.
82 for (int ip = 0; ip < hepeup_.nup; ++ip) addParticle(hepeup_.idup[ip],
83 hepeup_.istup[ip], hepeup_.mothup[ip][0], hepeup_.mothup[ip][1],
84 hepeup_.icolup[ip][0], hepeup_.icolup[ip][1], hepeup_.pup[ip][0],
85 hepeup_.pup[ip][1], hepeup_.pup[ip][2], hepeup_.pup[ip][3],
86 hepeup_.pup[ip][4], hepeup_.vtimup[ip], hepeup_.spinup[ip]) ;
93 // User-written routine that does the intialization and fills heprup.
96 // User-written routine that does the event generation and fills hepeup.
101 //**************************************************************************
103 } // end namespace Pythia8
105 #endif // Pythia8_LHAFortran_H