Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:44

0001 #ifndef gen_HijingPythiaWrapper_h
0002 #define gen_HijingPythiaWrapper_h
0003 
0004 #include "GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h"
0005 #include "HepMC/PythiaWrapper6_4.h"
0006 
0007 extern "C" {
0008 void py1ent_(int& ip, int& kf, double& pe, double& the, double& phi);
0009 double pymass_(int&);
0010 void pyexec_();
0011 int pycomp_(int&);
0012 void pyglfr_();
0013 void pyglrhad_();
0014 void pystlfr_();
0015 void pystrhad_();
0016 void pygive_(const char*, int);
0017 void pydecy_(int& ip);
0018 void pyrobo_(int&, int&, double&, double&, double&, double&, double&);
0019 
0020 void txgive_(const char*, int);
0021 void txgive_init_(void);
0022 
0023 // static bool call_pygive(const std::string &line)
0024 // {
0025 //    int numWarn = pydat1.mstu[26];    // # warnings
0026 //    int numErr = pydat1.mstu[22];     // # errors
0027 //
0028 //    pygive_(line.c_str(), line.length());
0029 //
0030 //    return pydat1.mstu[26] == numWarn &&
0031 //    pydat1.mstu[22] == numErr;
0032 // }
0033 }
0034 
0035 #define PYCOMP pycomp_
0036 extern "C" {
0037 int PYCOMP(int& length);
0038 }
0039 
0040 #define LUGIVE pygive_
0041 extern "C" {
0042 void LUGIVE(const char*, int length);
0043 }
0044 
0045 /*
0046 extern "C" {
0047    double ran_(int*){
0048       return gen::pyr_(0);
0049    }
0050 }
0051 */
0052 
0053 inline float ranff_(unsigned int* iseed) {
0054   (*iseed) = (69069 * (*iseed) + 1) & 0xffffffffUL;
0055   return (*iseed) / 4294967296.0;
0056 }
0057 
0058 /*
0059 
0060 #include "CLHEP/Random/RandomEngine.h"
0061 extern CLHEP::HepRandomEngine* randomEngine;
0062 extern "C" {
0063    double pyr_(int* idummy);
0064 }
0065 
0066 CLHEP::HepRandomEngine* randomEngine;
0067 
0068 double pyr_(int *idummy)
0069 {
0070    // getInstance will throw if no one used enter/leave
0071    // or this is the wrong caller class, like e.g. Herwig6Instance
0072    return randomEngine->flat(); 
0073 }
0074 
0075 */
0076 
0077 #endif