Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:21:08

0001 #ifndef _PYTHIAERHIC_PYTHIA_COMMONS_H_
0002 #define _PYTHIAERHIC_PYTHIA_COMMONS_H_
0003 
0004 /**
0005  \file pythia_commons.h
0006  Interfaces to PYTHIA common blocks
0007  Remember that Fortran arrays are indexed the opposite
0008  way round to C arrays, and array bounds are different by default:
0009  e.g. K(1,100) in Fortran becomes k[99][0] in C++.
0010  
0011  \author Thomas Burton
0012  \date 10/9/12
0013  \copyright 2012 BNL
0014  */
0015 
0016 extern "C" {
0017    // COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
0018    extern struct {
0019       int n;
0020       int npad;
0021       int k[5][4000];
0022       double p[5][4000];
0023       double v[5][4000];
0024    } pyjets_;
0025    
0026    // COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
0027    extern struct {
0028       int mstp[200];
0029       double parp[200];
0030       int msti[200];
0031       double pari[200];
0032    } pypars_;
0033    
0034    // COMMON/PYINT1/MINT(400),VINT(400)
0035    extern struct {
0036       int mint[400];
0037       double vint[400];
0038    } pyint1_;
0039    
0040    // COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
0041    extern struct {
0042       int ngenpd;
0043       int ngen[3][501];
0044       double xsec[3][501];
0045    } pyint5_;
0046 } // extern "C"
0047 
0048 // =====================================================================
0049 // Wrapper functions around PYTHIA common block variables.
0050 // Takes care of different Fortran and C array indexing
0051 // so they can be called with the PYTHIA syntax e.g. k(1, 2).
0052 // =====================================================================
0053 
0054 int msti(int);
0055 
0056 double pari(int);
0057 
0058 double vint(int);
0059 
0060 int k(int, int);
0061 
0062 double p(int, int);
0063 
0064 double v(int, int);
0065 
0066 int ngen(int, int);
0067 
0068 #endif // _PYTHIAERHIC_PYTHIA_COMMONS_H_