MyHerwigWrapper.h.svn-base

Go to the documentation of this file.
00001 #ifndef HERWIG_WRAPPER_H
00002 #define HERWIG_WRAPPER_H
00003 
00004 /* Common Block Declarations */
00005 #include <complex>
00006 #include <ctype.h>
00007 
00008 const int m_nmxhep = 10000;
00009 
00010 extern "C" {
00011 extern struct {
00012     int ipart1, ipart2;
00013 } hwbeam_;
00014 }
00015 #define hwbeam hwbeam_ 
00016 
00017 
00018 extern "C" {
00019 extern struct {
00020     char part1[8], part2[8];
00021 } hwbmch_;
00022 }
00023 #define hwbmch hwbmch_
00024 
00025 const int herwig_hepevt_size = 4000;
00026 
00027 extern "C" {
00028 extern struct {
00029     double ebeam1, ebeam2, pbeam1, pbeam2;
00030     int iproc, maxev;
00031 } hwproc_;
00032 }
00033 #define hwproc hwproc_
00034 
00035 
00036 extern "C" {
00037 extern struct {
00038     double afch[32], alphem, b1lim, betaf, btclm, cafac,
00039            cffac, clmax, clpow, clsmr[2], cspeed, ensof, etamix, f0mix, f1mix, 
00040             f2mix, gamh, gamw, gamz, gamzp, gev2nb, h1mix, pdiqk, pgsmx, 
00041           pgspl[4], phimix, pifac, prsof, psplt[2], ptrms, pxrms, qcdl3, qcdl5,
00042              qcdlam, qdiqk, qfch[16], qg, qspac, qv, scabi, swein, tmtop, 
00043             vfch[32], vckm[9], 
00044             vgcut, vqcut, vpcut, zbinm,
00045             effmin, omhmix, et2mix, ph3mix, gcutme; 
00046     int ioprem, iprint, ispac, lrsud, lwsud, modpdf[2], nbtry, ncolo, 
00047             nctry, ndtry, netry, nflav, ngspl, nstru, nstry, nzbin,
00048             iop4jt[2], nprfmt;
00049     int azsoft, azspin;
00050     int cldir[2];
00051     int hardme, nospac, prndec, prvtx, softme, zprime;
00052     int prndef, prntex, prnweb;
00053 } hwpram_;
00054 }
00055 #define hwpram hwpram_
00056 
00057 extern "C" {
00058 extern struct {
00059     char autpdf[2][20], bdecay[4];
00060 } hwprch_;
00061 }
00062 #define hwprch hwprch_
00063 
00064 
00065 extern "C" {
00066 extern struct {
00067     int nevpar, npar, istpar[500], idpar[500], jmopar[1000],
00068             jdapar[1000];
00069     double ppar[2500], vpar[2000];
00070 } hwpart_;
00071 }
00072 #define hwpart hwpart_ 
00073 
00074 
00075 extern "C" {
00076 extern struct {
00077     double decpar[1000], phipar[1000], rhopar[1000];
00078     int tmpar[500];
00079 } hwparp_;
00080 }
00081 #define hwparp hwparp_
00082 
00083 extern "C" {
00084 extern struct {
00085   // rhohep = 3*NMXHEP
00086 //   double alpfac, brhig[12], enhanc[12], gammax, rhohep[30000];
00087   double alpfac, brhig[12], enhanc[12], gammax, rhohep[3*m_nmxhep];
00088   int iophig, modbos[50];
00089 } hwbosc_;
00090 }
00091 #define hwbosc hwbosc_
00092 
00093 extern "C" {
00094 extern struct {
00095     int jcopar[2000];
00096 } hwparc_;
00097 }
00098 #define hwparc hwparc_
00099 
00100 extern "C" {
00101 extern struct {
00102     double anomsc[4], hardst, ptint[6], xfact;
00103     int inhad, jnhad, nspac[7], islent;
00104     int breit, frost, usecmf;
00105 } hwbrch_;
00106 }
00107 #define hwbrch hwbrch_
00108 
00109 extern "C" {
00110 extern struct {
00111   // idhw = NMXHEP
00112     double avwgt, evwgt, gamwt, tlout, wbigst, wgtmax, wgtsum, wsqsum;
00113 //     int idhw[10000], ierror, istat, lwevt, maxer, maxpr;
00114     int idhw[m_nmxhep], ierror, istat, lwevt, maxer, maxpr;
00115     bool nowgt;
00116     int nrn[2], numer, numeru, nwgts;
00117     int gensof;
00118 } hwevnt_;
00119 }
00120 #define hwevnt hwevnt_
00121 
00122 
00123 extern "C" {
00124 extern struct {
00125     double asfixd, clq[42], coss, costh, ctmax, disf[26],
00126             emlst, emmax, emmin, empow, emsca, epoln[3],
00127             gcoef[7], gpoln, omega0, phomas, ppoln[3], ptmax, ptmin, ptpow, 
00128       q2max, q2min, q2pow, q2wwmn, q2wwmx, qlim, sins, thmax, y4jt, tmnisr, 
00129             tqwt, xx[2], xlmin, xxmin, ybmax, ybmin, yjmax, yjmin, ywwmax, 
00130             ywwmin, whmin, zjmax, zmxisr;
00131     int iaphig, ibrn[2], ibsh, ico[10], idcmf, idn[10], iflmax, iflmin, 
00132             ihpro, ipro, mapq[6], maxfl;
00133     int bgshat, colisr, fstevt, fstwgt, genev, hvfcen, tpol, durham;
00134 } hwhard_;
00135 }
00136 #define hwhard hwhard_
00137 
00138 
00139 extern "C" {
00140 extern struct {
00141     double rltim[501], rmass[501], rspin[501];
00142     int ichrg[501], idpdg[501], iflav[501], nres;
00143     int vtocdk[501], vtordk[501];
00144     int qorqqb[501], qborqq[501];
00145 } hwprop_;
00146 }
00147 #define hwprop hwprop_ 
00148 
00149 
00150 extern "C" {
00151 extern struct {
00152     char rname[4008];  /* 8*501 */
00153     char txname[37074];   /*  2*37*501  */
00154 } hwunam_;
00155 }
00156 #define hwunam hwunam_
00157 
00158 
00159 extern "C" {
00160 extern struct {
00161     double brfrac[4000], cmmom[4000], dkltm[500];
00162     int idk[4000], idkprd[20000], lnext[4000], 
00163             lstrt[500], ndkys, nme[4000], nmodes[500], nprods[4000];
00164     int dkpset, rstab[501];
00165 } hwupdt_;
00166 }
00167 #define hwupdt hwupdt_
00168 
00169 
00170 extern "C" {
00171 extern struct {
00172     double repwt[100], sngwt, decwt, qwt[3], 
00173             pwt[12], swtef[500];
00174 } hwuwts_;
00175 }
00176 #define hwuwts hwuwts_
00177 
00178 
00179 extern "C" {
00180 extern struct {
00181     double cldkwt[4000], cthrpw[144], preco, 
00182             resn[144], rmin[144];
00183     int locn[144], ncldk[4000], nreco;
00184     int clreco;
00185 } hwuclu_;
00186 }
00187 #define hwuclu hwuclu_
00188 
00189 
00190 extern "C" {
00191 extern struct {
00192     double exag, gev2mm, hbar, pltcut, vmin2, vtxpip[5], xmix[2], xmrct[2]
00193             , ymix[2], ymrct[2];
00194     int iopdkl;
00195     int maxdkl, mixing, pipsmr;
00196 } hwdist_;
00197 }
00198 #define hwdist hwdist_
00199 
00200 
00201 extern "C" {
00202 extern struct {
00203     double vtxqdk[80];
00204     int imqdk[20], locq[20], nqdk;
00205 } hwqdks_;
00206 }
00207 #define hwqdks hwqdks_
00208 
00209 
00210 extern "C" {
00211 extern struct {
00212     double accur, qev[6144], sud[6144];
00213     int inter, nqev, nsud, sudord;
00214 } hwusud_;
00215 }
00216 #define hwusud hwusud_
00217 
00218 
00219 extern "C" {
00220 // v 6.1
00221 extern struct {
00222     double tanb, alphah, cosbpa, sinbpa, cosbma, sinbma, cosa, sina,
00223           cosb, sinb, cotb, zmixss[16], zmxnss[16], zsgnss[4],
00224           lfch[16], rfch[16], slfch[64], srfch[64], wmxuss[4],
00225           wmxvss[4], wsgnss[2], qmixss[24], lmixss[24],
00226           thetat, thetab, thetal, atss, abss, alss, muss, factss,
00227           ghwwss[3], ghzzss[3], ghddss[4], ghuuss[4], ghwhss[3],
00228           ghsqss[96], xlmnss, rmmnss, dmssm, senhnc[24], ssparity;
00229     int susyin;
00230 } hwsusy_;
00231 }
00232 #define hwsusy hwsusy_
00233 
00234 
00235 extern "C" {
00236 extern struct {
00237     double lamda1[27], lamda2[27], lamda3[27];
00238     int hrdcol[10];
00239     int rparty, colupd;
00240 } hwrpar_;
00241 }
00242 #define hwrpar hwrpar_
00243 
00244 
00245 extern "C" {
00246 extern struct {
00247     double pmbn1, pmbn2, pmbn3, pmbk1, pmbk2, pmbm1, pmbm2,
00248           pmbp1, pmbp2, pmbp3;
00249 } hwminb_;
00250 }
00251 #define hwminb hwminb_
00252 
00253 
00254 extern "C" {
00255 extern struct {
00256     double ppcl[2500];
00257     int idcl[500], ncl;
00258 } hwclus_;
00259 }
00260 #define hwclus hwclus_
00261 
00262   // end v6.1 adds
00263 
00264 
00265 extern "C" {
00266 extern struct {
00267     double grvlam, emgrv, gamgrv;
00268 } hwgrav_;
00269 }
00270 #define hwgrav hwgrav_
00271 
00272 
00273 extern "C" {
00274 extern struct {
00275     double vipwid[3], dxrcyl, dxzmax, dxrsph;
00276     int wzrfr, fix4jt;
00277     int imssm, ihiggs, parity, lrsusy;
00278 } hw6202_;
00279 }
00280 #define hw6202 hw6202_
00281 //end v 6202 adds
00282 
00283 // v 6203
00284 
00285 
00286 extern "C" {
00287 extern struct {
00288     double abwgt, abwsum, avabw;
00289     int nnegwt, nnegev;
00290     int negwts;
00291 } hw6203_;
00292 }
00293 #define hw6203 hw6203_
00294 
00295 // begin v 6301 adds
00296 
00297 
00298 extern "C" {
00299 extern struct {
00300     double mjjmin, chnprb[20];
00301     int iopstp, iopsh;
00302     int  optm, chon[20];
00303 } hw6300_;
00304 }
00305 #define hw6300 hw6300_
00306 
00307 
00308 extern "C" {
00309 extern struct {
00310     double fmrs[44688]  /* was [3][8][49][38] */;
00311 } hwpmrs_;
00312 }
00313 #define hwpmrs hwpmrs_
00314 
00315 
00316 extern "C" {
00317 extern struct {
00318     int circop, circac, circvr, circrv, circch;
00319 } hwcirc_;
00320 }
00321 #define hwcirc hwcirc_
00322 
00323 
00324 
00325 //end v6301 adds
00326 
00327 // v6.400
00328 
00329 
00330 extern "C" {
00331 extern struct {
00332     double abmode[100]  /* was [2][50] */, bbmode[1200] /* was [2][12]
00333             [50] */, pbmode[600]        /* was [12][50] */, wtbmax[600] /* was [12][50] */;
00334     int idbprt[50], ibdrtp[50], ibmode[50], nbmode;
00335 } hwdspb_;
00336 }
00337 #define hwdspb hwdspb_
00338 
00339 
00340 extern "C" {
00341 extern struct {
00342     double a2mode[1000] /* was [2][500] */, p2mode[500], wt2max[500];
00343     int id2prt[500], i2drtp[500], n2mode;
00344 } hwdsp2_;
00345 }
00346 #define hwdsp2 hwdsp2_
00347 
00348 
00349 extern "C" {
00350 extern struct {
00351     double a3mode[8000] /* was [2][8][500] */, b3mode[8000]     /* was [2][8][500] */, p3mode[500], wt3max[500], spn3cf[4500]   /* was [3][3][500] */;
00352     int id3prt[500], i3mode[4000]       /* was [8][500] */, i3drtp[4000]        /* was [8][500] */, n3mode, ndi3by[500], n3ncfl[500], i3drcf[4000] /* was [8][500] */;
00353 } hwdsp3_;
00354 }
00355 #define hwdsp3 hwdsp3_
00356 
00357 extern "C" {
00358 extern struct {
00359     double a4mode[96]   /* was [2][12][4] */, b4mode[96]        /* was [2][12][4] */, p4mode[576]       /* was [12][12][4] */, wt4max[576]      /* was [12][12][4] */;
00360     int id4prt[4], i4mode[8]    /* was [2][4] */, n4mode;
00361 } hwdsp4_;
00362 }
00363 #define hwdsp4 hwdsp4_
00364 
00365 extern "C" {
00366 extern struct {
00367     int ndecsy, nsearch, lrdec, lwdec;
00368     int syspin, threeb, fourb;
00369     char taudec[6];
00370 } hwdspn_;
00371 }
00372 #define hwdspn hwdspn_ 
00373 
00374 extern "C" {
00375 extern struct {
00376   // isnhep = NMXHEP
00377     std::complex<double> mespn[2400]    /* was [2][2][2][2][3][50] */, rhospn[200]      /* was [2][2][50] */;
00378     double spncfc[450]  /* was [3][3][50] */;
00379 //     int idspn[50], jmospn[50], jdaspn[100]   /* was [2][50] */, nspn, isnhep[10000], nsntry;
00380     int idspn[50], jmospn[50], jdaspn[100]      /* was [2][50] */, nspn, isnhep[m_nmxhep], nsntry;
00381     int decspn[50];
00382     int ncfl[50], spcopt;
00383 } hwspin_;
00384 }
00385 #define hwspin hwspin_
00386 
00387 extern "C" {
00388 extern struct {
00389     int jak1, jak2, itdkrc, ifphot;
00390 } hwstau_;
00391 }
00392 #define hwstau hwstau_
00393 //end v6400 adds
00394 
00395 
00396 // v6500
00397 
00398 extern "C" {
00399 extern struct {
00400   double lhwgt[100], lhwgts[100], lhmxsm, lhxsct[100], lhxerr[100], lhxmax[100];
00401   int    lhiwgt[100], ityplh, lhnevt[100];
00402   int    lhsoft, lhglsf;
00403 } hwgupr_;
00404 }
00405 #define hwgupr hwgupr_
00406 
00407 extern "C" {
00408 extern struct {
00409   int prespl;
00410 } hw6500_;
00411 }
00412 #define hw6500 hw6500_
00413 //end v6500 adds
00414 
00415 // v6504
00416 
00417 extern "C" {
00418 extern struct {
00419   int itoprd;
00420 } hw6504_;
00421 }
00422 #define hw6504 hw6504_
00423 //end v6504 adds
00424 
00425 // v6506
00426 
00427 extern "C" {
00428 extern struct {
00429   double pdfx0, pdfpow;
00430 } hw6506_;
00431 }
00432 #define hw6506 hw6506_
00433 //end v6506 adds
00434 
00435 // v6506
00436 
00437 extern "C" {
00438 extern struct {
00439   int nedtry;
00440 } hw6510_;
00441 }
00442 #define hw6510 hw6510_
00443 //end v6510 adds
00444 
00445 // Jimmy common blocks
00446 
00447 extern "C" {
00448   extern struct {
00449     double ptjim, ygamma, jmzmin, jmrad[264], phad, jmu2, jmv2, jmarry[17][106], nlost, totscat;
00450     int anomoff, jcmvar, jmueo, jmptyp[117], jmbug, fn_type, msflag, maxmstry;
00451   } jmparm_;
00452 }
00453 #define jmparm jmparm_
00454 
00455 #define jimmin jimmin_
00456 #define jminit jminit_
00457 #define hwmsct hwmsct_
00458 extern "C" {
00459   void jimmin(void);
00460   void jminit(void); 
00461   void hwmsct(int *abort); 
00462 }
00463 
00464 // end Jimmy common blocks
00465 
00466 // common for PDF information
00467 extern "C" {
00468 extern struct {
00469   double x1, x2, q;
00470   int id1, id2, idpdf1, idpdf2;
00471 } hrwpdf_;
00472 }
00473 #define hrwpdf hrwpdf_
00474 
00475 //extern "C" {
00476 // extern struct {
00477 //     int lhwout;
00478 // } hwumsc_;
00479 //}
00480 //#define hwumsc hwumsc_
00481 
00482 //--------------------------------------------------------------------------
00483 // HERWIG routines declaration
00484 
00485 #define hwigin hwigin_  // initialise other common blocks
00486 #define hwigup hwigup_  // initialise HepUP run common block
00487 #define hwuinc hwuinc_  // compute parameter-dependent constants
00488 #define hwusta hwusta_  // call hwusta to make any particle stable
00489 #define hweini hweini_  // initialise elementary process
00490 #define hwuine hwuine_  // initialise event
00491 #define hwepro hwepro_  // generate HERWIG hard subprocess
00492 #define hwupro hwupro_  // read USER hard subprocess from HepUP event common
00493 #define hwbgen hwbgen_  // generate parton cascades
00494 #define hwdhob hwdhob_  // do heavy object decays
00495 #define hwcfor hwcfor_  // do cluster hadronization
00496 #define hwcdec hwcdec_  // do cluster decay
00497 #define hwdhad hwdhad_  // do unstable particle decays
00498 #define hwdhvy hwdhvy_  // do heavy flavour decays
00499 #define hwmevt hwmevt_  // add soft underlying event if needed
00500 #define hwufne hwufne_  // event generation completed, wrap up event ....
00501 #define hwefin hwefin_  // terminate elementary process
00502 
00503 #define hwudpr hwudpr_  // prints out particle/decay properties
00504 #define hwuepr hwuepr_  // prints out event data
00505 #define hwupup hwupup_  // prints out HepEUP user common block event data
00506 #define hwegup hwegup_  // terminal calculations to replace HWEFIN for HepUP
00507     extern "C" {
00508         void hwigin(void);
00509         void hwigup(void);
00510         void hwuinc(void);
00511         void hwusta(const char*,int);
00512         void hweini(void);
00513         void hwuine(void);
00514         void hwepro(void);
00515         void hwupro(void);
00516         void hwbgen(void);
00517         void hwdhob(void);
00518         void hwcfor(void);
00519         void hwcdec(void);
00520         void hwdhad(void);
00521         void hwdhvy(void);
00522         void hwmevt(void);
00523         void hwufne(void);
00524         void hwefin(void);
00525         void hwudpr(void);
00526         void hwuepr(void);
00527         void hwupup(void);
00528         void hwegup(void);
00529     }
00530 
00531 //--------------------------------------------------------------------------
00532 
00533 //--------------------------------------------------------------------------
00534 // HERWIG block data
00535 // ( with gcc it works to initialize the block data by calling
00536 //   "hwudat();" at beginning. )
00537 
00538 #define hwudat hwudat_
00539 extern "C" {
00540     void hwudat(void);
00541 }
00542 
00543 #endif  // HERWIG_WRAPPER_H
00544 //--------------------------------------------------------------------------
00545 

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