CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/GeneratorInterface/PomwigInterface/plugins/PomwigProducer.cc

Go to the documentation of this file.
00001 /*
00002  *  Based on Herwig6Interface (author: Fabian Stoeckli) 
00003  * 
00004  *  Modified for PomwigProducer: Antonio.Vilela.Pereira@cern.ch
00005  */
00006 
00007 #include "PomwigProducer.h"
00008 #include "Dummies.h"
00009 #include "HWRGEN.h"
00010 
00011 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00012 #include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h"
00013 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
00014 
00015 #include "FWCore/Framework/interface/Event.h"
00016 #include "FWCore/ServiceRegistry/interface/Service.h"
00017 #include "FWCore/Utilities/interface/RandomNumberGenerator.h"
00018 #include "CLHEP/Random/JamesRandom.h"
00019 #include "CLHEP/Random/RandFlat.h"
00020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00021 #include "FWCore/Framework/interface/Run.h"
00022 
00023 #include "FWCore/Framework/interface/MakerMacros.h"
00024 
00025 #include <iostream>
00026 #include "time.h"
00027 #include <ctype.h>
00028 
00029 using namespace edm;
00030 using namespace std;
00031 
00032 #include "HepMC/HerwigWrapper.h"
00033 #include "HepMC/IO_HERWIG.h"
00034 #include "HepMC/HEPEVT_Wrapper.h"
00035 
00036 // INCLUDE JIMMY,HERWIG,LHAPDF,POMWIG COMMON BLOCKS AND FUNTIONS
00037 #include "herwig.h"
00038 
00039 extern"C" {
00040   void setpdfpath_(char*,int*);
00041   void mysetpdfpath_(char*);
00042   void setlhaparm_(char*);
00043   void setherwpdf_(void);
00044   // function to chatch 'STOP' in original HWWARN
00045   void cmsending_(int*);
00046 }
00047 
00048 #define setpdfpath setpdfpath_
00049 #define mysetpdfpath mysetpdfpath_
00050 #define setlhaparm setlhaparm_
00051 #define setherwpdf setherwpdf_
00052 #define cmsending cmsending_
00053 
00054 // -----------------  Source Code -----------------------------------------
00055 PomwigProducer::PomwigProducer( const ParameterSet & pset) :
00056   EDProducer(), evt(0), 
00057   herwigVerbosity_ (pset.getUntrackedParameter<int>("herwigVerbosity",0)),
00058   herwigHepMCVerbosity_ (pset.getUntrackedParameter<bool>("herwigHepMCVerbosity",false)),
00059   herwigLhapdfVerbosity_ (pset.getUntrackedParameter<int>("herwigLhapdfVerbosity",0)),
00060   maxEventsToPrint_ (pset.getUntrackedParameter<int>("maxEventsToPrint",0)),
00061   comEnergy_(pset.getParameter<double>("comEnergy")),
00062   printCards_(pset.getUntrackedParameter<bool>("printCards",false)),
00063   extCrossSect_(pset.getUntrackedParameter<double>("crossSection", -1.)),
00064   extFilterEff_(pset.getUntrackedParameter<double>("filterEfficiency", -1.)),
00065   survivalProbability_(pset.getParameter<double>("survivalProbability")),
00066   diffTopology_(pset.getParameter<int>("diffTopology")),
00067   h1fit_(pset.getParameter<int>("h1fit")),
00068   enableForcedDecays_(pset.getUntrackedParameter<bool>("enableForcedDecays",false)),
00069   eventNumber_(0)
00070 {
00071   useJimmy_ = false;
00072   numTrials_ = 100;
00073   doMPInteraction_ = false;
00074 
00075   std::ostringstream header_str;
00076 
00077   header_str << "----------------------------------------------\n";
00078   header_str << "Initializing PomwigProducer\n";
00079   header_str << "----------------------------------------------\n";
00080 
00081   
00082   /* herwigVerbosity Level IPRINT
00083      valid argumets are: 0: print title only
00084                          1: + print selected input parameters
00085                          2: + print table of particle codes and properties
00086                          3: + tables of Sudakov form factors  
00087               *** NOT IMPLEMENTED ***
00088       LHA vebosity:      0=silent 
00089                          1=lowkey (default) 
00090                          2=all 
00091   */
00092 
00093   header_str << "   Herwig verbosity level         = " << herwigVerbosity_ << "\n";
00094   header_str << "   LHAPDF verbosity level         = " << herwigLhapdfVerbosity_ << "\n";
00095   header_str << "   HepMC verbosity                = " << herwigHepMCVerbosity_ << "\n";
00096   header_str << "   Number of events to be printed = " << maxEventsToPrint_ << "\n";
00097 
00098 
00099   if(useJimmy_) {
00100     header_str << "   HERWIG will be using JIMMY for UE/MI." << "\n";
00101     if(doMPInteraction_) 
00102       header_str << "   JIMMY trying to generate multiple interactions." << "\n";
00103   }
00104 
00105   // setting up lhapdf path name from environment varaible (***)
00106   char* lhaPdfs = NULL;
00107   header_str <<"   Trying to find LHAPATH in environment ...";
00108   lhaPdfs = getenv("LHAPATH");
00109   std::string lhapdfSetPath = std::string(lhaPdfs);
00110   if(lhaPdfs != NULL) {
00111     header_str << " done.\n";
00112     header_str << "  Using "<< lhapdfSetPath << "\n";   
00113   }
00114   else{
00115     throw edm::Exception(edm::errors::Configuration,"PomwigError")
00116           << " Could not find LHAPATH";
00117   }
00118 
00119   // Call hwudat to set up HERWIG block data
00120   hwudat();
00121   
00122   // Setting basic parameters ...
00123   hwproc.PBEAM1 = comEnergy_/2.;
00124   hwproc.PBEAM2 = comEnergy_/2.;
00125   // Choose beam particles for POMWIG depending on topology
00126   switch (diffTopology_){
00127         case 0: //DPE
00128                 hwbmch.PART1[0]  = 'E';
00129                 hwbmch.PART1[1]  = '-';
00130                 hwbmch.PART2[0]  = 'E';
00131                 hwbmch.PART2[1]  = '-';
00132                 break;
00133         case 1: //SD survive PART1
00134                 hwbmch.PART1[0]  = 'E';
00135                 hwbmch.PART1[1]  = '-';
00136                 hwbmch.PART2[0]  = 'P';
00137                 hwbmch.PART2[1]  = ' ';
00138                 break;
00139         case 2: //SD survive PART2
00140                 hwbmch.PART1[0]  = 'P';
00141                 hwbmch.PART1[1]  = ' ';
00142                 hwbmch.PART2[0]  = 'E';
00143                 hwbmch.PART2[1]  = '-';
00144                 break;
00145         case 3: //Non diffractive
00146                 hwbmch.PART1[0]  = 'P';
00147                 hwbmch.PART1[1]  = ' ';
00148                 hwbmch.PART2[0]  = 'P';
00149                 hwbmch.PART2[1]  = ' ';
00150                 break;
00151         default:
00152                 throw edm::Exception(edm::errors::Configuration,"PomwigError")
00153           <<" Invalid Diff. Topology. Must be DPE(diffTopology = 0), SD particle 1 (diffTopology = 1), SD particle 2 (diffTopology = 2) and Non diffractive (diffTopology = 3)";
00154                 break;
00155   }
00156   for(int i=2;i<8;++i){
00157     hwbmch.PART1[i]  = ' ';
00158     hwbmch.PART2[i]  = ' ';}
00159 
00160   if(useJimmy_) jmparm.MSFLAG = 1;
00161 
00162   // initialize other common blocks ...
00163   hwigin();
00164 
00165   hwevnt.MAXER = 100000000;     // O(inf)
00166   hwpram.LWSUD = 0;             // don't write Sudakov form factors
00167   hwdspn.LWDEC = 0;             // don't write three/four body decays
00168                                 // (no fort.77 and fort.88 ...)
00169 
00170   header_str << "   MAXER set to " << hwevnt.MAXER << "\n";
00171 
00172   if(useJimmy_) jimmin();
00173   
00174   // set some 'non-herwig' defaults
00175   hwevnt.MAXPR =  maxEventsToPrint_;           // no printing out of events
00176   hwpram.IPRINT = herwigVerbosity_;            // HERWIG print out mode
00177 
00178   // Set HERWIG parameters in a single ParameterSet
00179   ParameterSet herwig_params = 
00180     pset.getParameter<ParameterSet>("HerwigParameters") ;
00181   
00182   // The parameter sets to be read (default, min bias, user ...) in the proper order.
00183   vector<string> setNames = 
00184     herwig_params.getParameter<vector<string> >("parameterSets");  
00185   
00186   // Loop over the sets
00187   for ( unsigned i=0; i<setNames.size(); ++i ) {    
00188     string mySet = setNames[i];
00189     vector<string> pars = 
00190       herwig_params.getParameter<vector<string> >(mySet);
00191     
00192     header_str << "----------------------------------------------" << "\n";
00193     header_str << "Read HERWIG parameter set " << mySet << "\n";
00194     header_str << "----------------------------------------------" << "\n";
00195     
00196     // Loop over all parameters and stop in case of mistake
00197     for( vector<string>::const_iterator  
00198            itPar = pars.begin(); itPar != pars.end(); ++itPar ) {
00199       static string sRandomValueSetting1("NRN(1)");
00200       static string sRandomValueSetting2("NRN(2)");
00201       if( (0 == itPar->compare(0,sRandomValueSetting1.size(),sRandomValueSetting1) )||(0 == itPar->compare(0,sRandomValueSetting2.size(),sRandomValueSetting2) )) {
00202         throw edm::Exception(edm::errors::Configuration,"HerwigError")
00203           <<" attempted to set random number using pythia command 'NRN(.)'. This is not allowed.\n  Please use the RandomNumberGeneratorService to set the random number seed.";
00204       }
00205       
00206       if( ! hwgive(*itPar) ) {
00207         throw edm::Exception(edm::errors::Configuration,"HerwigError") 
00208           <<" herwig did not accept the following \""<<*itPar<<"\"";
00209       }
00210       else if(printCards_)
00211         header_str << "   " << *itPar << "\n";
00212     }
00213   }
00214 
00215   // setting up herwgi RNG seeds NRN(.)
00216   header_str << "----------------------------------------------" << "\n";
00217   header_str << "Setting Herwig random number generator seeds" << "\n";
00218   header_str << "----------------------------------------------" << "\n";
00219   edm::Service<RandomNumberGenerator> rng;
00220   int wwseed = rng->mySeed();
00221   randomEngine = fRandomEngine = &(rng->getEngine());
00222   bool rngok = setRngSeeds(wwseed);
00223   if(!rngok)
00224     throw edm::Exception(edm::errors::Configuration,"HerwigError")
00225       <<" Impossible error in setting 'NRN(.)'.";
00226   header_str << "   NRN(1) = " << hwevnt.NRN[0] << "\n";
00227   header_str << "   NRN(2) = " << hwevnt.NRN[1] << "\n";
00228 
00229   // set the LHAPDF grid directory and path
00230   setherwpdf();
00231   char pdfpath[232];
00232   int pathlen = lhapdfSetPath.length();
00233   for(int i=0; i<pathlen; ++i) 
00234   pdfpath[i]=lhapdfSetPath.at(i);
00235   for(int i=pathlen; i<232; ++i) 
00236   pdfpath[i]=' ';
00237   mysetpdfpath(pdfpath);
00238 
00239   // HERWIG preparations ...
00240   hwuinc();
00241 
00242   // Function for force QQ decay is hwmodk
00243 
00244   /*
00245   C-----------------------------------------------------------------------
00246         SUBROUTINE HWMODK(IDKTMP,BRTMP,IMETMP,
00247        & IATMP,IBTMP,ICTMP,IDTMP,IETMP)
00248   C-----------------------------------------------------------------------
00249   C     Takes the decay, IDKTMP -> I-(A+B+C+D+E)-TMP, and simply stores it
00250   C     if internal pointers not set up (.NOT.DKPSET) else if pre-existing
00251   C     mode updates branching ratio BRTMP and matrix element code IMETMP,
00252   C     if -ve leaves as is. If a new mode adds to table and if consistent
00253   C     adjusts pointers,  sets CMMOM (for two-body mode) and resets RSTAB
00254   C     if necessary.  The branching ratios of any other IDKTMP decays are
00255   C     scaled by (1.-BRTMP)/(1.-BR_OLD)
00256   C-----------------------------------------------------------------------
00257   */
00258 
00259   // Initialization
00260 
00261   if(enableForcedDecays_){
00262     header_str << "\n----------------------------------------------" << "\n";
00263     header_str << "HWMODK will be called to force decays" << "\n";
00264     header_str << "----------------------------------------------" << "\n";
00265     // Get ParameterSet with settings for forcing decays
00266     ParameterSet fdecays_pset = pset.getParameter<ParameterSet>("ForcedDecaysParameters") ; 
00267     vector<int> defidktmp ;
00268     defidktmp.push_back(0) ;
00269     std::vector<int> idktmp = fdecays_pset.getUntrackedParameter< vector<int> >("Idktmp", defidktmp);
00270     vector<double> defbrtmp ;
00271     defbrtmp.push_back(0) ;
00272     std::vector<double> brtmp = fdecays_pset.getUntrackedParameter< vector<double> >("Brtmp",defbrtmp);
00273     vector<int> defimetmp ;
00274     defimetmp.push_back(0) ;
00275     std::vector<int> imetmp = fdecays_pset.getUntrackedParameter< vector<int> >("Imetmp",defimetmp);
00276     vector<int> defiatmp ;
00277     defiatmp.push_back(0) ;
00278     std::vector<int> iatmp = fdecays_pset.getUntrackedParameter< vector<int> >("Iatmp",defiatmp);
00279     vector<int> defibtmp ;
00280     defibtmp.push_back(0) ;
00281     std::vector<int> ibtmp = fdecays_pset.getUntrackedParameter< vector<int> >("Ibtmp",defibtmp);
00282     vector<int> defictmp ;
00283     defictmp.push_back(0) ;
00284     std::vector<int> ictmp = fdecays_pset.getUntrackedParameter< vector<int> >("Ictmp",defictmp);
00285     vector<int> defidtmp ;
00286     defidtmp.push_back(0) ;
00287     std::vector<int> idtmp = fdecays_pset.getUntrackedParameter< vector<int> >("Idtmp",defidtmp);
00288     vector<int> defietmp ;
00289     defietmp.push_back(0) ;
00290     std::vector<int> ietmp = fdecays_pset.getUntrackedParameter< vector<int> >("Ietmp",defietmp);
00291 
00292     for (unsigned int i = 0; i < idktmp.size(); i++){
00293         int idktmp1 = idktmp[i];
00294         double brtmp1 = brtmp[i];
00295         int imetmp1 = imetmp[i];
00296         int iatmp1 = iatmp[i];
00297         int ibtmp1 = ibtmp[i];
00298         int ictmp1 = ictmp[i];
00299         int idtmp1 = idtmp[i];
00300         int ietmp1 = ietmp[i];
00301         // Call Herwig function HWMODK
00302         header_str << "   Forcing decay " << idktmp1 << "->" << iatmp1 << "+" 
00303                                                              << ibtmp1 << "+" 
00304                                                              << ictmp1 << "+"
00305                                                              << idtmp1 << "+"
00306                                                              << ietmp1 << "  with BR " << brtmp1 << "\n";
00307         hwmodk(idktmp1, brtmp1, imetmp1, iatmp1, ibtmp1, ictmp1, idtmp1, ietmp1);
00308     }
00309   }   
00310 
00311   hwusta("PI0     ",1);
00312 
00313   // Initialize H1 pomeron/reggeon
00314   if(diffTopology_ != 3){
00315         int nstru = hwpram.NSTRU;
00316         int ifit = h1fit_;
00317         if(nstru == 9){
00318                 if((ifit <= 0)||(ifit >= 7)){
00319                         throw edm::Exception(edm::errors::Configuration,"PomwigError")
00320                         <<" Attempted to set non existant H1 1997 fit index. Has to be 1...6";
00321                 }
00322                 cout << "   H1 1997 pomeron pdf's" << endl;
00323                 cout << "   IFIT = "<< ifit << endl;
00324                 double xp = 0.1;
00325                 double Q2 = 75.0;
00326                 double xpq[13];
00327                 qcd_1994(xp,Q2,xpq,ifit);
00328         } else if(nstru == 10){
00329                 if((ifit <= 0)||(ifit >= 7)){
00330                         throw edm::Exception(edm::errors::Configuration,"PomwigError")
00331                         <<" Attempted to set non existant H1 1997 fit index. Has to be 1...6";
00332                 }
00333                 cout << "   H1 1997 reggeon pdf's" << endl;
00334                 cout << "   IFIT = "<< ifit << endl;
00335                 double xp = 0.1;
00336                 double Q2 = 75.0;
00337                 double xpq[13];
00338                 qcd_1994(xp,Q2,xpq,ifit);
00339 
00340         } else if(nstru == 12){
00341                 /*if(ifit != 1){
00342                         throw edm::Exception(edm::errors::Configuration,"PomwigError")
00343                         <<" Attempted to set non existant H1 2006 A fit index. Only IFIT=1";
00344                 }*/
00345                 ifit = 1;
00346                 cout << "   H1 2006 A pomeron pdf's" << endl;
00347                 cout << "   IFIT = "<< ifit <<endl;
00348                 double xp = 0.1;
00349                 double Q2 = 75.0;
00350                 double xpq[13];
00351                 double f2[2];
00352                 double fl[2];
00353                 double c2[2];
00354                 double cl[2];
00355                 qcd_2006(xp,Q2,ifit,xpq,f2,fl,c2,cl);
00356         } else if(nstru == 13){
00357                 /*if(ifit != 1){
00358                         throw edm::Exception(edm::errors::Configuration,"PomwigError")
00359                         <<" Attempted to set non existant H1 2006 A fit index. Only IFIT=1";
00360                 }*/
00361                 ifit = 1;
00362                 cout << "   H1 2006 A reggeon pdf's" << endl;
00363                 cout << "   IFIT = "<< ifit <<endl;
00364                 double xp = 0.1;
00365                 double Q2 = 75.0;
00366                 double xpq[13];
00367                 double f2[2];
00368                 double fl[2];
00369                 double c2[2];
00370                 double cl[2];
00371                 qcd_2006(xp,Q2,ifit,xpq,f2,fl,c2,cl);
00372         } else if(nstru == 14){
00373                 /*if(ifit != 2){
00374                         throw edm::Exception(edm::errors::Configuration,"PomwigError")
00375                         <<" Attempted to set non existant H1 2006 B fit index. Only IFIT=2";
00376                 }*/
00377                 ifit = 2;
00378                 cout << "   H1 2006 B pomeron pdf's" << endl;
00379                 cout << "   IFIT = "<< ifit <<endl;
00380                 double xp = 0.1;
00381                 double Q2 = 75.0;
00382                 double xpq[13];
00383                 double f2[2];
00384                 double fl[2];
00385                 double c2[2];
00386                 double cl[2];
00387                 qcd_2006(xp,Q2,ifit,xpq,f2,fl,c2,cl);
00388         } else if(nstru == 15){
00389                 /*if(ifit != 2){
00390                         throw edm::Exception(edm::errors::Configuration,"PomwigError")
00391                         <<" Attempted to set non existant H1 2006 B fit index. Only IFIT=2";
00392                 }*/
00393                 ifit = 2;
00394                 cout << "   H1 2006 B reggeon pdf's" << endl;
00395                 cout << "   IFIT = "<< ifit <<endl;
00396                 double xp = 0.1;
00397                 double Q2 = 75.0;
00398                 double xpq[13];
00399                 double f2[2];
00400                 double fl[2];
00401                 double c2[2];
00402                 double cl[2];
00403                 qcd_2006(xp,Q2,ifit,xpq,f2,fl,c2,cl);
00404         } else{
00405                 throw edm::Exception(edm::errors::Configuration,"PomwigError")
00406                 <<" Only running Pomeron H1 1997 (NSTRU=9), H1 2006 fit A (NSTRU=12) and H1 2006 fit B (NSTRU=14) or Reggeon H1 1997 (NSTRU=10), H1 2006 fit A (NSTRU=13) and H1 2006 fit B (NSTRU=15)";
00407         }
00408   }
00409 
00410   hweini();
00411   if(useJimmy_) jminit();
00412 
00413   produces<HepMCProduct>();
00414   produces<GenEventInfoProduct>();
00415   produces<GenRunInfoProduct, edm::InRun>();
00416 
00417   header_str << "\n----------------------------------------------" << "\n";
00418   header_str << "Starting event generation" << "\n";
00419   header_str << "----------------------------------------------" << "\n";
00420 
00421   edm::LogInfo("")<<header_str.str(); 
00422 
00423 
00424 }
00425 
00426 
00427 PomwigProducer::~PomwigProducer(){
00428 
00429   std::ostringstream footer_str;
00430 
00431   footer_str << "----------------------------------------------" << "\n";
00432   footer_str << "Event generation done" << "\n";
00433   footer_str << "----------------------------------------------" << "\n";
00434 
00435   LogInfo("") << footer_str.str();
00436 
00437   clear();
00438 }
00439 
00440 void PomwigProducer::clear() {
00441   // teminate elementary process
00442   hwefin();
00443   if(useJimmy_) jmefin();
00444 }
00445 
00446 
00447 void PomwigProducer::produce(Event & e, const EventSetup& es) {
00448 
00449   int counter = 0;
00450   double mpiok = 1.0;
00451 
00452   while(mpiok > 0.5 && counter < numTrials_) {
00453 
00454     // call herwig routines to create HEPEVT
00455     hwuine();
00456     hwepro();
00457     hwbgen();  
00458 
00459     // call jimmy ... only if event is not killed yet by HERWIG
00460     if(useJimmy_ && doMPInteraction_ && hwevnt.IERROR==0)
00461       mpiok = hwmsct_dummy(1.1);
00462     else mpiok = 0.0;
00463     counter++;
00464   }
00465   
00466   // event after numTrials MP is not ok -> skip event
00467   if(mpiok > 0.5) {
00468     LogWarning("") <<"   JIMMY could not produce MI in "<<numTrials_<<" trials.\n"<<"   Event will be skipped to prevent from deadlock.\n";
00469 
00470 // Throw an exception if generation fails.  Use the EventCorruption
00471 // exception since it maps onto SkipEvent which is what we want to do here.
00472 
00473     std::ostringstream sstr;
00474     sstr << "PomwigProducer: JIMMY could not produce MI in " << numTrials_ << " trials.\n";
00475     edm::Exception except(edm::errors::EventCorruption, sstr.str());
00476     throw except;
00477   }  
00478   
00479   hwdhob();
00480   hwcfor();
00481   hwcdec();
00482   hwdhad();
00483   hwdhvy();
00484   hwmevt();
00485   hwufne();
00486   
00487   // if event was killed by HERWIG; skip 
00488   if(hwevnt.IERROR!=0) {
00489     std::ostringstream sstr;
00490     sstr << "PomwigProducer: HERWIG indicates a failure. Abandon the event.\n";
00491     edm::Exception except(edm::errors::EventCorruption, sstr.str());
00492     throw except;
00493   }
00494 
00495   // -----------------  HepMC converter --------------------
00496   //HepMC::IO_HERWIG conv;
00497 
00498   // HEPEVT is ok, create new HepMC event
00499   evt = new HepMC::GenEvent();
00500   bool ok = conv.fill_next_event( evt );
00501   // if conversion failed; throw excpetion and stop processing
00502   if(!ok) throw cms::Exception("HerwigError")
00503     <<" Conversion problems in event nr."<< eventNumber_ << ".";  
00504 
00505   // set process id and event number
00506   evt->set_signal_process_id(hwproc.IPROC);  
00507   evt->set_event_number(eventNumber_);
00508   
00509   if (herwigHepMCVerbosity_) {
00510     LogWarning("") << "Event process = " << evt->signal_process_id() << "\n----------------------\n";
00511     evt->print();
00512   }
00513   
00514   // dummy if: event MUST be there
00515   if(evt)  {
00516     auto_ptr<HepMCProduct> bare_product(new HepMCProduct());  
00517     bare_product->addHepMCData(evt );
00518     e.put(bare_product);
00519   }
00520 
00521   std::auto_ptr<GenEventInfoProduct> genEventInfo(new GenEventInfoProduct(evt));
00522   e.put(genEventInfo);
00523   
00524   return;
00525 }
00526 
00527 // -------------------------------------------------------------------------------------------------
00528 // function to pass parameters to common blocks
00529 bool PomwigProducer::hwgive(const std::string& ParameterString) {
00530   bool accepted = 1;
00531 
00532   if(!strncmp(ParameterString.c_str(),"IPROC",5)) {
00533     hwproc.IPROC = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00534     if(hwproc.IPROC<0) {
00535       throw cms::Exception("HerwigError")
00536         <<" Attempted to set IPROC to a negative value. This is not allowed.\n Please use the McatnloProducer to cope with negative valued IPROCs.";
00537     }
00538   }
00539   else if(!strncmp(ParameterString.c_str(),"AUTPDF(",7)){
00540     LogWarning("") <<"   WARNING: AUTPDF parameter *not* suported. HERWIG will use LHAPDF."<<"\n";
00541   }
00542   else if(!strncmp(ParameterString.c_str(),"TAUDEC",6)){
00543     int tostart=0;
00544     while(ParameterString.c_str()[tostart]!='=') tostart++;
00545     tostart++;
00546     while(ParameterString.c_str()[tostart]==' ') tostart++;
00547     int todo = 0;
00548     while(ParameterString.c_str()[todo+tostart]!='\0') {
00549       hwdspn.TAUDEC[todo]=ParameterString.c_str()[todo+tostart];
00550       todo++;
00551     }
00552     if(todo != 6) {
00553       throw cms::Exception("HerwigError")
00554         <<" Attempted to set TAUDEC to "<<hwdspn.TAUDEC<<". This is not allowed.\n Options for TAUDEC are HERWIG and TAUOLA.";
00555     }
00556   }
00557   else if(!strncmp(ParameterString.c_str(),"BDECAY",6)){
00558     LogWarning("")<<"   WARNING: BDECAY parameter *not* suported. HERWIG will use default b decay."<<"\n";
00559   }
00560   else if(!strncmp(ParameterString.c_str(),"QCDLAM",6))
00561     hwpram.QCDLAM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00562   else if(!strncmp(ParameterString.c_str(),"VQCUT",5))
00563     hwpram.VQCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00564   else if(!strncmp(ParameterString.c_str(),"VGCUT",5))
00565     hwpram.VGCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00566   else if(!strncmp(ParameterString.c_str(),"VPCUT",5))
00567     hwpram.VPCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00568   else if(!strncmp(ParameterString.c_str(),"CLMAX",5))
00569     hwpram.CLMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00570   else if(!strncmp(ParameterString.c_str(),"CLPOW",5))
00571     hwpram.CLPOW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00572   else if(!strncmp(ParameterString.c_str(),"PSPLT(1)",8))
00573     hwpram.PSPLT[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
00574   else if(!strncmp(ParameterString.c_str(),"PSPLT(2)",8))
00575     hwpram.PSPLT[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00576   else if(!strncmp(ParameterString.c_str(),"QDIQK",5))
00577     hwpram.QDIQK = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00578   else if(!strncmp(ParameterString.c_str(),"PDIQK",5))
00579     hwpram.PDIQK = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00580   else if(!strncmp(ParameterString.c_str(),"QSPAC",5))
00581     hwpram.QSPAC = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00582   else if(!strncmp(ParameterString.c_str(),"PTRMS",5))
00583     hwpram.PTRMS = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00584   else if(!strncmp(ParameterString.c_str(),"IPRINT",6))
00585     hwpram.IPRINT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00586   else if(!strncmp(ParameterString.c_str(),"PRVTX",5))
00587     hwpram.PRVTX = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00588   else if(!strncmp(ParameterString.c_str(),"NPRFMT",6))
00589     hwpram.NPRFMT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00590   else if(!strncmp(ParameterString.c_str(),"PRNDEC",6))
00591     hwpram.PRNDEC = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00592   else if(!strncmp(ParameterString.c_str(),"PRNDEF",6))
00593     hwpram.PRNDEF = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00594   else if(!strncmp(ParameterString.c_str(),"PRNTEX",6))
00595     hwpram.PRNTEX = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00596   else if(!strncmp(ParameterString.c_str(),"PRNWEB",6))
00597     hwpram.PRNWEB = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00598   else if(!strncmp(ParameterString.c_str(),"MAXPR",5))
00599     hwevnt.MAXPR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00600   else if(!strncmp(ParameterString.c_str(),"MAXER",5))
00601     hwevnt.MAXER = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00602   else if(!strncmp(ParameterString.c_str(),"LWEVT",5))
00603     hwevnt.LWEVT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00604   else if(!strncmp(ParameterString.c_str(),"LRSUD",5))
00605     hwpram.LRSUD = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00606   else if(!strncmp(ParameterString.c_str(),"LWSUD",5))
00607     hwpram.LWSUD = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00608   else if(!strncmp(ParameterString.c_str(),"NRN(1)",6))
00609     hwevnt.NRN[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00610   else if(!strncmp(ParameterString.c_str(),"NRN(2)",6))
00611     hwevnt.NRN[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00612   else if(!strncmp(ParameterString.c_str(),"WGTMAX",6))
00613     hwevnt.WGTMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00614   else if(!strncmp(ParameterString.c_str(),"NOWGT",5))
00615     hwevnt.NOWGT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00616   else if(!strncmp(ParameterString.c_str(),"AVWGT",5))
00617     hwevnt.AVWGT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00618   else if(!strncmp(ParameterString.c_str(),"AZSOFT",6))
00619     hwpram.AZSOFT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00620   else if(!strncmp(ParameterString.c_str(),"AZSPIN",6))
00621     hwpram.AZSPIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00622   else if(!strncmp(ParameterString.c_str(),"HARDME",6))
00623     hwpram.HARDME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00624   else if(!strncmp(ParameterString.c_str(),"SOFTME",6))
00625     hwpram.SOFTME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00626   else if(!strncmp(ParameterString.c_str(),"GCUTME",6))
00627     hwpram.GCUTME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00628   else if(!strncmp(ParameterString.c_str(),"NCOLO",5))
00629     hwpram.NCOLO = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00630   else if(!strncmp(ParameterString.c_str(),"NFLAV",5))
00631     hwpram.NFLAV = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00632   else if(!strncmp(ParameterString.c_str(),"MODPDF(1)",9))
00633     hwpram.MODPDF[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00634   else if(!strncmp(ParameterString.c_str(),"MODPDF(2)",9))
00635     hwpram.MODPDF[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);
00636   else if(!strncmp(ParameterString.c_str(),"NSTRU",5))
00637     hwpram.NSTRU = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00638   else if(!strncmp(ParameterString.c_str(),"PRSOF",5))
00639     hwpram.PRSOF = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00640   else if(!strncmp(ParameterString.c_str(),"ENSOF",5))
00641     hwpram.ENSOF = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00642   else if(!strncmp(ParameterString.c_str(),"IOPREM",6))
00643     hwpram.IOPREM = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00644   else if(!strncmp(ParameterString.c_str(),"BTCLM",5))
00645     hwpram.BTCLM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00646   else if(!strncmp(ParameterString.c_str(),"ETAMIX",6))
00647     hwpram.ETAMIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00648   else if(!strncmp(ParameterString.c_str(),"PHIMIX",6))
00649     hwpram.PHIMIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00650   else if(!strncmp(ParameterString.c_str(),"H1MIX",5))
00651     hwpram.H1MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00652   else if(!strncmp(ParameterString.c_str(),"F0MIX",5))
00653     hwpram.F0MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00654   else if(!strncmp(ParameterString.c_str(),"F1MIX",5))
00655     hwpram.F1MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00656   else if(!strncmp(ParameterString.c_str(),"F2MIX",5))
00657     hwpram.F2MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00658   else if(!strncmp(ParameterString.c_str(),"ET2MIX",6))
00659     hwpram.ET2MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00660   else if(!strncmp(ParameterString.c_str(),"OMHMIX",6))
00661     hwpram.OMHMIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00662   else if(!strncmp(ParameterString.c_str(),"PH3MIX",6))
00663     hwpram.PH3MIX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00664   else if(!strncmp(ParameterString.c_str(),"B1LIM",5))
00665     hwpram.B1LIM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00666   else if(!strncmp(ParameterString.c_str(),"CLDIR(1)",8))
00667     hwpram.CLDIR[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00668   else if(!strncmp(ParameterString.c_str(),"CLDIR(2)",8))
00669     hwpram.CLDIR[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);   
00670   else if(!strncmp(ParameterString.c_str(),"CLSMR(1)",8))
00671     hwpram.CLSMR[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00672   else if(!strncmp(ParameterString.c_str(),"CLSMR(2)",8))
00673     hwpram.CLSMR[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00674   else if(!strncmp(ParameterString.c_str(),"RMASS(1)",8))
00675     hwprop.RMASS[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00676   else if(!strncmp(ParameterString.c_str(),"RMASS(2)",8))
00677     hwprop.RMASS[2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00678   else if(!strncmp(ParameterString.c_str(),"RMASS(3)",8))
00679     hwprop.RMASS[3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00680   else if(!strncmp(ParameterString.c_str(),"RMASS(4)",8))
00681     hwprop.RMASS[4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00682   else if(!strncmp(ParameterString.c_str(),"RMASS(5)",8))
00683     hwprop.RMASS[5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00684   else if(!strncmp(ParameterString.c_str(),"RMASS(6)",8))
00685     hwprop.RMASS[6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00686   else if(!strncmp(ParameterString.c_str(),"RMASS(13)",9))
00687     hwprop.RMASS[13] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00688   else if(!strncmp(ParameterString.c_str(),"SUDORD",6))
00689     hwusud.SUDORD = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00690   else if(!strncmp(ParameterString.c_str(),"INTER",5))
00691     hwusud.INTER = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00692   else if(!strncmp(ParameterString.c_str(),"NEGWTS",6))
00693     hw6203.NEGWTS = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00694   else if(!strncmp(ParameterString.c_str(),"PMBN1",5))
00695     hwminb.PMBN1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00696   else if(!strncmp(ParameterString.c_str(),"PMBN2",5))
00697     hwminb.PMBN2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00698   else if(!strncmp(ParameterString.c_str(),"PMBN3",5))
00699     hwminb.PMBN3 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00700   else if(!strncmp(ParameterString.c_str(),"PMBK1",5))
00701     hwminb.PMBK1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00702   else if(!strncmp(ParameterString.c_str(),"PMBK2",5))
00703     hwminb.PMBK2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00704   else if(!strncmp(ParameterString.c_str(),"PMBM1",5))
00705     hwminb.PMBM1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00706   else if(!strncmp(ParameterString.c_str(),"PMBM2",5))
00707     hwminb.PMBM2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00708   else if(!strncmp(ParameterString.c_str(),"PMBP1",5))
00709     hwminb.PMBP1 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00710   else if(!strncmp(ParameterString.c_str(),"PMBP2",5))
00711     hwminb.PMBP2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00712   else if(!strncmp(ParameterString.c_str(),"PMBP3",5))
00713     hwminb.PMBP3 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00714   else if(!strncmp(ParameterString.c_str(),"VMIN2",5))
00715     hwdist.VMIN2 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00716   else if(!strncmp(ParameterString.c_str(),"EXAG",4))
00717     hwdist.EXAG = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00718   else if(!strncmp(ParameterString.c_str(),"PRECO",5))
00719     hwuclu.PRECO = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00720   else if(!strncmp(ParameterString.c_str(),"CLRECO",6))
00721     hwuclu.CLRECO = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00722   else if(!strncmp(ParameterString.c_str(),"PWT(1)",6))
00723     hwuwts.PWT[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00724   else if(!strncmp(ParameterString.c_str(),"PWT(2)",6))
00725     hwuwts.PWT[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00726   else if(!strncmp(ParameterString.c_str(),"PWT(3)",6))
00727     hwuwts.PWT[2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00728   else if(!strncmp(ParameterString.c_str(),"PWT(4)",6))
00729     hwuwts.PWT[3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00730   else if(!strncmp(ParameterString.c_str(),"PWT(5)",6))
00731     hwuwts.PWT[4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00732   else if(!strncmp(ParameterString.c_str(),"PWT(6)",6))
00733     hwuwts.PWT[5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00734   else if(!strncmp(ParameterString.c_str(),"PWT(7)",6))
00735     hwuwts.PWT[6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00736   else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,0)",12))
00737     hwuwts.REPWT[0][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00738   else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,1)",12))
00739     hwuwts.REPWT[1][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00740   else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,2)",12))
00741     hwuwts.REPWT[2][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00742   else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,3)",12))
00743     hwuwts.REPWT[3][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00744   else if(!strncmp(ParameterString.c_str(),"REPWT(0,0,4)",12))
00745     hwuwts.REPWT[4][0][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00746   else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,0)",12))
00747     hwuwts.REPWT[0][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00748   else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,1)",12))
00749     hwuwts.REPWT[1][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00750   else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,2)",12))
00751     hwuwts.REPWT[2][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00752   else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,3)",12))
00753     hwuwts.REPWT[3][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00754   else if(!strncmp(ParameterString.c_str(),"REPWT(0,1,4)",12))
00755     hwuwts.REPWT[4][1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00756   else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,0)",12))
00757     hwuwts.REPWT[0][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00758   else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,1)",12))
00759     hwuwts.REPWT[1][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00760   else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,2)",12))
00761     hwuwts.REPWT[2][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00762   else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,3)",12))
00763     hwuwts.REPWT[3][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00764   else if(!strncmp(ParameterString.c_str(),"REPWT(0,2,4)",12))
00765     hwuwts.REPWT[4][2][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00766   else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,0)",12))
00767     hwuwts.REPWT[0][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00768   else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,1)",12))
00769     hwuwts.REPWT[1][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00770   else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,2)",12))
00771     hwuwts.REPWT[2][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00772   else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,3)",12))
00773     hwuwts.REPWT[3][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00774   else if(!strncmp(ParameterString.c_str(),"REPWT(0,3,4)",12))
00775     hwuwts.REPWT[4][3][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00776   else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,0)",12))
00777     hwuwts.REPWT[0][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00778   else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,1)",12))
00779     hwuwts.REPWT[1][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00780   else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,2)",12))
00781     hwuwts.REPWT[2][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00782   else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,3)",12))
00783     hwuwts.REPWT[3][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00784   else if(!strncmp(ParameterString.c_str(),"REPWT(0,4,4)",12))
00785     hwuwts.REPWT[4][4][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00786   else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,0)",12))
00787     hwuwts.REPWT[0][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00788   else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,1)",12))
00789     hwuwts.REPWT[1][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00790   else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,2)",12))
00791     hwuwts.REPWT[2][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00792   else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,3)",12))
00793     hwuwts.REPWT[3][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00794   else if(!strncmp(ParameterString.c_str(),"REPWT(1,0,4)",12))
00795     hwuwts.REPWT[4][0][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00796   else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,0)",12))
00797     hwuwts.REPWT[0][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00798   else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,1)",12))
00799     hwuwts.REPWT[1][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00800   else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,2)",12))
00801     hwuwts.REPWT[2][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00802   else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,3)",12))
00803     hwuwts.REPWT[3][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00804   else if(!strncmp(ParameterString.c_str(),"REPWT(1,1,4)",12))
00805     hwuwts.REPWT[4][1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00806   else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,0)",12))
00807     hwuwts.REPWT[0][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00808   else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,1)",12))
00809     hwuwts.REPWT[1][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00810   else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,2)",12))
00811     hwuwts.REPWT[2][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00812   else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,3)",12))
00813     hwuwts.REPWT[3][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00814   else if(!strncmp(ParameterString.c_str(),"REPWT(1,2,4)",12))
00815     hwuwts.REPWT[4][2][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00816   else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,0)",12))
00817     hwuwts.REPWT[0][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00818   else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,1)",12))
00819     hwuwts.REPWT[1][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00820   else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,2)",12))
00821     hwuwts.REPWT[2][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00822   else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,3)",12))
00823     hwuwts.REPWT[3][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00824   else if(!strncmp(ParameterString.c_str(),"REPWT(1,3,4)",12))
00825     hwuwts.REPWT[4][3][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00826   else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,0)",12))
00827     hwuwts.REPWT[0][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00828   else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,1)",12))
00829     hwuwts.REPWT[1][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00830   else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,2)",12))
00831     hwuwts.REPWT[2][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00832   else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,3)",12))
00833     hwuwts.REPWT[3][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00834   else if(!strncmp(ParameterString.c_str(),"REPWT(1,4,4)",12))
00835     hwuwts.REPWT[4][4][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00836   else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,0)",12))
00837     hwuwts.REPWT[0][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00838   else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,1)",12))
00839     hwuwts.REPWT[1][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00840   else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,2)",12))
00841     hwuwts.REPWT[2][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00842   else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,3)",12))
00843     hwuwts.REPWT[3][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00844   else if(!strncmp(ParameterString.c_str(),"REPWT(2,0,4)",12))
00845     hwuwts.REPWT[4][0][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00846   else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,0)",12))
00847     hwuwts.REPWT[0][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00848   else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,1)",12))
00849     hwuwts.REPWT[1][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00850   else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,2)",12))
00851     hwuwts.REPWT[2][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00852   else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,3)",12))
00853     hwuwts.REPWT[3][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00854   else if(!strncmp(ParameterString.c_str(),"REPWT(2,1,4)",12))
00855     hwuwts.REPWT[4][1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00856   else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,0)",12))
00857     hwuwts.REPWT[0][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00858   else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,1)",12))
00859     hwuwts.REPWT[1][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00860   else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,2)",12))
00861     hwuwts.REPWT[2][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00862   else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,3)",12))
00863     hwuwts.REPWT[3][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00864   else if(!strncmp(ParameterString.c_str(),"REPWT(2,2,4)",12))
00865     hwuwts.REPWT[4][2][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00866   else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,0)",12))
00867     hwuwts.REPWT[0][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00868   else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,1)",12))
00869     hwuwts.REPWT[1][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00870   else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,2)",12))
00871     hwuwts.REPWT[2][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00872   else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,3)",12))
00873     hwuwts.REPWT[3][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00874   else if(!strncmp(ParameterString.c_str(),"REPWT(2,3,4)",12))
00875     hwuwts.REPWT[4][3][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00876   else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,0)",12))
00877     hwuwts.REPWT[0][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00878   else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,1)",12))
00879     hwuwts.REPWT[1][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00880   else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,2)",12))
00881     hwuwts.REPWT[2][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00882   else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,3)",12))
00883     hwuwts.REPWT[3][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00884   else if(!strncmp(ParameterString.c_str(),"REPWT(2,4,4)",12))
00885     hwuwts.REPWT[4][4][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00886   else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,0)",12))
00887     hwuwts.REPWT[0][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00888   else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,1)",12))
00889     hwuwts.REPWT[1][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00890   else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,2)",12))
00891     hwuwts.REPWT[2][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00892   else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,3)",12))
00893     hwuwts.REPWT[3][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00894   else if(!strncmp(ParameterString.c_str(),"REPWT(3,0,4)",12))
00895     hwuwts.REPWT[4][0][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00896   else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,0)",12))
00897     hwuwts.REPWT[0][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00898   else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,1)",12))
00899     hwuwts.REPWT[1][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00900   else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,2)",12))
00901     hwuwts.REPWT[2][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00902   else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,3)",12))
00903     hwuwts.REPWT[3][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00904   else if(!strncmp(ParameterString.c_str(),"REPWT(3,1,4)",12))
00905     hwuwts.REPWT[4][1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00906   else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,0)",12))
00907     hwuwts.REPWT[0][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00908   else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,1)",12))
00909     hwuwts.REPWT[1][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00910   else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,2)",12))
00911     hwuwts.REPWT[2][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00912   else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,3)",12))
00913     hwuwts.REPWT[3][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00914   else if(!strncmp(ParameterString.c_str(),"REPWT(3,2,4)",12))
00915     hwuwts.REPWT[4][2][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00916   else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,0)",12))
00917     hwuwts.REPWT[0][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00918   else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,1)",12))
00919     hwuwts.REPWT[1][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00920   else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,2)",12))
00921     hwuwts.REPWT[2][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00922   else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,3)",12))
00923     hwuwts.REPWT[3][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00924   else if(!strncmp(ParameterString.c_str(),"REPWT(3,3,4)",12))
00925     hwuwts.REPWT[4][3][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00926   else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,0)",12))
00927     hwuwts.REPWT[0][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00928   else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,1)",12))
00929     hwuwts.REPWT[1][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00930   else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,2)",12))
00931     hwuwts.REPWT[2][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00932   else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,3)",12))
00933     hwuwts.REPWT[3][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00934   else if(!strncmp(ParameterString.c_str(),"REPWT(3,4,4)",12))
00935     hwuwts.REPWT[4][4][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00936   else if(!strncmp(ParameterString.c_str(),"SNGWT",5))
00937     hwuwts.SNGWT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00938   else if(!strncmp(ParameterString.c_str(),"DECWT",5))
00939     hwuwts.DECWT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00940   else if(!strncmp(ParameterString.c_str(),"PLTCUT",6))
00941     hwdist.PLTCUT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00942   else if(!strncmp(ParameterString.c_str(),"VTOCDK(",7)){
00943     // we find the index ...
00944     int ind = atoi(&ParameterString[7]);  
00945     hwprop.VTOCDK[ind] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);}
00946   else if(!strncmp(ParameterString.c_str(),"VTORDK(",7)){
00947     // we find the index ...
00948     int ind = atoi(&ParameterString[7]);  
00949     hwprop.VTORDK[ind] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);}
00950   else if(!strncmp(ParameterString.c_str(),"PIPSMR",6))
00951     hwdist.PIPSMR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00952   else if(!strncmp(ParameterString.c_str(),"VIPWID(1)",9))
00953     hw6202.VIPWID[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00954   else if(!strncmp(ParameterString.c_str(),"VIPWID(2)",9))
00955     hw6202.VIPWID[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00956   else if(!strncmp(ParameterString.c_str(),"VIPWID(3)",9))
00957     hw6202.VIPWID[2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00958   else if(!strncmp(ParameterString.c_str(),"MAXDKL",6))
00959     hwdist.MAXDKL = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00960   else if(!strncmp(ParameterString.c_str(),"IOPDKL",6))
00961     hwdist.IOPDKL = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00962   else if(!strncmp(ParameterString.c_str(),"DXRCYL",6))
00963     hw6202.DXRCYL = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00964   else if(!strncmp(ParameterString.c_str(),"DXZMAX",6))
00965     hw6202.DXZMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00966   else if(!strncmp(ParameterString.c_str(),"DXRSPH",6))
00967     hw6202.DXRSPH = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00968   //  else if(!strncmp(ParameterString.c_str(),"BDECAY",6))
00969   //    hwprch.BDECAY = ParameterString[strcspn(ParameterString.c_str(),"=")+1];  
00970   else if(!strncmp(ParameterString.c_str(),"MIXING",6))
00971     hwdist.MIXING = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00972   else if(!strncmp(ParameterString.c_str(),"XMIX(1)",7))
00973     hwdist.XMIX[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00974   else if(!strncmp(ParameterString.c_str(),"XMIX(2)",7))
00975     hwdist.XMIX[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00976   else if(!strncmp(ParameterString.c_str(),"YMIX(1)",7))
00977     hwdist.YMIX[0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00978   else if(!strncmp(ParameterString.c_str(),"YMIX(2)",7))
00979     hwdist.YMIX[1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);  
00980   else if(!strncmp(ParameterString.c_str(),"RMASS(198)",10))
00981     hwprop.RMASS[198] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);      
00982   else if(!strncmp(ParameterString.c_str(),"RMASS(199)",10))
00983     hwprop.RMASS[199] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);      
00984   else if(!strncmp(ParameterString.c_str(),"GAMW",4))
00985     hwpram.GAMW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);      
00986   else if(!strncmp(ParameterString.c_str(),"GAMZ",4))
00987     hwpram.GAMZ = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);      
00988   else if(!strncmp(ParameterString.c_str(),"RMASS(200)",10))
00989     hwprop.RMASS[200] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
00990   else if(!strncmp(ParameterString.c_str(),"WZRFR",5))
00991     hw6202.WZRFR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
00992   else if(!strncmp(ParameterString.c_str(),"MODBOS(",7)) {
00993     int ind = atoi(&ParameterString[7]);
00994     hwbosc.MODBOS[ind-1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
00995   else if(!strncmp(ParameterString.c_str(),"RMASS(201)",10))
00996     hwprop.RMASS[201] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
00997   else if(!strncmp(ParameterString.c_str(),"IOPHIG",6))
00998     hwbosc.IOPHIG = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
00999   else if(!strncmp(ParameterString.c_str(),"GAMMAX",6))
01000     hwbosc.GAMMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01001   else if(!strncmp(ParameterString.c_str(),"ENHANC(",7)) {
01002     int ind = atoi(&ParameterString[7]);
01003     hwbosc.ENHANC[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01004   else if(!strncmp(ParameterString.c_str(),"RMASS(209)",10))
01005     hwprop.RMASS[209] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01006   else if(!strncmp(ParameterString.c_str(),"RMASS(215)",10))
01007     hwprop.RMASS[215] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01008   else if(!strncmp(ParameterString.c_str(),"ALPHEM",6))
01009     hwpram.ALPHEM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01010   else if(!strncmp(ParameterString.c_str(),"SWEIN",5))
01011     hwpram.SWEIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01012   else if(!strncmp(ParameterString.c_str(),"QFCH(",5)){
01013     int ind = atoi(&ParameterString[5]);
01014     hwpram.QFCH[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01015   else if(!strncmp(ParameterString.c_str(),"AFCH(1,",7)){
01016     int ind = atoi(&ParameterString[7]); if(ind<1||ind>2) return 0;
01017     hwpram.AFCH[ind-1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01018   else if(!strncmp(ParameterString.c_str(),"AFCH(2,",7)){
01019     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01020     hwpram.AFCH[ind-1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01021   else if(!strncmp(ParameterString.c_str(),"AFCH(3,",7)){
01022     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01023     hwpram.AFCH[ind-1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01024   else if(!strncmp(ParameterString.c_str(),"AFCH(4,",7)){
01025     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01026     hwpram.AFCH[ind-1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01027   else if(!strncmp(ParameterString.c_str(),"AFCH(5,",7)){
01028     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01029     hwpram.AFCH[ind-1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01030   else if(!strncmp(ParameterString.c_str(),"AFCH(6,",7)){
01031     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01032     hwpram.AFCH[ind-1][5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01033   else if(!strncmp(ParameterString.c_str(),"AFCH(7,",7)){
01034     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01035     hwpram.AFCH[ind-1][6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01036   else if(!strncmp(ParameterString.c_str(),"AFCH(8,",7)){
01037     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01038     hwpram.AFCH[ind-1][7] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01039   else if(!strncmp(ParameterString.c_str(),"AFCH(9,",7)){
01040     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01041     hwpram.AFCH[ind-1][8] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01042   else if(!strncmp(ParameterString.c_str(),"AFCH(10,",8)){
01043     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01044     hwpram.AFCH[ind-1][9] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01045   else if(!strncmp(ParameterString.c_str(),"AFCH(11,",8)){
01046     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01047     hwpram.AFCH[ind-1][10] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01048   else if(!strncmp(ParameterString.c_str(),"AFCH(12,",8)){
01049     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01050     hwpram.AFCH[ind-1][11] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01051   else if(!strncmp(ParameterString.c_str(),"AFCH(13,",8)){
01052     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01053     hwpram.AFCH[ind-1][12] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01054   else if(!strncmp(ParameterString.c_str(),"AFCH(14,",8)){
01055     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01056     hwpram.AFCH[ind-1][13] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01057   else if(!strncmp(ParameterString.c_str(),"AFCH(15,",8)){
01058     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01059     hwpram.AFCH[ind-1][14] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01060   else if(!strncmp(ParameterString.c_str(),"AFCH(16,",8)){
01061     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01062     hwpram.AFCH[ind-1][15] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01063   else if(!strncmp(ParameterString.c_str(),"VFCH(1,",7)){
01064     int ind = atoi(&ParameterString[7]); if(ind<1||ind>2) return 0;
01065     hwpram.VFCH[ind-1][0] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01066   else if(!strncmp(ParameterString.c_str(),"VFCH(2,",7)){
01067     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01068     hwpram.VFCH[ind-1][1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01069   else if(!strncmp(ParameterString.c_str(),"VFCH(3,",7)){
01070     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01071     hwpram.VFCH[ind-1][2] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01072   else if(!strncmp(ParameterString.c_str(),"VFCH(4,",7)){
01073     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01074     hwpram.VFCH[ind-1][3] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01075   else if(!strncmp(ParameterString.c_str(),"VFCH(5,",7)){
01076     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01077     hwpram.VFCH[ind-1][4] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01078   else if(!strncmp(ParameterString.c_str(),"VFCH(6,",7)){
01079     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01080     hwpram.VFCH[ind-1][5] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01081   else if(!strncmp(ParameterString.c_str(),"VFCH(7,",7)){
01082     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01083     hwpram.VFCH[ind-1][6] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01084   else if(!strncmp(ParameterString.c_str(),"VFCH(8,",7)){
01085     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01086     hwpram.VFCH[ind-1][7] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01087   else if(!strncmp(ParameterString.c_str(),"VFCH(9,",7)){
01088     int ind = atoi(&ParameterString[7]);if(ind<1||ind>2) return 0;
01089     hwpram.VFCH[ind-1][8] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01090   else if(!strncmp(ParameterString.c_str(),"VFCH(10,",8)){
01091     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01092     hwpram.VFCH[ind-1][9] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01093   else if(!strncmp(ParameterString.c_str(),"VFCH(11,",8)){
01094     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01095     hwpram.VFCH[ind-1][10] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01096   else if(!strncmp(ParameterString.c_str(),"VFCH(12,",8)){
01097     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01098     hwpram.VFCH[ind-1][11] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01099   else if(!strncmp(ParameterString.c_str(),"VFCH(13,",8)){
01100     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01101     hwpram.VFCH[ind-1][12] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01102   else if(!strncmp(ParameterString.c_str(),"VFCH(14,",8)){
01103     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01104     hwpram.VFCH[ind-1][13] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01105   else if(!strncmp(ParameterString.c_str(),"VFCH(15,",8)){
01106     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01107     hwpram.VFCH[ind-1][14] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01108   else if(!strncmp(ParameterString.c_str(),"VFCH(16,",8)){
01109     int ind = atoi(&ParameterString[8]);if(ind<1||ind>2) return 0;
01110     hwpram.VFCH[ind-1][15] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01111   else if(!strncmp(ParameterString.c_str(),"ZPRIME",6))
01112     hwpram.ZPRIME = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01113   else if(!strncmp(ParameterString.c_str(),"RMASS(202)",10))
01114     hwprop.RMASS[202] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01115   else if(!strncmp(ParameterString.c_str(),"GAMZP",5))
01116     hwpram.GAMZP = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01117   else if(!strncmp(ParameterString.c_str(),"VCKM(",5)) {
01118     int ind1 = atoi(&ParameterString[5]);
01119     if(ind1<1||ind1>3) return 0;
01120     int ind2 = atoi(&ParameterString[7]);
01121     if(ind2<1||ind2>3) return 0;
01122     hwpram.VCKM[ind2][ind1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01123   else if(!strncmp(ParameterString.c_str(),"SCABI",5))
01124     hwpram.SCABI = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01125   else if(!strncmp(ParameterString.c_str(),"EPOLN(",6)) {
01126     int ind = atoi(&ParameterString[6]);
01127     if(ind<1||ind>3) return 0;
01128     hwhard.EPOLN[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01129   else if(!strncmp(ParameterString.c_str(),"PPOLN(",6)) {
01130     int ind = atoi(&ParameterString[6]);
01131     if(ind<1||ind>3) return 0;
01132     hwhard.PPOLN[ind-1] = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); }
01133   else if(!strncmp(ParameterString.c_str(),"QLIM",4))
01134     hwhard.QLIM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01135   else if(!strncmp(ParameterString.c_str(),"THMAX",5))
01136     hwhard.THMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01137   else if(!strncmp(ParameterString.c_str(),"Y4JT",4))
01138     hwhard.Y4JT = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01139   else if(!strncmp(ParameterString.c_str(),"DURHAM",6))
01140     hwhard.DURHAM = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01141   else if(!strncmp(ParameterString.c_str(),"IOP4JT(1)",9))
01142     hwpram.IOP4JT[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01143   else if(!strncmp(ParameterString.c_str(),"IOP4JT(2)",9))
01144     hwpram.IOP4JT[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01145   else if(!strncmp(ParameterString.c_str(),"BGSHAT",6))
01146     hwhard.BGSHAT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01147   else if(!strncmp(ParameterString.c_str(),"BREIT",5))
01148     hwbrch.BREIT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01149   else if(!strncmp(ParameterString.c_str(),"USECMF",6))
01150     hwbrch.USECMF = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01151   else if(!strncmp(ParameterString.c_str(),"NOSPAC",6))
01152     hwpram.NOSPAC = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01153   else if(!strncmp(ParameterString.c_str(),"ISPAC",5))
01154     hwpram.ISPAC = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01155   else if(!strncmp(ParameterString.c_str(),"TMNISR",6))
01156     hwhard.TMNISR = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01157   else if(!strncmp(ParameterString.c_str(),"ZMXISR",6))
01158     hwhard.ZMXISR = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01159   else if(!strncmp(ParameterString.c_str(),"ASFIXD",6))
01160     hwhard.ASFIXD = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01161   else if(!strncmp(ParameterString.c_str(),"OMEGA0",6))
01162     hwhard.OMEGA0 = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01163   else if(!strncmp(ParameterString.c_str(),"IAPHIG",6))
01164     hwhard.IAPHIG = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01165   else if(!strncmp(ParameterString.c_str(),"PHOMAS",6))
01166     hwhard.PHOMAS = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);         
01167   else if(!strncmp(ParameterString.c_str(),"PRESPL",6))
01168     hw6500.PRESPL = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]);            
01169   else if(!strncmp(ParameterString.c_str(),"PTMIN",5))
01170     hwhard.PTMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01171   else if(!strncmp(ParameterString.c_str(),"PTMAX",5))
01172     hwhard.PTMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01173   else if(!strncmp(ParameterString.c_str(),"PTPOW",5))
01174     hwhard.PTPOW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01175   else if(!strncmp(ParameterString.c_str(),"YJMIN",5))
01176     hwhard.YJMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01177   else if(!strncmp(ParameterString.c_str(),"YJMAX",5))
01178     hwhard.YJMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01179   else if(!strncmp(ParameterString.c_str(),"EMMIN",5))
01180     hwhard.EMMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01181   else if(!strncmp(ParameterString.c_str(),"EMMAX",5))
01182     hwhard.EMMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01183   else if(!strncmp(ParameterString.c_str(),"EMPOW",5))
01184     hwhard.EMPOW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01185   else if(!strncmp(ParameterString.c_str(),"Q2MIN",5))
01186     hwhard.Q2MIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01187   else if(!strncmp(ParameterString.c_str(),"Q2MAX",5))
01188     hwhard.Q2MAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01189   else if(!strncmp(ParameterString.c_str(),"Q2POW",5))
01190     hwhard.Q2POW = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01191   else if(!strncmp(ParameterString.c_str(),"YBMIN",5))
01192     hwhard.YBMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01193   else if(!strncmp(ParameterString.c_str(),"YBMAX",5))
01194     hwhard.YBMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01195   else if(!strncmp(ParameterString.c_str(),"WHMIN",5))
01196     hwhard.WHMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01197   else if(!strncmp(ParameterString.c_str(),"ZJMAX",5))
01198     hwhard.ZJMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01199   else if(!strncmp(ParameterString.c_str(),"Q2WWMN",6))
01200     hwhard.Q2WWMN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01201   else if(!strncmp(ParameterString.c_str(),"Q2WWMX",6))
01202     hwhard.Q2WWMX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01203   else if(!strncmp(ParameterString.c_str(),"YWWMIN",6))
01204     hwhard.YWWMIN = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01205   else if(!strncmp(ParameterString.c_str(),"YWWMAX",6))
01206     hwhard.YWWMAX = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01207   else if(!strncmp(ParameterString.c_str(),"CSPEED",6))
01208     hwpram.CSPEED = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01209   else if(!strncmp(ParameterString.c_str(),"GEV2NB",6))
01210     hwpram.GEV2NB = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01211   else if(!strncmp(ParameterString.c_str(),"IBSH",4))
01212     hwhard.IBSH = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01213   else if(!strncmp(ParameterString.c_str(),"IBRN(1)",7))
01214     hwhard.IBRN[0] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01215   else if(!strncmp(ParameterString.c_str(),"IBRN(2)",7))
01216     hwhard.IBRN[1] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01217   else if(!strncmp(ParameterString.c_str(),"NQEV",4))
01218     hwusud.NQEV = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01219   else if(!strncmp(ParameterString.c_str(),"ZBINM",5))
01220     hwpram.ZBINM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01221   else if(!strncmp(ParameterString.c_str(),"NZBIN",5))
01222     hwpram.NZBIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01223   else if(!strncmp(ParameterString.c_str(),"NBTRY",5))
01224     hwpram.NBTRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01225   else if(!strncmp(ParameterString.c_str(),"NCTRY",5))
01226     hwpram.NCTRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01227   else if(!strncmp(ParameterString.c_str(),"NETRY",5))
01228     hwpram.NETRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01229   else if(!strncmp(ParameterString.c_str(),"NSTRY",5))
01230     hwpram.NSTRY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01231   else if(!strncmp(ParameterString.c_str(),"ACCUR",5))
01232     hwusud.ACCUR = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01233   else if(!strncmp(ParameterString.c_str(),"RPARTY",6))
01234     hwrpar.RPARTY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01235   else if(!strncmp(ParameterString.c_str(),"SUSYIN",6))
01236     hwsusy.SUSYIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01237   else if(!strncmp(ParameterString.c_str(),"LRSUSY",6))
01238     hw6202.LRSUSY = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01239   else if(!strncmp(ParameterString.c_str(),"SYSPIN",6))
01240     hwdspn.SYSPIN = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01241   else if(!strncmp(ParameterString.c_str(),"THREEB",6))
01242     hwdspn.THREEB = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01243   else if(!strncmp(ParameterString.c_str(),"FOURB",5))
01244     hwdspn.FOURB = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01245   else if(!strncmp(ParameterString.c_str(),"LHSOFT",6))
01246     hwgupr.LHSOFT = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01247   else if(!strncmp(ParameterString.c_str(),"LHGLSF",6))
01248     hwgupr.LHGLSF = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01249   else if(!strncmp(ParameterString.c_str(),"OPTM",4))
01250     hw6300.OPTM = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01251   else if(!strncmp(ParameterString.c_str(),"IOPSTP",6))
01252     hw6300.IOPSTP = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01253   else if(!strncmp(ParameterString.c_str(),"IOPSH",5))
01254     hw6300.IOPSH = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01255   else if(!strncmp(ParameterString.c_str(),"JMUEO",5))
01256     jmparm.JMUEO = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01257   else if(!strncmp(ParameterString.c_str(),"PTJIM",5))
01258     jmparm.PTJIM = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01259   else if(!strncmp(ParameterString.c_str(),"JMRAD(73)",9))
01260     jmparm.JMRAD[72] = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); 
01261 
01262   else accepted = 0;
01263 
01264   return accepted;
01265 }
01266 
01267 
01268 #ifdef NEVER
01269 //-------------------------------------------------------------------------------
01270 // dummy hwaend (to be REMOVED from herwig)
01271 #define hwaend hwaend_
01272 
01273 extern "C" {
01274   void hwaend(){/*dummy*/}
01275 }
01276 //-------------------------------------------------------------------------------
01277 #endif
01278 
01279 bool PomwigProducer::setRngSeeds(int mseed)
01280 {
01281   double temx[5];
01282   for (int i=0; i<5; i++) {
01283     mseed = mseed * 29943829 - 1;
01284     temx[i] = mseed * (1./(65536.*65536.));
01285   }
01286   long double c;
01287   c = (long double)2111111111.0 * temx[3] +
01288     1492.0 * temx[2] +
01289     1776.0 * temx[1] +
01290     5115.0 * temx[0] +
01291     temx[4];
01292   temx[3] = temx[2];
01293   temx[2] = temx[1];
01294   temx[1] = temx[0];
01295   temx[4] = floorl(c);
01296   temx[0] = c - temx[4];
01297   temx[4] = temx[4] * (1./(65536.*65536.));
01298   hwevnt.NRN[0]=int(temx[0]*99999);
01299   c = (long double)2111111111.0 * temx[3] +
01300     1492.0 * temx[2] +
01301     1776.0 * temx[1] +
01302     5115.0 * temx[0] +
01303     temx[4];
01304   temx[3] = temx[2];
01305   temx[2] = temx[1];
01306   temx[1] = temx[0];
01307   temx[4] = floorl(c);
01308   temx[0] = c - temx[4];
01309   hwevnt.NRN[1]=int(temx[0]*99999);
01310 
01311   return true;
01312 }
01313 
01314 void PomwigProducer::endRun(Run & run) {
01315  
01316  double intCrossSect = 1000.0*survivalProbability_*hwevnt.AVWGT;
01317 
01318  auto_ptr<GenRunInfoProduct> genRunInfoProd (new GenRunInfoProduct());
01319  genRunInfoProd->setInternalXSec(intCrossSect);
01320  genRunInfoProd->setFilterEfficiency(extFilterEff_);
01321  genRunInfoProd->setExternalXSecLO(extCrossSect_);
01322  genRunInfoProd->setExternalXSecNLO(-1.);   
01323 
01324  run.put(genRunInfoProd);
01325 }
01326 
01327 #ifdef NEVER
01328 extern "C" {
01329   void cmsending_(int* ecode) {
01330     LogError("")<<"   ERROR: Herwig stoped run after recieving error code "<<*ecode<<".\n";
01331     throw cms::Exception("HerwigError") <<" Herwig stoped run with error code "<<*ecode<<".";
01332   }
01333 }
01334 #endif
01335 
01336 DEFINE_FWK_MODULE(PomwigProducer);