00001
00002
00003
00004
00005
00006
00007 #include "GeneratorInterface/MCatNLOInterface/interface/MCatNLOProducer.h"
00008 #include "GeneratorInterface/MCatNLOInterface/interface/HWRGEN.h"
00009 #include "GeneratorInterface/MCatNLOInterface/interface/Dummies.h"
00010 #include "SimDataFormats/HepMCProduct/interface/HepMCProduct.h"
00011 #include "FWCore/Framework/interface/Event.h"
00012 #include "FWCore/ServiceRegistry/interface/Service.h"
00013 #include "FWCore/Utilities/interface/RandomNumberGenerator.h"
00014 #include "CLHEP/Random/JamesRandom.h"
00015 #include "CLHEP/Random/RandFlat.h"
00016 #include "FWCore/Utilities/interface/Exception.h"
00017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00018 #include "SimDataFormats/HepMCProduct/interface/GenInfoProduct.h"
00019 #include "FWCore/Framework/interface/Run.h"
00020
00021 #include <iostream>
00022 #include <fstream>
00023 #include "time.h"
00024 #include <ctype.h>
00025
00026
00027 #include "HepMC/HEPEVT_Wrapper.h"
00028 #include "HepMC/HerwigWrapper6_4.h"
00029 #include "HepMC/IO_HERWIG.h"
00030 #include "herwig.h"
00031
00032 extern"C" {
00033 void setpdfpath_(char*);
00034 void mysetpdfpath_(char*);
00035 void setlhaparm_(char*);
00036 void setherwpdf_(void);
00037
00038
00039 }
00040
00041 #define setpdfpath setpdfpath_
00042 #define mysetpdfpath mysetpdfpath_
00043 #define setlhaparm setlhaparm_
00044 #define setherwpdf setherwpdf_
00045
00046
00047 using namespace edm;
00048 using namespace std;
00049
00050 MCatNLOProducer::MCatNLOProducer( const ParameterSet & pset) :
00051 EDProducer(), evt(0),
00052 doHardEvents_(pset.getUntrackedParameter<bool>("doHardEvents",true)),
00053 mcatnloVerbosity_(pset.getUntrackedParameter<int>("mcatnloVerbosity",0)),
00054 herwigVerbosity_ (pset.getUntrackedParameter<int>("herwigVerbosity",0)),
00055 herwigHepMCVerbosity_ (pset.getUntrackedParameter<bool>("herwigHepMCVerbosity",false)),
00056 maxEventsToPrint_ (pset.getUntrackedParameter<int>("maxEventsToPrint",0)),
00057 comenergy(pset.getUntrackedParameter<double>("comEnergy",14000.)),
00058 processNumber_(pset.getUntrackedParameter<int>("processNumber",0)),
00059 numEvents_(pset.getUntrackedParameter<int>("numHardEvents",999999999)),
00060 stringFileName_(pset.getUntrackedParameter<string>("stringFileName",std::string("stringInput"))),
00061 lhapdfSetPath_(pset.getUntrackedParameter<string>("lhapdfSetPath",std::string(""))),
00062 useJimmy_(pset.getUntrackedParameter<bool>("useJimmy",true)),
00063 doMPInteraction_(pset.getUntrackedParameter<bool>("doMPInteraction",true)),
00064 printCards_(pset.getUntrackedParameter<bool>("printCards",true)),
00065 eventCounter_(0),
00066 extCrossSect(pset.getUntrackedParameter<double>("crossSection", -1.)),
00067 extFilterEff(pset.getUntrackedParameter<double>("filterEfficiency", -1.))
00068 {
00069 std::ostringstream header_str;
00070
00071 header_str << "----------------------------------------------" << "\n";
00072 header_str << "Initializing MCatNLOProducer" << "\n";
00073 header_str << "----------------------------------------------" << "\n";
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 if(numEvents_<1)
00086 throw edm::Exception(edm::errors::Configuration,"MCatNLOError")
00087 <<" Number of input events not set: Either use maxEvents input > 0 or numHardEvents > maxEvents output.";
00088
00089 fstbases.basesoutput = mcatnloVerbosity_;
00090 header_str << " MC@NLO verbosity level = " << fstbases.basesoutput << "\n";
00091 header_str << " Herwig verbosity level = " << herwigVerbosity_ << "\n";
00092 header_str << " HepMC verbosity = " << herwigHepMCVerbosity_ << "\n";
00093 header_str << " Number of events to be printed = " << maxEventsToPrint_ << "\n";
00094 if(useJimmy_) {
00095 header_str << " HERWIG will be using JIMMY for UE/MI." << "\n";
00096 if(doMPInteraction_)
00097 header_str << " JIMMY trying to generate multiple interactions." << "\n";
00098 }
00099
00100
00101 char* lhaPdfs = NULL;
00102 header_str<<" Trying to find LHAPATH in environment ...";
00103 lhaPdfs = getenv("LHAPATH");
00104 if(lhaPdfs != NULL) {
00105 header_str<<" done.\n";
00106 lhapdfSetPath_=std::string(lhaPdfs);
00107 }
00108 else
00109 header_str<<" failed.\n";
00110
00111
00112 params.mmmaxevt = numEvents_;
00113 params.mmiproc=processNumber_;
00114 params.mmit1 = 10;
00115 params.mmit2 = 10;
00116
00117 params.mmpart1[0]='P';
00118 params.mmpart2[0]='P';
00119 for(int k=1;k<4; ++k) {
00120 params.mmpart1[k]=' ';
00121 params.mmpart2[k]=' ';
00122 }
00123
00124
00125 ParameterSet mcatnlo_params = pset.getParameter<ParameterSet>("MCatNLOParameters") ;
00126 vector<string> setNames1 = mcatnlo_params.getParameter<vector<string> >("parameterSets");
00127
00128 for ( unsigned i=0; i<setNames1.size(); ++i ) {
00129 string mySet = setNames1[i];
00130
00131 vector<string> pars = mcatnlo_params.getParameter<vector<string> >(mySet);
00132 header_str << "----------------------------------------------" << "\n";
00133 header_str << "Read MC@NLO parameter set " << mySet << "\n";
00134 header_str << "----------------------------------------------" << "\n";
00135
00136
00137 directory[0]='\0';
00138 prefix_bases[0]='\0';
00139 prefix_events[0]='\0';
00140
00141
00142 for( vector<string>::const_iterator itPar = pars.begin(); itPar != pars.end(); ++itPar ) {
00143 if(!(this->give(*itPar))) {
00144 throw edm::Exception(edm::errors::Configuration,"MCatNLOError")
00145 <<" MCatNLO did not accept the following \""<<*itPar<<"\"";
00146 }
00147 else if(printCards_) {
00148 header_str << " " << *itPar << "\n";
00149 }
00150 }
00151 }
00152
00153 header_str << "----------------------------------------------" << "\n";
00154 header_str << "Setting MCatNLO random number generator seed." << "\n";
00155 header_str << "----------------------------------------------" << "\n";
00156 edm::Service<RandomNumberGenerator> rng;
00157 int seed = rng->mySeed();
00158 fRandomEngine = &(rng->getEngine());
00159 randomEngine = fRandomEngine;
00160 double x[5];
00161 int s = seed;
00162 for (int i=0; i<5; i++) {
00163 s = s * 29943829 - 1;
00164 x[i] = s * (1./(65536.*65536.));
00165 }
00166 long double c;
00167 c = (long double)2111111111.0 * x[3] +
00168 1492.0 * (x[3] = x[2]) +
00169 1776.0 * (x[2] = x[1]) +
00170 5115.0 * (x[1] = x[0]) +
00171 x[4];
00172 x[4] = floorl(c);
00173 x[0] = c - x[4];
00174 x[4] = x[4] * (1./(65536.*65536.));
00175 params.mmiseed = int(x[0]*99999);
00176 header_str << " RNDEVSEED = "<<params.mmiseed<<"\n";
00177
00178
00179 c = (long double)2111111111.0 * x[3] +
00180 1492.0 * (x[3] = x[2]) +
00181 1776.0 * (x[2] = x[1]) +
00182 5115.0 * (x[1] = x[0]) +
00183 x[4];
00184 x[4] = floorl(c);
00185 x[0] = c - x[4];
00186 x[4] = x[4] * (1./(65536.*65536.));
00187 params.mmidecseed=int(x[0]*99999);
00188 c = (long double)2111111111.0 * x[3] +
00189 1492.0 * (x[3] = x[2]) +
00190 1776.0 * (x[2] = x[1]) +
00191 5115.0 * (x[1] = x[0]) +
00192 x[4];
00193 x[4] = floorl(c);
00194 x[0] = c - x[4];
00195 x[4] = x[4] * (1./(65536.*65536.));
00196 params.mmifk88seed=int(x[0]*99999);
00197
00198
00199
00200 params.mmgname[0]='L';
00201 params.mmgname[1]='H';
00202 params.mmgname[2]='A';
00203 params.mmgname[3]='P';
00204 params.mmgname[4]='D';
00205 params.mmgname[5]='F';
00206 for(int k=6;k<20; ++k) params.mmgname[k]=' ';
00207
00208
00209 params.mmxrenmc=params.mmxren;
00210 params.mmxfhmc=params.mmxfh;
00211
00212
00213
00214 params.mmpart1[0]='P';
00215 params.mmpart2[0]='P';
00216 for(int k=1;k<4; ++k) {
00217 params.mmpart1[k]=' ';
00218 params.mmpart2[k]=' ';
00219 }
00220
00221 createStringFile(stringFileName_);
00222
00223 char pdfpath[232];
00224 int pathlen = lhapdfSetPath_.length();
00225 for(int i=0; i<pathlen; ++i)
00226 pdfpath[i]=lhapdfSetPath_.at(i);
00227 for(int i=pathlen; i<232; ++i)
00228 pdfpath[i]=' ';
00229 mysetpdfpath(pdfpath);
00230
00231
00232 if(doHardEvents_) {
00233 header_str << "----------------------------------------------" << "\n";
00234 header_str << "Starting hard event generation." << "\n";
00235 header_str << "----------------------------------------------" << "\n";
00236
00237 if(processNumber_>0) processUnknown(true);
00238
00239 switch(abs(processNumber_)) {
00240 case(1705):case(1706):case(11705):case(11706):
00241 processQQ();
00242 break;
00243 case(2850):case(2860):case(2870):case(2880):case(12850):case(12860):case(12870):case(12880):
00244 processVV();
00245 break;
00246 case(1600):case(1601):case(1602):case(1603):case(1604):case(1605):case(1606):case(1607):case(1608):case(1609):case(11600):case(11601):
00247 case(11602):case(11603):case(11604):case(11605):case(11606):case(11607):case(11608):case(11609):case(1610):case(1611):case(1612):
00248 case(11610):case(11611):case(11612):case(1699):case(11699):
00249 processHG();
00250 break;
00251 case(1396):case(1397):case(1497):case(1498):case(11396):case(11397):case(11497):case(11498):
00252 processSB();
00253 break;
00254 case(1351):case(1352):case(1353):case(1354):case(1355):case(1356):case(1361):case(1362):case(1363):case(1364):case(1365):case(1366):
00255 case(1371):case(1372):case(1373):case(1374):case(1375):case(1376):case(1461):case(1462):case(1463):case(1471):case(1472):case(1473):
00256 case(11351):case(11352):case(11353):case(11354):case(11355):case(11356):case(11361):case(11362):case(11363):case(11364):case(11365):
00257 case(11366):case(11371):case(11372):case(11373):case(11374):case(11375):case(11376):case(11461):case(11462):case(11463):case(11471):
00258 case(11472):case(11473):
00259 processLL();
00260 break;
00261 case(2600):case(2601):case(2602):case(2603):case(2604):case(2605):case(2606):case(2607):case(2608):case(2609):case(2610):case(2611):case(2612):case(2699):
00262 case(12600):case(12601):case(12602):case(12603):case(12604):case(12605):case(12606):case(12607):case(12608):case(12609):case(12610):case(12611):case(12612):
00263 case(12699):case(2700):case(2701):case(2702):case(2703):case(2704):case(2705):case(2706):case(2707):case(2708):case(2709):case(2710):case(2711):
00264 case(2712):case(2799):case(12700):case(12701):case(12702):case(12703):case(12704):case(12705):case(12706):case(12707):case(12708):case(12709):case(12710):
00265 case(12711):case(12712):case(12799):
00266 processVH();
00267 break;
00268 case(2000):case(2001):case(2004):case(2010):case(2011):case(2014):case(2020):case(2021):case(2024):case(12000):case(12001):
00269 case(12004):case(12010):case(12011):case(12014):case(12020):case(12021):case(12024):
00270 processST();
00271 break;
00272 default:
00273 processUnknown(false);
00274 break;
00275 }
00276 }
00277 else {
00278 header_str << "----------------------------------------------" << "\n";
00279 header_str << "SKipping hard event generation." << "\n";
00280 header_str << "----------------------------------------------" << "\n";
00281 }
00282
00283 edm::LogInfo("")<<header_str.str();
00284
00285 std::ostringstream header2_str;
00286
00287
00288
00289 header2_str << "----------------------------------------------" << "\n";
00290 header2_str << "Initializing Herwig" << "\n";
00291 header2_str << "----------------------------------------------" << "\n";
00292
00293 hwudat();
00294
00295
00296 hwproc.PBEAM1 = comenergy/2.;
00297 hwproc.PBEAM2 = comenergy/2.;
00298 hwbmch.PART1[0] = 'P';
00299 hwbmch.PART2[0] = 'P';
00300 for(int i=1;i<8;++i){
00301 hwbmch.PART1[i] = ' ';
00302 hwbmch.PART2[i] = ' ';}
00303
00304 if(useJimmy_ && doMPInteraction_) jmparm.MSFLAG = 1;
00305
00306
00307 hwigin();
00308
00309
00310 hwevnt.MAXER = numEvents_/10;
00311 if(hwevnt.MAXER<100) hwevnt.MAXER=100;
00312
00313
00314 if(useJimmy_) jimmin();
00315
00316
00317 hwevnt.MAXPR = maxEventsToPrint_;
00318 hwpram.IPRINT = herwigVerbosity_;
00319 hwprop.RMASS[6] = params.mmxmt;
00320 hwproc.IPROC = processNumber_;
00321
00322
00323 setherwpdf();
00324
00325
00326 hwpram.MODPDF[0]=params.mmidpdfset;
00327 hwpram.MODPDF[1]=params.mmidpdfset;
00328
00329
00330
00331 int jpr0 = (abs(hwproc.IPROC)%10000);
00332 int jpr = jpr0/100;
00333 if(jpr == 13 || jpr == 14) {
00334 if(jpr0 == 1396) {
00335 hwhard.EMMIN = params.mmv1massinf;
00336 hwhard.EMMAX = params.mmv1masssup;
00337 }
00338 else if(jpr0 == 1397) {
00339 hwprop.RMASS[200] = params.mmxzm;
00340 hwpram.GAMZ = params.mmxzw;
00341 hwbosc.GAMMAX = params.mmv1gammax;
00342 }
00343 else if(jpr0 == 1497 || jpr0 == 1498) {
00344 hwprop.RMASS[198] = params.mmxwm;
00345 hwpram.GAMW = params.mmxww;
00346 hwbosc.GAMMAX = params.mmv1gammax;
00347 }
00348 else if((jpr0 >= 1350 && jpr0 <= 1356) || (jpr0 >= 1361 && jpr0 <= 1366)) {
00349 hwprop.RMASS[200] = params.mmxzm;
00350 hwpram.GAMZ = params.mmxzw;
00351 hwbosc.GAMMAX = params.mmv1gammax;
00352 hwhard.EMMIN = params.mmv1massinf;
00353 hwhard.EMMAX = params.mmv1masssup;
00354 }
00355 else if(jpr0 >= 1371 && jpr0 <= 1373) {
00356 hwhard.EMMIN = params.mmv1massinf;
00357 hwhard.EMMAX = params.mmv1masssup;
00358 }
00359 else if((jpr0 >= 1450 && jpr0 <= 1453)
00360 || (jpr0 >= 1461 && jpr0 <= 1463)
00361 || (jpr0 >= 1471 && jpr0 <= 1473)) {
00362 hwprop.RMASS[198] = params.mmxwm;
00363 hwpram.GAMW = params.mmxww;
00364 hwbosc.GAMMAX = params.mmv1gammax;
00365 hwhard.EMMIN = params.mmv1massinf;
00366 hwhard.EMMAX = params.mmv1masssup;
00367 }
00368 }
00369 else if(jpr == 28) {
00370 hwprop.RMASS[198] = params.mmxwm;
00371 hwpram.GAMW = params.mmxww;
00372 hwprop.RMASS[200] = params.mmxzm;
00373 hwpram.GAMZ = params.mmxzw;
00374 if(params.mmv1gammax>params.mmv2gammax)
00375 hwbosc.GAMMAX = params.mmv1gammax;
00376 else
00377 hwbosc.GAMMAX = params.mmv2gammax;
00378 }
00379 else if(jpr == 16) {
00380 hwprop.RMASS[201] = params.mmxmh0;
00381 hwprop.RMASS[6] = params.mmxmt;
00382 }
00383 else if(jpr == 17) {
00384 if(abs(hwproc.IPROC)==1705 || abs(hwproc.IPROC)==11705)
00385 hwprop.RMASS[5]= params.mmxmt;
00386 else if (abs(hwproc.IPROC)==1706 || abs(hwproc.IPROC)==11706) {
00387 hwprop.RMASS[6]= params.mmxmt;
00388 hwprop.RMASS[198] = params.mmxwm;
00389 }
00390 }
00391 else if(jpr == 26) {
00392 hwprop.RMASS[198] = params.mmxwm;
00393 hwpram.GAMW = params.mmxww;
00394 hwprop.RMASS[201] = params.mmxmh0;
00395 }
00396 else if(jpr == 27) {
00397 hwprop.RMASS[200] = params.mmxzm;
00398 hwpram.GAMZ = params.mmxzw;
00399 hwprop.RMASS[201] = params.mmxmh0;
00400 }
00401 else if(jpr == 20) {
00402 hwprop.RMASS[6] = params.mmxmt;
00403 hwprop.RMASS[198] = params.mmxwm;
00404 }
00405 else {
00406 throw edm::Exception(edm::errors::Configuration,"MCatNLOError")
00407 <<" bad process ID IPROC "<<hwproc.IPROC<<"!";
00408 }
00409 hwprop.RMASS[1] = params.mmxmass1;
00410 hwprop.RMASS[2] = params.mmxmass2;
00411 hwprop.RMASS[3] = params.mmxmass3;
00412 hwprop.RMASS[4] = params.mmxmass4;
00413 hwprop.RMASS[5] = params.mmxmass5;
00414 hwprop.RMASS[13] = params.mmxmass21;
00415
00416
00417 hwpram.SOFTME = false;
00418 hwevnt.NOWGT = false;
00419 hw6203.NEGWTS = true;
00420 hwpram.LRSUD = 0;
00421 hwpram.LWSUD = 77;
00422 hwpram.NSTRU = 8;
00423 hwpram.PRVTX = false;
00424 hwhard.PTMIN = 0.5;
00425 if(!hwevnt.NOWGT) {
00426 hwevnt.WGTMAX = 1.000001;
00427 hw6203.AVABW = 1.000001;
00428 }
00429 hwprop.RLTIM[6]=1.0e-23;
00430 hwprop.RLTIM[12]=1.0e-23;
00431 if(abs(hwproc.IPROC)==1705 || abs(hwproc.IPROC)==11705)
00432 hwpram.PSPLT[1] = 0.5;
00433
00434
00435 ParameterSet herwig_params =
00436 pset.getParameter<ParameterSet>("HerwigParameters") ;
00437
00438
00439
00440 vector<string> setNames2 =
00441 herwig_params.getParameter<vector<string> >("parameterSets");
00442
00443
00444 for ( unsigned i=0; i<setNames2.size(); ++i ) {
00445
00446 string mySet = setNames2[i];
00447
00448
00449 vector<string> pars =
00450 herwig_params.getParameter<vector<string> >(mySet);
00451
00452 header2_str << "----------------------------------------------" << "\n";
00453 header2_str << "Read HERWIG parameter set " << mySet << "\n";
00454 header2_str << "----------------------------------------------" << "\n";
00455
00456
00457 for( vector<string>::const_iterator
00458 itPar = pars.begin(); itPar != pars.end(); ++itPar ) {
00459 static string sRandomValueSetting1("NRN(1)");
00460 static string sRandomValueSetting2("NRN(2)");
00461 if( (0 == itPar->compare(0,sRandomValueSetting1.size(),sRandomValueSetting1) )||(0 == itPar->compare(0,sRandomValueSetting2.size(),sRandomValueSetting2) )) {
00462 throw edm::Exception(edm::errors::Configuration,"HerwigError")
00463 <<" attempted to set random number using HERWIG command 'NRN(.)'. This is not allowed.\n Please use the RandomNumberGeneratorService to set the random number seed.";
00464 }
00465
00466 if( ! hwgive(*itPar) ) {
00467 throw edm::Exception(edm::errors::Configuration,"HerwigError")
00468 <<" herwig did not accept the following \""<<*itPar<<"\"";
00469 }
00470 else if(printCards_){
00471 header2_str << " " << *itPar << "\n";
00472 }
00473 }
00474 }
00475
00476
00477 if(vvjin.QQIN[0]!='\0') {
00478 header2_str<<" HERWIG will be reading hard events from file: ";
00479 for(int i=0; i<50; ++i) header2_str<<vvjin.QQIN[i];
00480 header2_str<<"\n";
00481 }
00482 else {
00483 throw edm::Exception(edm::errors::Configuration,"MCatNLOError")
00484 <<" <prefix>.events file must be provided.\n Set the QQIN-parameter in the config file.";
00485 }
00486
00487 if(abs(hwproc.IPROC)<=10000) {
00488 hwgupr.LHSOFT = true;
00489 header2_str <<" HERWIG will produce underlying event."<<"\n";
00490 }
00491 else {
00492 hwgupr.LHSOFT = false;
00493 header2_str <<" HERWIG will *not* produce underlying event."<<"\n";
00494 }
00495
00497 for(int i=1; i<6; ++i)
00498 hwprop.RMASS[i+6]=hwprop.RMASS[i];
00499
00500
00501 hwprop.RMASS[199]=hwprop.RMASS[198];
00502
00503
00504 header2_str << "----------------------------------------------" << "\n";
00505 header2_str << "Setting Herwig random number generator seeds" << "\n";
00506 header2_str << "----------------------------------------------" << "\n";
00507 c = (long double)2111111111.0 * x[3] +
00508 1492.0 * (x[3] = x[2]) +
00509 1776.0 * (x[2] = x[1]) +
00510 5115.0 * (x[1] = x[0]) +
00511 x[4];
00512 x[4] = floorl(c);
00513 x[0] = c - x[4];
00514 x[4] = x[4] * (1./(65536.*65536.));
00515 hwevnt.NRN[0]=int(x[0]*99999);
00516 header2_str << " NRN(1) = "<<hwevnt.NRN[0]<<"\n";
00517 c = (long double)2111111111.0 * x[3] +
00518 1492.0 * (x[3] = x[2]) +
00519 1776.0 * (x[2] = x[1]) +
00520 5115.0 * (x[1] = x[0]) +
00521 x[4];
00522 x[4] = floorl(c);
00523 x[0] = c - x[4];
00524 hwevnt.NRN[1]=int(x[0]*99999);
00525 header2_str << " NRN(2) = "<<hwevnt.NRN[1]<<"\n";
00526
00527 hwuinc();
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557 hweini();
00558
00559 if(useJimmy_) jminit();
00560
00561 produces<HepMCProduct>();
00562 produces<GenInfoProduct, edm::InRun>();
00563
00564 header2_str << "\n----------------------------------------------" << "\n";
00565 header2_str << "Starting event generation" << "\n";
00566 header2_str << "----------------------------------------------" << "\n";
00567
00568 LogInfo("")<<header2_str.str();
00569
00570 }
00571
00572
00573 MCatNLOProducer::~MCatNLOProducer()
00574 {
00575 std::ostringstream footer_str;
00576
00577 footer_str << "----------------------------------------------" << "\n";
00578 footer_str << "Event generation done" << "\n";
00579 footer_str << "----------------------------------------------" << "\n";
00580
00581 LogInfo("")<<footer_str.str();
00582
00583 clear();
00584 }
00585
00586 void MCatNLOProducer::clear()
00587 {
00588
00589 if(useJimmy_) jmefin();
00590 }
00591
00592 void MCatNLOProducer::processHG()
00593 {
00594 hgmain();
00595 }
00596
00597 void MCatNLOProducer::processLL()
00598 {
00599 getVpar();
00600 llmain();
00601 }
00602
00603 void MCatNLOProducer::processVH()
00604 {
00605 getVpar();
00606 vhmain();
00607 }
00608
00609 void MCatNLOProducer::processVV()
00610 {
00611 vbmain();
00612 }
00613
00614 void MCatNLOProducer::processQQ()
00615 {
00616 qqmain();
00617 }
00618
00619 void MCatNLOProducer::processSB()
00620 {
00621 if(processNumber_ != -1396) getVpar();
00622 sbmain();
00623 }
00624
00625 void MCatNLOProducer::processST()
00626 {
00627 stmain();
00628 }
00629
00630 void MCatNLOProducer::processUnknown(bool positive)
00631 {
00632 if(positive)
00633 throw edm::Exception(edm::errors::Configuration,"MCatNLOError")
00634 <<" Unsupported process "<<processNumber_<<". Use Herwig6Producer for positively valued process ID.";
00635 else
00636 throw edm::Exception(edm::errors::Configuration,"MCatNLOError")
00637 <<" Unsupported process "<<processNumber_<<". Check MCatNLO manual for allowed process ID.";
00638 }
00639
00640
00641 void MCatNLOProducer::produce(Event & e, const EventSetup& es) {
00642
00643
00644 eventCounter_++;
00645 if(eventCounter_>numEvents_)
00646 throw edm::Exception(edm::errors::Configuration,"MCatNLOError") <<" No more hard events left. Either increase numHardEvents or use maxEvents { untracked int32 input = N }.";
00647
00648 hwuine();
00649 hwepro();
00650 hwbgen();
00651
00652 if(useJimmy_ && doMPInteraction_ && hwevnt.IERROR == 0) {
00653 double eventok = 0.0;
00654 eventok=hwmsct_dummy(&eventok);
00655 if(eventok > 0.5)
00656 return;
00657 }
00658
00659 hwdhob();
00660 hwcfor();
00661 hwcdec();
00662 hwdhad();
00663 hwdhvy();
00664 hwmevt();
00665 hwufne();
00666
00667 if(hwevnt.IERROR != 0)
00668 return;
00669
00670
00671 HepMC::IO_HERWIG conv;
00672
00673 HepMC::GenEvent* evt = new HepMC::GenEvent();
00674 bool ok = conv.fill_next_event( evt );
00675 if(!ok) throw edm::Exception(edm::errors::EventCorruption,"HerwigError")
00676 <<" Conversion problems in event nr." << numEvents_ << ".";
00677
00678 evt->set_signal_process_id(hwproc.IPROC);
00679 evt->weights().push_back(hwevnt.EVWGT);
00680 evt->set_event_number(numEvents_);
00681
00682
00683 if (herwigHepMCVerbosity_) {
00684 LogInfo("")<< "Event process = " << evt->signal_process_id() <<"\n"
00685 << "----------------------" << "\n";
00686 evt->print();
00687 }
00688
00689 if(evt) {
00690 auto_ptr<HepMCProduct> bare_product(new HepMCProduct());
00691 bare_product->addHepMCData(evt );
00692 e.put(bare_product);
00693 }
00694 }
00695
00696 bool MCatNLOProducer::hwgive(const std::string& ParameterString) {
00697
00698 bool accepted = 1;
00699
00700 if(!strncmp(ParameterString.c_str(),"QQIN",4))
00701 {
00702 int tostart=0;
00703 while(ParameterString.c_str()[tostart]!='=') tostart++;
00704 tostart++;
00705 while(ParameterString.c_str()[tostart]==' ') tostart++;
00706 int todo = 0;
00707 while(ParameterString.c_str()[todo+tostart]!='\0') {
00708 vvjin.QQIN[todo]=ParameterString.c_str()[todo+tostart];
00709 todo++;
00710 }
00711 for(int i=todo ;i <50+todo; ++i) vvjin.QQIN[i]=' ';
00712 }
00713 else if(!strncmp(ParameterString.c_str(),"IPROC",5)) {
00714 LogWarning("")<<" WARNING: IPROC parameter will be ignored. Use 'untracked int32 processNumber = xxx' to set IPROC.\n";
00715 }
00716 else if(!strncmp(ParameterString.c_str(),"MAXEV",5)) {
00717 LogWarning("")<<" WARNING: MAXEV parameter will be ignored. Use 'untracked int32 maxEvents = xxx' to set the number of events to be generated.\n";
00718 }
00719 else if(!strncmp(ParameterString.c_str(),"AUTPDF(",7)){
00720 LogWarning("")<<" WARNING: AUTPDF parameter *not* suported. HERWIG will use LHAPDF only.\n";
00721 }
00722 else if(!strncmp(ParameterString.c_str(),"TAUDEC",6)){
00723 int tostart=0;
00724 while(ParameterString.c_str()[tostart]!='=') tostart++;
00725 tostart++;
00726 while(ParameterString.c_str()[tostart]==' ') tostart++;
00727 int todo = 0;
00728 while(ParameterString.c_str()[todo+tostart]!='\0') {
00729 hwdspn.TAUDEC[todo]=ParameterString.c_str()[todo+tostart];
00730 todo++;
00731 }
00732 if(todo != 6) {
00733 throw edm::Exception(edm::errors::Configuration,"HerwigError")
00734 <<" Attempted to set TAUDEC to "<<hwdspn.TAUDEC<<". This is not allowed.\n Options for TAUDEC are HERWIG and TAUOLA.";
00735 }
00736 }
00737 else if(!strncmp(ParameterString.c_str(),"BDECAY",6)){
00738 LogWarning("")<<" WARNING: BDECAY parameter *not* suported. HERWIG will use default b decay.\n";
00739 }
00740 else if(!strncmp(ParameterString.c_str(),"QCDLAM",6))
00741 hwpram.QCDLAM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00742 else if(!strncmp(ParameterString.c_str(),"VQCUT",5))
00743 hwpram.VQCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00744 else if(!strncmp(ParameterString.c_str(),"VGCUT",5))
00745 hwpram.VGCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00746 else if(!strncmp(ParameterString.c_str(),"VPCUT",5))
00747 hwpram.VPCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00748 else if(!strncmp(ParameterString.c_str(),"CLMAX",5))
00749 hwpram.CLMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00750 else if(!strncmp(ParameterString.c_str(),"CLPOW",5))
00751 hwpram.CLPOW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00752 else if(!strncmp(ParameterString.c_str(),"PSPLT(1)",8))
00753 hwpram.PSPLT[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00754 else if(!strncmp(ParameterString.c_str(),"PSPLT(2)",8))
00755 hwpram.PSPLT[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00756 else if(!strncmp(ParameterString.c_str(),"QDIQK",5))
00757 hwpram.QDIQK = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00758 else if(!strncmp(ParameterString.c_str(),"PDIQK",5))
00759 hwpram.PDIQK = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00760 else if(!strncmp(ParameterString.c_str(),"QSPAC",5))
00761 hwpram.QSPAC = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00762 else if(!strncmp(ParameterString.c_str(),"PTRMS",5))
00763 hwpram.PTRMS = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00764 else if(!strncmp(ParameterString.c_str(),"IPRINT",6))
00765 hwpram.IPRINT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00766 else if(!strncmp(ParameterString.c_str(),"PRVTX",5))
00767 hwpram.PRVTX = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00768 else if(!strncmp(ParameterString.c_str(),"NPRFMT",6))
00769 hwpram.NPRFMT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00770 else if(!strncmp(ParameterString.c_str(),"PRNDEC",6))
00771 hwpram.PRNDEC = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00772 else if(!strncmp(ParameterString.c_str(),"PRNDEF",6))
00773 hwpram.PRNDEF = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00774 else if(!strncmp(ParameterString.c_str(),"PRNTEX",6))
00775 hwpram.PRNTEX = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00776 else if(!strncmp(ParameterString.c_str(),"PRNWEB",6))
00777 hwpram.PRNWEB = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00778 else if(!strncmp(ParameterString.c_str(),"MAXPR",5))
00779 hwevnt.MAXPR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00780 else if(!strncmp(ParameterString.c_str(),"MAXER",5))
00781 hwevnt.MAXER = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00782 else if(!strncmp(ParameterString.c_str(),"LWEVT",5))
00783 hwevnt.LWEVT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00784 else if(!strncmp(ParameterString.c_str(),"LRSUD",5))
00785 hwpram.LRSUD = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00786 else if(!strncmp(ParameterString.c_str(),"LWSUD",5))
00787 hwpram.LWSUD = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00788 else if(!strncmp(ParameterString.c_str(),"NRN(1)",6))
00789 hwevnt.NRN[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00790 else if(!strncmp(ParameterString.c_str(),"NRN(2)",6))
00791 hwevnt.NRN[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00792 else if(!strncmp(ParameterString.c_str(),"WGTMAX",6))
00793 hwevnt.WGTMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00794 else if(!strncmp(ParameterString.c_str(),"NOWGT",5))
00795 hwevnt.NOWGT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00796 else if(!strncmp(ParameterString.c_str(),"AVWGT",5))
00797 hwevnt.AVWGT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00798 else if(!strncmp(ParameterString.c_str(),"AZSOFT",6))
00799 hwpram.AZSOFT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00800 else if(!strncmp(ParameterString.c_str(),"AZSPIN",6))
00801 hwpram.AZSPIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00802 else if(!strncmp(ParameterString.c_str(),"HARDME",6))
00803 hwpram.HARDME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00804 else if(!strncmp(ParameterString.c_str(),"SOFTME",6))
00805 hwpram.SOFTME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00806 else if(!strncmp(ParameterString.c_str(),"GCUTME",6))
00807 hwpram.GCUTME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00808 else if(!strncmp(ParameterString.c_str(),"NCOLO",5))
00809 hwpram.NCOLO = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00810 else if(!strncmp(ParameterString.c_str(),"NFLAV",5))
00811 hwpram.NFLAV = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00812 else if(!strncmp(ParameterString.c_str(),"MODPDF(1)",9))
00813 hwpram.MODPDF[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00814 else if(!strncmp(ParameterString.c_str(),"MODPDF(2)",9))
00815 hwpram.MODPDF[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00816 else if(!strncmp(ParameterString.c_str(),"NSTRU",5))
00817 hwpram.NSTRU = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00818 else if(!strncmp(ParameterString.c_str(),"PRSOF",5))
00819 hwpram.PRSOF = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00820 else if(!strncmp(ParameterString.c_str(),"ENSOF",5))
00821 hwpram.ENSOF = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00822 else if(!strncmp(ParameterString.c_str(),"IOPREM",6))
00823 hwpram.IOPREM = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00824 else if(!strncmp(ParameterString.c_str(),"BTCLM",5))
00825 hwpram.BTCLM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00826 else if(!strncmp(ParameterString.c_str(),"ETAMIX",6))
00827 hwpram.ETAMIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00828 else if(!strncmp(ParameterString.c_str(),"PHIMIX",6))
00829 hwpram.PHIMIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00830 else if(!strncmp(ParameterString.c_str(),"H1MIX",5))
00831 hwpram.H1MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00832 else if(!strncmp(ParameterString.c_str(),"F0MIX",5))
00833 hwpram.F0MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00834 else if(!strncmp(ParameterString.c_str(),"F1MIX",5))
00835 hwpram.F1MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00836 else if(!strncmp(ParameterString.c_str(),"F2MIX",5))
00837 hwpram.F2MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00838 else if(!strncmp(ParameterString.c_str(),"ET2MIX",6))
00839 hwpram.ET2MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00840 else if(!strncmp(ParameterString.c_str(),"OMHMIX",6))
00841 hwpram.OMHMIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00842 else if(!strncmp(ParameterString.c_str(),"PH3MIX",6))
00843 hwpram.PH3MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00844 else if(!strncmp(ParameterString.c_str(),"B1LIM",5))
00845 hwpram.B1LIM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00846 else if(!strncmp(ParameterString.c_str(),"CLDIR(1)",8))
00847 hwpram.CLDIR[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00848 else if(!strncmp(ParameterString.c_str(),"CLDIR(2)",8))
00849 hwpram.CLDIR[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00850 else if(!strncmp(ParameterString.c_str(),"CLSMR(1)",8))
00851 hwpram.CLSMR[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00852 else if(!strncmp(ParameterString.c_str(),"CLSMR(2)",8))
00853 hwpram.CLSMR[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00854 else if(!strncmp(ParameterString.c_str(),"RMASS(1)",8))
00855 hwprop.RMASS[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00856 else if(!strncmp(ParameterString.c_str(),"RMASS(2)",8))
00857 hwprop.RMASS[2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00858 else if(!strncmp(ParameterString.c_str(),"RMASS(3)",8))
00859 hwprop.RMASS[3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00860 else if(!strncmp(ParameterString.c_str(),"RMASS(4)",8))
00861 hwprop.RMASS[4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00862 else if(!strncmp(ParameterString.c_str(),"RMASS(5)",8))
00863 hwprop.RMASS[5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00864 else if(!strncmp(ParameterString.c_str(),"RMASS(6)",8))
00865 hwprop.RMASS[6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00866 else if(!strncmp(ParameterString.c_str(),"RMASS(13)",9))
00867 hwprop.RMASS[13] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00868 else if(!strncmp(ParameterString.c_str(),"SUDORD",6))
00869 hwusud.SUDORD = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00870 else if(!strncmp(ParameterString.c_str(),"INTER",5))
00871 hwusud.INTER = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00872 else if(!strncmp(ParameterString.c_str(),"NEGWTS",6))
00873 hw6203.NEGWTS = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00874 else if(!strncmp(ParameterString.c_str(),"AVABW",5))
00875 hw6203.AVABW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00876 else if(!strncmp(ParameterString.c_str(),"PMBN1",5))
00877 hwminb.PMBN1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00878 else if(!strncmp(ParameterString.c_str(),"PMBN2",5))
00879 hwminb.PMBN2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00880 else if(!strncmp(ParameterString.c_str(),"PMBN3",5))
00881 hwminb.PMBN3 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00882 else if(!strncmp(ParameterString.c_str(),"PMBK1",5))
00883 hwminb.PMBK1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00884 else if(!strncmp(ParameterString.c_str(),"PMBK2",5))
00885 hwminb.PMBK2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00886 else if(!strncmp(ParameterString.c_str(),"PMBM1",5))
00887 hwminb.PMBM1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00888 else if(!strncmp(ParameterString.c_str(),"PMBM2",5))
00889 hwminb.PMBM2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00890 else if(!strncmp(ParameterString.c_str(),"PMBP1",5))
00891 hwminb.PMBP1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00892 else if(!strncmp(ParameterString.c_str(),"PMBP2",5))
00893 hwminb.PMBP2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00894 else if(!strncmp(ParameterString.c_str(),"PMBP3",5))
00895 hwminb.PMBP3 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00896 else if(!strncmp(ParameterString.c_str(),"VMIN2",5))
00897 hwdist.VMIN2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00898 else if(!strncmp(ParameterString.c_str(),"EXAG",4))
00899 hwdist.EXAG = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00900 else if(!strncmp(ParameterString.c_str(),"PRECO",5))
00901 hwuclu.PRECO = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00902 else if(!strncmp(ParameterString.c_str(),"CLRECO",6))
00903 hwuclu.CLRECO = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00904 else if(!strncmp(ParameterString.c_str(),"PWT(1)",6))
00905 hwuwts.PWT[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00906 else if(!strncmp(ParameterString.c_str(),"PWT(2)",6))
00907 hwuwts.PWT[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00908 else if(!strncmp(ParameterString.c_str(),"PWT(3)",6))
00909 hwuwts.PWT[2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00910 else if(!strncmp(ParameterString.c_str(),"PWT(4)",6))
00911 hwuwts.PWT[3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00912 else if(!strncmp(ParameterString.c_str(),"PWT(5)",6))
00913 hwuwts.PWT[4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00914 else if(!strncmp(ParameterString.c_str(),"PWT(6)",6))
00915 hwuwts.PWT[5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00916 else if(!strncmp(ParameterString.c_str(),"PWT(7)",6))
00917 hwuwts.PWT[6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00918 else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,0)",12))
00919 hwuwts.REPWT[0][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00920 else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,1)",12))
00921 hwuwts.REPWT[0][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00922 else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,2)",12))
00923 hwuwts.REPWT[0][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00924 else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,3)",12))
00925 hwuwts.REPWT[0][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00926 else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,4)",12))
00927 hwuwts.REPWT[0][0][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00928 else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,0)",12))
00929 hwuwts.REPWT[0][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00930 else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,1)",12))
00931 hwuwts.REPWT[0][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00932 else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,2)",12))
00933 hwuwts.REPWT[0][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00934 else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,3)",12))
00935 hwuwts.REPWT[0][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00936 else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,4)",12))
00937 hwuwts.REPWT[0][1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00938 else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,0)",12))
00939 hwuwts.REPWT[0][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00940 else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,1)",12))
00941 hwuwts.REPWT[0][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00942 else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,2)",12))
00943 hwuwts.REPWT[0][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00944 else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,3)",12))
00945 hwuwts.REPWT[0][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00946 else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,4)",12))
00947 hwuwts.REPWT[0][2][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00948 else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,0)",12))
00949 hwuwts.REPWT[0][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00950 else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,1)",12))
00951 hwuwts.REPWT[0][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00952 else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,2)",12))
00953 hwuwts.REPWT[0][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00954 else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,3)",12))
00955 hwuwts.REPWT[0][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00956 else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,4)",12))
00957 hwuwts.REPWT[0][3][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00958 else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,0)",12))
00959 hwuwts.REPWT[0][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00960 else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,1)",12))
00961 hwuwts.REPWT[0][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00962 else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,2)",12))
00963 hwuwts.REPWT[0][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00964 else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,3)",12))
00965 hwuwts.REPWT[0][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00966 else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,4)",12))
00967 hwuwts.REPWT[0][4][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00968 else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,0)",12))
00969 hwuwts.REPWT[1][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00970 else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,1)",12))
00971 hwuwts.REPWT[1][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00972 else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,2)",12))
00973 hwuwts.REPWT[1][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00974 else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,3)",12))
00975 hwuwts.REPWT[1][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00976 else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,4)",12))
00977 hwuwts.REPWT[1][0][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00978 else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,0)",12))
00979 hwuwts.REPWT[1][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00980 else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,1)",12))
00981 hwuwts.REPWT[1][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00982 else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,2)",12))
00983 hwuwts.REPWT[1][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00984 else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,3)",12))
00985 hwuwts.REPWT[1][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00986 else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,4)",12))
00987 hwuwts.REPWT[1][1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00988 else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,0)",12))
00989 hwuwts.REPWT[1][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00990 else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,1)",12))
00991 hwuwts.REPWT[1][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00992 else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,2)",12))
00993 hwuwts.REPWT[1][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00994 else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,3)",12))
00995 hwuwts.REPWT[1][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00996 else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,4)",12))
00997 hwuwts.REPWT[1][2][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00998 else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,0)",12))
00999 hwuwts.REPWT[1][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01000 else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,1)",12))
01001 hwuwts.REPWT[1][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01002 else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,2)",12))
01003 hwuwts.REPWT[1][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01004 else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,3)",12))
01005 hwuwts.REPWT[1][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01006 else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,4)",12))
01007 hwuwts.REPWT[1][3][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01008 else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,0)",12))
01009 hwuwts.REPWT[1][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01010 else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,1)",12))
01011 hwuwts.REPWT[1][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01012 else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,2)",12))
01013 hwuwts.REPWT[1][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01014 else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,3)",12))
01015 hwuwts.REPWT[1][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01016 else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,4)",12))
01017 hwuwts.REPWT[1][4][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01018 else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,0)",12))
01019 hwuwts.REPWT[2][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01020 else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,1)",12))
01021 hwuwts.REPWT[2][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01022 else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,2)",12))
01023 hwuwts.REPWT[2][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01024 else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,3)",12))
01025 hwuwts.REPWT[2][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01026 else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,4)",12))
01027 hwuwts.REPWT[2][0][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01028 else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,0)",12))
01029 hwuwts.REPWT[2][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01030 else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,1)",12))
01031 hwuwts.REPWT[2][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01032 else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,2)",12))
01033 hwuwts.REPWT[2][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01034 else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,3)",12))
01035 hwuwts.REPWT[2][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01036 else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,4)",12))
01037 hwuwts.REPWT[2][1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01038 else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,0)",12))
01039 hwuwts.REPWT[2][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01040 else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,1)",12))
01041 hwuwts.REPWT[2][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01042 else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,2)",12))
01043 hwuwts.REPWT[2][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01044 else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,3)",12))
01045 hwuwts.REPWT[2][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01046 else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,4)",12))
01047 hwuwts.REPWT[2][2][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01048 else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,0)",12))
01049 hwuwts.REPWT[2][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01050 else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,1)",12))
01051 hwuwts.REPWT[2][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01052 else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,2)",12))
01053 hwuwts.REPWT[2][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01054 else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,3)",12))
01055 hwuwts.REPWT[2][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01056 else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,4)",12))
01057 hwuwts.REPWT[2][3][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01058 else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,0)",12))
01059 hwuwts.REPWT[2][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01060 else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,1)",12))
01061 hwuwts.REPWT[2][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01062 else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,2)",12))
01063 hwuwts.REPWT[2][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01064 else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,3)",12))
01065 hwuwts.REPWT[2][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01066 else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,4)",12))
01067 hwuwts.REPWT[2][4][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01068 else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,0)",12))
01069 hwuwts.REPWT[3][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01070 else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,1)",12))
01071 hwuwts.REPWT[3][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01072 else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,2)",12))
01073 hwuwts.REPWT[3][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01074 else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,3)",12))
01075 hwuwts.REPWT[3][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01076 else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,4)",12))
01077 hwuwts.REPWT[3][0][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01078 else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,0)",12))
01079 hwuwts.REPWT[3][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01080 else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,1)",12))
01081 hwuwts.REPWT[3][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01082 else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,2)",12))
01083 hwuwts.REPWT[3][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01084 else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,3)",12))
01085 hwuwts.REPWT[3][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01086 else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,4)",12))
01087 hwuwts.REPWT[3][1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01088 else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,0)",12))
01089 hwuwts.REPWT[3][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01090 else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,1)",12))
01091 hwuwts.REPWT[3][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01092 else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,2)",12))
01093 hwuwts.REPWT[3][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01094 else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,3)",12))
01095 hwuwts.REPWT[3][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01096 else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,4)",12))
01097 hwuwts.REPWT[3][2][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01098 else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,0)",12))
01099 hwuwts.REPWT[3][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01100 else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,1)",12))
01101 hwuwts.REPWT[3][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01102 else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,2)",12))
01103 hwuwts.REPWT[3][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01104 else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,3)",12))
01105 hwuwts.REPWT[3][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01106 else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,4)",12))
01107 hwuwts.REPWT[3][3][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01108 else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,0)",12))
01109 hwuwts.REPWT[3][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01110 else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,1)",12))
01111 hwuwts.REPWT[3][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01112 else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,2)",12))
01113 hwuwts.REPWT[3][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01114 else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,3)",12))
01115 hwuwts.REPWT[3][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01116 else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,4)",12))
01117 hwuwts.REPWT[3][4][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01118 else if(!strncmp(ParameterString.c_str(),"SNGWT",5))
01119 hwuwts.SNGWT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01120 else if(!strncmp(ParameterString.c_str(),"DECWT",5))
01121 hwuwts.DECWT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01122 else if(!strncmp(ParameterString.c_str(),"PLTCUT",6))
01123 hwdist.PLTCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01124 else if(!strncmp(ParameterString.c_str(),"VTOCDK(",7)){
01125
01126 int ind = atoi(&ParameterString[7]);
01127 hwprop.VTOCDK[ind] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);}
01128 else if(!strncmp(ParameterString.c_str(),"VTORDK(",7)){
01129
01130 int ind = atoi(&ParameterString[7]);
01131 hwprop.VTORDK[ind] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);}
01132 else if(!strncmp(ParameterString.c_str(),"PIPSMR",6))
01133 hwdist.PIPSMR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01134 else if(!strncmp(ParameterString.c_str(),"VIPWID(1)",9))
01135 hw6202.VIPWID[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01136 else if(!strncmp(ParameterString.c_str(),"VIPWID(2)",9))
01137 hw6202.VIPWID[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01138 else if(!strncmp(ParameterString.c_str(),"VIPWID(3)",9))
01139 hw6202.VIPWID[2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01140 else if(!strncmp(ParameterString.c_str(),"MAXDKL",6))
01141 hwdist.MAXDKL = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01142 else if(!strncmp(ParameterString.c_str(),"IOPDKL",6))
01143 hwdist.IOPDKL = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01144 else if(!strncmp(ParameterString.c_str(),"DXRCYL",6))
01145 hw6202.DXRCYL = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01146 else if(!strncmp(ParameterString.c_str(),"DXZMAX",6))
01147 hw6202.DXZMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01148 else if(!strncmp(ParameterString.c_str(),"DXRSPH",6))
01149 hw6202.DXRSPH = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01150
01151
01152 else if(!strncmp(ParameterString.c_str(),"MIXING",6))
01153 hwdist.MIXING = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01154 else if(!strncmp(ParameterString.c_str(),"XMIX(1)",7))
01155 hwdist.XMIX[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01156 else if(!strncmp(ParameterString.c_str(),"XMIX(2)",7))
01157 hwdist.XMIX[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01158 else if(!strncmp(ParameterString.c_str(),"YMIX(1)",7))
01159 hwdist.YMIX[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01160 else if(!strncmp(ParameterString.c_str(),"YMIX(2)",7))
01161 hwdist.YMIX[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01162 else if(!strncmp(ParameterString.c_str(),"RMASS(198)",10))
01163 hwprop.RMASS[198] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01164 else if(!strncmp(ParameterString.c_str(),"RMASS(199)",10))
01165 hwprop.RMASS[199] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01166 else if(!strncmp(ParameterString.c_str(),"GAMW",4))
01167 hwpram.GAMW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01168 else if(!strncmp(ParameterString.c_str(),"GAMZ",4))
01169 hwpram.GAMZ = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01170 else if(!strncmp(ParameterString.c_str(),"RMASS(200)",10))
01171 hwprop.RMASS[200] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01172 else if(!strncmp(ParameterString.c_str(),"WZRFR",5))
01173 hw6202.WZRFR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01174 else if(!strncmp(ParameterString.c_str(),"MODBOS(",7)) {
01175 int ind = atoi(&ParameterString[7]);
01176 hwbosc.MODBOS[ind-1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01177 else if(!strncmp(ParameterString.c_str(),"RMASS(201)",10))
01178 hwprop.RMASS[201] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01179 else if(!strncmp(ParameterString.c_str(),"IOPHIG",6))
01180 hwbosc.IOPHIG = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01181 else if(!strncmp(ParameterString.c_str(),"GAMMAX",6))
01182 hwbosc.GAMMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01183 else if(!strncmp(ParameterString.c_str(),"ENHANC(",7)) {
01184 int ind = atoi(&ParameterString[7]);
01185 hwbosc.ENHANC[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01186 else if(!strncmp(ParameterString.c_str(),"RMASS(209)",10))
01187 hwprop.RMASS[209] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01188 else if(!strncmp(ParameterString.c_str(),"RMASS(215)",10))
01189 hwprop.RMASS[215] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01190 else if(!strncmp(ParameterString.c_str(),"ALPHEM",6))
01191 hwpram.ALPHEM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01192 else if(!strncmp(ParameterString.c_str(),"SWEIN",5))
01193 hwpram.SWEIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01194 else if(!strncmp(ParameterString.c_str(),"QFCH(",5)){
01195 int ind = atoi(&ParameterString[5]);
01196 hwpram.QFCH[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01197 else if(!strncmp(ParameterString.c_str(),"AFCH(1,",7)){
01198 int ind = atoi(&ParameterString[7]); if(ind<1||ind>2) return 0;
01199 hwpram.AFCH[ind-1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01200 else if(!strncmp(ParameterString.c_str(),"AFCH(2,",7)){
01201 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01202 hwpram.AFCH[ind-1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01203 else if(!strncmp(ParameterString.c_str(),"AFCH(3,",7)){
01204 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01205 hwpram.AFCH[ind-1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01206 else if(!strncmp(ParameterString.c_str(),"AFCH(4,",7)){
01207 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01208 hwpram.AFCH[ind-1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01209 else if(!strncmp(ParameterString.c_str(),"AFCH(5,",7)){
01210 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01211 hwpram.AFCH[ind-1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01212 else if(!strncmp(ParameterString.c_str(),"AFCH(6,",7)){
01213 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01214 hwpram.AFCH[ind-1][5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01215 else if(!strncmp(ParameterString.c_str(),"AFCH(7,",7)){
01216 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01217 hwpram.AFCH[ind-1][6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01218 else if(!strncmp(ParameterString.c_str(),"AFCH(8,",7)){
01219 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01220 hwpram.AFCH[ind-1][7] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01221 else if(!strncmp(ParameterString.c_str(),"AFCH(9,",7)){
01222 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01223 hwpram.AFCH[ind-1][8] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01224 else if(!strncmp(ParameterString.c_str(),"AFCH(10,",8)){
01225 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01226 hwpram.AFCH[ind-1][9] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01227 else if(!strncmp(ParameterString.c_str(),"AFCH(11,",8)){
01228 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01229 hwpram.AFCH[ind-1][10] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01230 else if(!strncmp(ParameterString.c_str(),"AFCH(12,",8)){
01231 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01232 hwpram.AFCH[ind-1][11] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01233 else if(!strncmp(ParameterString.c_str(),"AFCH(13,",8)){
01234 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01235 hwpram.AFCH[ind-1][12] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01236 else if(!strncmp(ParameterString.c_str(),"AFCH(14,",8)){
01237 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01238 hwpram.AFCH[ind-1][13] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01239 else if(!strncmp(ParameterString.c_str(),"AFCH(15,",8)){
01240 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01241 hwpram.AFCH[ind-1][14] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01242 else if(!strncmp(ParameterString.c_str(),"AFCH(16,",8)){
01243 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01244 hwpram.AFCH[ind-1][15] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01245 else if(!strncmp(ParameterString.c_str(),"VFCH(1,",7)){
01246 int ind = atoi(&ParameterString[7]); if(ind<1||ind>2) return 0;
01247 hwpram.VFCH[ind-1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01248 else if(!strncmp(ParameterString.c_str(),"VFCH(2,",7)){
01249 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01250 hwpram.VFCH[ind-1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01251 else if(!strncmp(ParameterString.c_str(),"VFCH(3,",7)){
01252 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01253 hwpram.VFCH[ind-1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01254 else if(!strncmp(ParameterString.c_str(),"VFCH(4,",7)){
01255 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01256 hwpram.VFCH[ind-1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01257 else if(!strncmp(ParameterString.c_str(),"VFCH(5,",7)){
01258 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01259 hwpram.VFCH[ind-1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01260 else if(!strncmp(ParameterString.c_str(),"VFCH(6,",7)){
01261 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01262 hwpram.VFCH[ind-1][5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01263 else if(!strncmp(ParameterString.c_str(),"VFCH(7,",7)){
01264 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01265 hwpram.VFCH[ind-1][6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01266 else if(!strncmp(ParameterString.c_str(),"VFCH(8,",7)){
01267 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01268 hwpram.VFCH[ind-1][7] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01269 else if(!strncmp(ParameterString.c_str(),"VFCH(9,",7)){
01270 int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01271 hwpram.VFCH[ind-1][8] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01272 else if(!strncmp(ParameterString.c_str(),"VFCH(10,",8)){
01273 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01274 hwpram.VFCH[ind-1][9] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01275 else if(!strncmp(ParameterString.c_str(),"VFCH(11,",8)){
01276 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01277 hwpram.VFCH[ind-1][10] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01278 else if(!strncmp(ParameterString.c_str(),"VFCH(12,",8)){
01279 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01280 hwpram.VFCH[ind-1][11] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01281 else if(!strncmp(ParameterString.c_str(),"VFCH(13,",8)){
01282 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01283 hwpram.VFCH[ind-1][12] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01284 else if(!strncmp(ParameterString.c_str(),"VFCH(14,",8)){
01285 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01286 hwpram.VFCH[ind-1][13] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01287 else if(!strncmp(ParameterString.c_str(),"VFCH(15,",8)){
01288 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01289 hwpram.VFCH[ind-1][14] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01290 else if(!strncmp(ParameterString.c_str(),"VFCH(16,",8)){
01291 int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01292 hwpram.VFCH[ind-1][15] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01293 else if(!strncmp(ParameterString.c_str(),"ZPRIME",6))
01294 hwpram.ZPRIME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01295 else if(!strncmp(ParameterString.c_str(),"RMASS(202)",10))
01296 hwprop.RMASS[202] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01297 else if(!strncmp(ParameterString.c_str(),"GAMZP",5))
01298 hwpram.GAMZP = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01299 else if(!strncmp(ParameterString.c_str(),"VCKM(",5)) {
01300 int ind1 = atoi(&ParameterString[5]);
01301 if(ind1<1||ind1>3) return 0;
01302 int ind2 = atoi(&ParameterString[7]);
01303 if(ind2<1||ind2>3) return 0;
01304 hwpram.VCKM[ind2][ind1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01305 else if(!strncmp(ParameterString.c_str(),"SCABI",5))
01306 hwpram.SCABI = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01307 else if(!strncmp(ParameterString.c_str(),"EPOLN(",6)) {
01308 int ind = atoi(&ParameterString[6]);
01309 if(ind<1||ind>3) return 0;
01310 hwhard.EPOLN[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01311 else if(!strncmp(ParameterString.c_str(),"PPOLN(",6)) {
01312 int ind = atoi(&ParameterString[6]);
01313 if(ind<1||ind>3) return 0;
01314 hwhard.PPOLN[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01315 else if(!strncmp(ParameterString.c_str(),"QLIM",4))
01316 hwhard.QLIM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01317 else if(!strncmp(ParameterString.c_str(),"THMAX",5))
01318 hwhard.THMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01319 else if(!strncmp(ParameterString.c_str(),"Y4JT",4))
01320 hwhard.Y4JT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01321 else if(!strncmp(ParameterString.c_str(),"DURHAM",6))
01322 hwhard.DURHAM = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01323 else if(!strncmp(ParameterString.c_str(),"IOP4JT(1)",9))
01324 hwpram.IOP4JT[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01325 else if(!strncmp(ParameterString.c_str(),"IOP4JT(2)",9))
01326 hwpram.IOP4JT[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01327 else if(!strncmp(ParameterString.c_str(),"BGSHAT",6))
01328 hwhard.BGSHAT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01329 else if(!strncmp(ParameterString.c_str(),"BREIT",5))
01330 hwbrch.BREIT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01331 else if(!strncmp(ParameterString.c_str(),"USECMF",6))
01332 hwbrch.USECMF = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01333 else if(!strncmp(ParameterString.c_str(),"NOSPAC",6))
01334 hwpram.NOSPAC = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01335 else if(!strncmp(ParameterString.c_str(),"ISPAC",5))
01336 hwpram.ISPAC = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01337 else if(!strncmp(ParameterString.c_str(),"TMNISR",6))
01338 hwhard.TMNISR = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01339 else if(!strncmp(ParameterString.c_str(),"ZMXISR",6))
01340 hwhard.ZMXISR = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01341 else if(!strncmp(ParameterString.c_str(),"ASFIXD",6))
01342 hwhard.ASFIXD = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01343 else if(!strncmp(ParameterString.c_str(),"OMEGA0",6))
01344 hwhard.OMEGA0 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01345 else if(!strncmp(ParameterString.c_str(),"IAPHIG",6))
01346 hwhard.IAPHIG = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01347 else if(!strncmp(ParameterString.c_str(),"PHOMAS",6))
01348 hwhard.PHOMAS = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01349 else if(!strncmp(ParameterString.c_str(),"PRESPL",6))
01350 hw6500.PRESPL = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01351 else if(!strncmp(ParameterString.c_str(),"PTMIN",5))
01352 hwhard.PTMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01353 else if(!strncmp(ParameterString.c_str(),"PTMAX",5))
01354 hwhard.PTMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01355 else if(!strncmp(ParameterString.c_str(),"PTPOW",5))
01356 hwhard.PTPOW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01357 else if(!strncmp(ParameterString.c_str(),"YJMIN",5))
01358 hwhard.YJMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01359 else if(!strncmp(ParameterString.c_str(),"YJMAX",5))
01360 hwhard.YJMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01361 else if(!strncmp(ParameterString.c_str(),"EMMIN",5))
01362 hwhard.EMMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01363 else if(!strncmp(ParameterString.c_str(),"EMMAX",5))
01364 hwhard.EMMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01365 else if(!strncmp(ParameterString.c_str(),"EMPOW",5))
01366 hwhard.EMPOW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01367 else if(!strncmp(ParameterString.c_str(),"Q2MIN",5))
01368 hwhard.Q2MIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01369 else if(!strncmp(ParameterString.c_str(),"Q2MAX",5))
01370 hwhard.Q2MAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01371 else if(!strncmp(ParameterString.c_str(),"Q2POW",5))
01372 hwhard.Q2POW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01373 else if(!strncmp(ParameterString.c_str(),"YBMIN",5))
01374 hwhard.YBMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01375 else if(!strncmp(ParameterString.c_str(),"YBMAX",5))
01376 hwhard.YBMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01377 else if(!strncmp(ParameterString.c_str(),"WHMIN",5))
01378 hwhard.WHMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01379 else if(!strncmp(ParameterString.c_str(),"ZJMAX",5))
01380 hwhard.ZJMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01381 else if(!strncmp(ParameterString.c_str(),"Q2WWMN",6))
01382 hwhard.Q2WWMN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01383 else if(!strncmp(ParameterString.c_str(),"Q2WWMX",6))
01384 hwhard.Q2WWMX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01385 else if(!strncmp(ParameterString.c_str(),"YWWMIN",6))
01386 hwhard.YWWMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01387 else if(!strncmp(ParameterString.c_str(),"YWWMAX",6))
01388 hwhard.YWWMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01389 else if(!strncmp(ParameterString.c_str(),"CSPEED",6))
01390 hwpram.CSPEED = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01391 else if(!strncmp(ParameterString.c_str(),"GEV2NB",6))
01392 hwpram.GEV2NB = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01393 else if(!strncmp(ParameterString.c_str(),"IBSH",4))
01394 hwhard.IBSH = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01395 else if(!strncmp(ParameterString.c_str(),"IBRN(1)",7))
01396 hwhard.IBRN[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01397 else if(!strncmp(ParameterString.c_str(),"IBRN(2)",7))
01398 hwhard.IBRN[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01399 else if(!strncmp(ParameterString.c_str(),"NQEV",4))
01400 hwusud.NQEV = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01401 else if(!strncmp(ParameterString.c_str(),"ZBINM",5))
01402 hwpram.ZBINM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01403 else if(!strncmp(ParameterString.c_str(),"NZBIN",5))
01404 hwpram.NZBIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01405 else if(!strncmp(ParameterString.c_str(),"NBTRY",5))
01406 hwpram.NBTRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01407 else if(!strncmp(ParameterString.c_str(),"NCTRY",5))
01408 hwpram.NCTRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01409 else if(!strncmp(ParameterString.c_str(),"NETRY",5))
01410 hwpram.NETRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01411 else if(!strncmp(ParameterString.c_str(),"NSTRY",5))
01412 hwpram.NSTRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01413 else if(!strncmp(ParameterString.c_str(),"ACCUR",5))
01414 hwusud.ACCUR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01415 else if(!strncmp(ParameterString.c_str(),"RPARTY",6))
01416 hwrpar.RPARTY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01417 else if(!strncmp(ParameterString.c_str(),"SUSYIN",6))
01418 hwsusy.SUSYIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01419 else if(!strncmp(ParameterString.c_str(),"LRSUSY",6))
01420 hw6202.LRSUSY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01421 else if(!strncmp(ParameterString.c_str(),"SYSPIN",6))
01422 hwdspn.SYSPIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01423 else if(!strncmp(ParameterString.c_str(),"THREEB",6))
01424 hwdspn.THREEB = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01425 else if(!strncmp(ParameterString.c_str(),"FOURB",5))
01426 hwdspn.FOURB = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01427 else if(!strncmp(ParameterString.c_str(),"LHSOFT",6))
01428 hwgupr.LHSOFT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01429 else if(!strncmp(ParameterString.c_str(),"LHGLSF",6))
01430 hwgupr.LHGLSF = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01431 else if(!strncmp(ParameterString.c_str(),"OPTM",4))
01432 hw6300.OPTM = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01433 else if(!strncmp(ParameterString.c_str(),"IOPSTP",6))
01434 hw6300.IOPSTP = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01435 else if(!strncmp(ParameterString.c_str(),"IOPSH",5))
01436 hw6300.IOPSH = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01437 else if(!strncmp(ParameterString.c_str(),"JMUEO",5))
01438 jmparm.JMUEO = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01439 else if(!strncmp(ParameterString.c_str(),"PTJIM",5))
01440 jmparm.PTJIM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01441 else if(!strncmp(ParameterString.c_str(),"JMRAD(73)",9))
01442 jmparm.JMRAD[72] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
01443
01444 else accepted = 0;
01445
01446 return accepted;
01447 }
01448
01449
01450 #ifdef NEVER
01451
01452
01453 #define hwaend hwaend_
01454
01455 extern "C" {
01456 void hwaend(){}
01457 }
01458
01459 #endif
01460
01461
01462 bool MCatNLOProducer::give(const std::string& iParm )
01463 {
01464 bool accepted = 1;
01465 if(!strncmp(iParm.c_str(),"ECM",3))
01466 params.mmecm = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01467 else if(!strncmp(iParm.c_str(),"TWIDTH",6))
01468 params.mmtwidth = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01469 else if(!strncmp(iParm.c_str(),"FREN",4))
01470 params.mmxren = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01471 else if(!strncmp(iParm.c_str(),"FFACT",5))
01472 params.mmxfh = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01473 else if(!strncmp(iParm.c_str(),"HVQMASS",7))
01474 params.mmxmt = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01475 else if(!strncmp(iParm.c_str(),"WMASS",5))
01476 params.mmxwm = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01477 else if(!strncmp(iParm.c_str(),"ZMASS",5))
01478 params.mmxzm = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01479 else if(!strncmp(iParm.c_str(),"WWIDTH",6))
01480 params.mmxww = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01481 else if(!strncmp(iParm.c_str(),"ZWIDTH",6))
01482 params.mmxzw = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01483 else if(!strncmp(iParm.c_str(),"HGGMASS",7))
01484 params.mmxmh0 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01485 else if(!strncmp(iParm.c_str(),"HGGWIDTH",8))
01486 params.mmgah = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01487 else if(!strncmp(iParm.c_str(),"IBORNHGG",8))
01488 params.mmibornex = atoi(&iParm[strcspn(iParm.c_str(),"=")+1]);
01489 else if(!strncmp(iParm.c_str(),"V1GAMMAX",8))
01490 params.mmv1gammax = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01491 else if(!strncmp(iParm.c_str(),"V1MASSINF",9))
01492 params.mmv1massinf = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01493 else if(!strncmp(iParm.c_str(),"V1MASSSUP",9))
01494 params.mmv1masssup = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01495 else if(!strncmp(iParm.c_str(),"V2GAMMAX",8))
01496 params.mmv2gammax = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01497 else if(!strncmp(iParm.c_str(),"V2MASSINF",9))
01498 params.mmv2massinf = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01499 else if(!strncmp(iParm.c_str(),"V2MASSSUP",9))
01500 params.mmv2masssup = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01501 else if(!strncmp(iParm.c_str(),"HGAMMAX",7))
01502 params.mmgammax = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01503 else if(!strncmp(iParm.c_str(),"HMASSINF",8))
01504 params.mmxmhl = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01505 else if(!strncmp(iParm.c_str(),"HMASSSUP",8))
01506 params.mmxmhu = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01507 else if(!strncmp(iParm.c_str(),"T1GAMMAX",8))
01508 para331.mmgammay1 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01509 else if(!strncmp(iParm.c_str(),"T1MASSINF",9))
01510 para331.mmym1low = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01511 else if(!strncmp(iParm.c_str(),"T1MASSSUP",9))
01512 para331.mmym1upp = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01513 else if(!strncmp(iParm.c_str(),"T2GAMMAX",8))
01514 para331.mmgammay2 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01515 else if(!strncmp(iParm.c_str(),"T2MASSINF",9))
01516 para331.mmym2low = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01517 else if(!strncmp(iParm.c_str(),"T2MASSSUP",9))
01518 para331.mmym2upp = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01519 else if(!strncmp(iParm.c_str(),"UMASS",5))
01520 params.mmxmass1 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01521 else if(!strncmp(iParm.c_str(),"DMASS",5))
01522 params.mmxmass2 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01523 else if(!strncmp(iParm.c_str(),"SMASS",5))
01524 params.mmxmass3 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01525 else if(!strncmp(iParm.c_str(),"CMASS",5))
01526 params.mmxmass4 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01527 else if(!strncmp(iParm.c_str(),"BMASS",5))
01528 params.mmxmass5 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01529 else if(!strncmp(iParm.c_str(),"GMASS",5))
01530 params.mmxmass21 = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01531 else if(!strncmp(iParm.c_str(),"VUD",3))
01532 params.mmvud = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01533 else if(!strncmp(iParm.c_str(),"VUS",3))
01534 params.mmvus = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01535 else if(!strncmp(iParm.c_str(),"VUB",3))
01536 params.mmvub = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01537 else if(!strncmp(iParm.c_str(),"VCD",3))
01538 params.mmvcd = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01539 else if(!strncmp(iParm.c_str(),"VCS",3))
01540 params.mmvcs = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01541 else if(!strncmp(iParm.c_str(),"VCB",3))
01542 params.mmvcb = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01543 else if(!strncmp(iParm.c_str(),"VTD",3))
01544 params.mmvtd = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01545 else if(!strncmp(iParm.c_str(),"VTS",3))
01546 params.mmvts = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01547 else if(!strncmp(iParm.c_str(),"VTB",3))
01548 params.mmvtb = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01549 else if(!strncmp(iParm.c_str(),"AEMRUN",6))
01550 {
01551 int tostart=0;
01552 while(iParm.c_str()[tostart]!='=') tostart++;
01553 tostart++;
01554 while(iParm.c_str()[tostart]==' ') tostart++;
01555
01556 if(!strncmp(&iParm.c_str()[tostart],"YES",3))
01557 params.mmaemrun = 0;
01558 else if(!strncmp(&iParm.c_str()[tostart],"NO",2))
01559 params.mmaemrun = 1;
01560 else
01561 return false;
01562 }
01563 else if(!strncmp(iParm.c_str(),"IPROC",5))
01564 LogWarning("")<<" WARNING: IPROC parameter will be ignored. Use 'untracked int32 processNumber = xxx' to set IPROC.\n";
01565 else if(!strncmp(iParm.c_str(),"IVCODE",6))
01566 params.mmivcode = atoi(&iParm[strcspn(iParm.c_str(),"=")+1]);
01567 else if(!strncmp(iParm.c_str(),"IL1CODE",7))
01568 params.mmil1code = atoi(&iParm[strcspn(iParm.c_str(),"=")+1]);
01569 else if(!strncmp(iParm.c_str(),"IL2CODE",7))
01570 params.mmil2code = atoi(&iParm[strcspn(iParm.c_str(),"=")+1]);
01571 else if(!strncmp(iParm.c_str(),"PART1",5) || !strncmp(iParm.c_str(),"PART2",5))
01572 LogWarning("")<<" WARNING: PARTi parameter will be ignored. Only proton-proton collisions supported. For proton-antiproton please go to Batavia (but hurry).\n";
01573 else if(!strncmp(iParm.c_str(),"PDFGROUP",8)) {
01574
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584
01585
01586
01587 LogWarning("")<<" WARNING: PDFGROUP parameter will be ignored. Only LHAPDF sets supported.\n";
01588 }
01589 else if(!strncmp(iParm.c_str(),"PDFSET",6))
01590 params.mmidpdfset = atoi(&iParm[strcspn(iParm.c_str(),"=")+1]);
01591 else if(!strncmp(iParm.c_str(),"LAMBDAFIVE",10))
01592 params.mmxlam = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01593 else if(!strncmp(iParm.c_str(),"SCHEMEOFPDF",11)) {
01594 int tostart=0;
01595 while(iParm.c_str()[tostart]!='=') tostart++;
01596 tostart++;
01597 while(iParm.c_str()[tostart]==' ') tostart++;
01598 params.mmscheme[0]=iParm.c_str()[tostart];
01599 params.mmscheme[1]=iParm.c_str()[tostart+1];
01600 }
01601 else if(!strncmp(iParm.c_str(),"LAMBDAHERW",10))
01602 params.mmxlamherw = atof(&iParm[strcspn(iParm.c_str(),"=")+1]);
01603 else if(!strncmp(iParm.c_str(),"FPREFIX",7)) {
01604 int tostart=0;
01605 while(iParm.c_str()[tostart]!='=') tostart++;
01606 tostart++;
01607 while(iParm.c_str()[tostart]==' ') tostart++;
01608 int todo = 0;
01609 while(iParm.c_str()[todo+tostart]!='\0' && todo < 10) {
01610 prefix_bases[todo]=iParm.c_str()[todo+tostart];
01611 todo++;
01612 }
01613 if(todo<10) prefix_bases[todo]='\0';
01614 }
01615 else if(!strncmp(iParm.c_str(),"EVPREFIX",8)) {
01616 int tostart=0;
01617 while(iParm.c_str()[tostart]!='=') tostart++;
01618 tostart++;
01619 while(iParm.c_str()[tostart]==' ') tostart++;
01620 int todo = 0;
01621 while(iParm.c_str()[todo+tostart]!='\0' && todo < 10) {
01622 prefix_events[todo]=iParm.c_str()[todo+tostart];
01623 todo++;
01624 }
01625 if(todo<10) prefix_events[todo]='\0';
01626 }
01627 else if(!strncmp(iParm.c_str(),"NEVENTS",7))
01628 LogWarning("")<<" WARNING: NEVENTS parameter will be ignored. Use 'untracked int32 maxEvents = xxx' to set NEVENTS."<<"\n";
01629 else if(!strncmp(iParm.c_str(),"WGTTYPE",7))
01630 params.mmiwgtnorm = atoi(&iParm[strcspn(iParm.c_str(),"=")+1]);
01631 else if(!strncmp(iParm.c_str(),"RNDEVSEED",9))
01632
01633 LogWarning("")<<" WARNING: RNDEVSEED will be ignored. Use the RandomNumberGeneratorService to set RNG seed."<<"\n";
01634 else if(!strncmp(iParm.c_str(),"BASES",5))
01635 LogWarning("")<<" WARNING: BASES parameter will be ignored."<<"\n";
01636 else if(!strncmp(iParm.c_str(),"PDFLIBRARY",10))
01637 LogWarning("")<<" WARNING: PDFLIBRARY parameter will be ignored. Only LHAPDF is supported."<<"\n";
01638 else if(!strncmp(iParm.c_str(),"HERPDF",6))
01639 LogWarning("")<<" WARNING: HERPDF parameter will be ignored. Use the same PDF as for hard event generation."<<"\n";
01640 else if(!strncmp(iParm.c_str(),"HWPATH",6))
01641 LogWarning("")<<" WARNING: HWPATH parameter is not needed and will be ignored." << "\n";
01642 else if(!strncmp(iParm.c_str(),"HWUTI",5))
01643 LogWarning("")<<" WARNING: HWUTI parameter will be ignored. Herwig utilities not needed."<<"\n";
01644 else if(!strncmp(iParm.c_str(),"HERWIGVER",9))
01645 LogWarning("")<<" WARNING: HERWIGVER parameter will be ignored. Herwig library not needed."<<"\n";
01646 else if(!strncmp(iParm.c_str(),"LHAPATH",7))
01647 LogWarning("")<<" WARNING: LHAPATH parameter will be ignored. Use the <untracked string lhapdfSetPath> parameter in order to set LHAPDF path."<<"\n";
01648 else if(!strncmp(iParm.c_str(),"LHAOFL",6))
01649 LogWarning("")<<" WARNING: LHAOFL parameter will be ignored. *** THIS WILL CHANGE IN FURTHER RELEASE ***"<<"\n";
01650 else if(!strncmp(iParm.c_str(),"PDFPATH",6))
01651 LogWarning("")<<" WARNING: PDFPATH parameter will be ignored. Only LHAPDF available."<<"\n";
01652 else if(!strncmp(iParm.c_str(),"SCRTCH",6)) {
01653 int tostart=0;
01654 while(iParm.c_str()[tostart]!='=') tostart++;
01655 tostart++;
01656 while(iParm.c_str()[tostart]==' ') tostart++;
01657 int todo = 0;
01658 while(iParm.c_str()[todo+tostart]!='\0' && todo < 70) {
01659 directory[todo]=iParm.c_str()[todo+tostart];
01660 todo++;
01661 }
01662 if(todo<70) directory[todo]='\0';
01663 }
01664
01665 else accepted = false;
01666 return accepted;
01667 }
01668
01669 void MCatNLOProducer::getVpar()
01670 {
01671 switch(abs(processNumber_)) {
01672 case(1397):case(11397):
01673 case(1351):case(1352):case(1353):case(1354):case(1355):case(1356):
01674 case(1361):case(1362):case(1363):case(1364):case(1365):case(1366):
01675 case(1371):case(1372):case(1373):case(1374):case(1375):case(1376):
01676 case(11351):case(11352):case(11353):case(11354):case(11355):case(11356):
01677 case(11361):case(11362):case(11363):case(11364):case(11365):case(11366):
01678 case(11371):case(11372):case(11373):case(11374):case(11375):case(11376):
01679 params.mmxm0 = params.mmxzm;
01680 params.mmgah = params.mmxzw;
01681 break;
01682
01683 case(2700):case(2701):case(2702):case(2703):case(2704):case(2705):case(2706):
01684 case(2707):case(2708):case(2709):case(2710):case(2711):case(2712):case(2799):
01685 case(12700):case(12701):case(12702):case(12703):case(12704):case(12705):case(12706):
01686 case(12707):case(12708):case(12709):case(12710):case(12711):case(12712):case(12799):
01687 params.mmxm0v = params.mmxzm;
01688 params.mmgav = params.mmxzw;
01689 break;
01690 case(1497):case(11497):
01691 case(1498):case(11498):
01692 case(1461):case(1462):case(1463):case(1471):case(1472):case(1473):
01693 case(11461):case(11462):case(11463):case(11471):case(11472):case(11473):
01694 params.mmxm0 = params.mmxwm;
01695 params.mmgah = params.mmxww;
01696 break;
01697
01698 case(2600):case(2601):case(2602):case(2603):case(2604):case(2605):case(2606):
01699 case(2607):case(2608):case(2609):case(2610):case(2611):case(2612):case(2699):
01700 case(12600):case(12601):case(12602):case(12603):case(12604):case(12605):case(12606):
01701 case(12607):case(12608):case(12609):case(12610):case(12611):case(12612):case(12699):
01702 params.mmxm0v = params.mmxwm;
01703 params.mmgav = params.mmxww;
01704 break;
01705 default:
01706 throw edm::Exception(edm::errors::Configuration,"MCatNLOError") <<" No such option in getVpar.";
01707 }
01708 }
01709
01710 void MCatNLOProducer::createStringFile(const std::string& fileName)
01711 {
01712
01713 bool endone = false;
01714 for(int i=0; i<100; ++i) {
01715 if(fileName.c_str()[i]=='\0') endone = true;
01716 if(!endone) fstbases.stfilename[i]=fileName.c_str()[i];
01717 else fstbases.stfilename[i]=' ';
01718 }
01719
01720
01721 char string1[81];
01722 char string2[81];
01723 std::ofstream output;
01724 output.open(fileName.c_str());
01725 int position = 0;
01726 while(directory[position]!='\0' && position < 70) {
01727 string1[position]=directory[position];
01728 string2[position]=directory[position];
01729 position++;
01730 }
01731 int position3 = position;
01732 int position2 = 0;
01733 while(prefix_bases[position2]!='\0' && position2<10) {
01734 string1[position3]=prefix_bases[position2];
01735 position3++;
01736 position2++;
01737 }
01738 string1[position3]='\0';
01739 position3 = position;
01740 position2 = 0;
01741 while(prefix_events[position2]!='\0' && position2<10) {
01742 string2[position3]=prefix_events[position2];
01743 position3++;
01744 position2++;
01745 }
01746 string2[position3]='\0';
01747 output.put('\'');
01748 for(int i=0; ;++i) {
01749 if(string1[i]=='\0') {
01750 vvjin.QQIN[i]='.';
01751 vvjin.QQIN[i+1]='e';
01752 vvjin.QQIN[i+2]='v';
01753 vvjin.QQIN[i+3]='e';
01754 vvjin.QQIN[i+4]='n';
01755 vvjin.QQIN[i+5]='t';
01756 vvjin.QQIN[i+6]='s';
01757 vvjin.QQIN[i+7]='\0';
01758 break;
01759 }
01760 else {
01761 output.put(string1[i]);
01762 vvjin.QQIN[i]=string1[i];
01763 }
01764 }
01765 output.put('\'');
01766 output.put('\n');
01767 output.put('\'');
01768 for(int i=0; ;++i) {
01769 if(string2[i]=='\0') break;
01770 else output.put(string2[i]);
01771 }
01772 output.put('\'');
01773 output.put('\n');
01774 output.close();
01775 }
01776
01777 void MCatNLOProducer::endRun(Run & r) {
01778 hwefin();
01779 auto_ptr<GenInfoProduct> giprod (new GenInfoProduct());
01780 intCrossSect = 1000.0*hwevnt.AVWGT;
01781 giprod->set_cross_section(intCrossSect);
01782 giprod->set_external_cross_section(extCrossSect);
01783 giprod->set_filter_efficiency(extFilterEff);
01784 r.put(giprod);
01785
01786 }
01787
01788 #ifdef NEVER
01789 extern "C" {
01790 void cmsending_(int* ecode) {
01791 throw edm::Exception(edm::errors::LogicError,"Herwig6Error") <<" Herwig stoped run with error code "<<*ecode<<".";
01792 }
01793 }
01794 #endif