agile is hosted by Hepforge, IPPP Durham

AlpGen.cc

Go to the documentation of this file.
00001 #include "AGILe/AlpGen/AlpGen.hh"
00002 #include "AGILe/AlpGen/AlpGenWrapper.hh"
00003 #include "AGILe/Utils.hh"
00004 // #include "HepMC/HEPEVT_Wrapper.h"
00005 
00006 
00007 //-----------------------------------------------------------------------------
00008 // Implementation file for AlpGen base class
00009 // This is the file-reading interface only. It needs to be used in conjunction
00010 // with FHerwig or FPythia. This class is only to provide access to the parameter
00011 // settings.
00012 //
00013 // Author: Andy Buckley
00014 //-----------------------------------------------------------------------------
00015 
00016 
00017 namespace AGILe {
00018 
00019 
00020   // Set string parameters
00021   bool AlpGen::setParam(const string& name, const string& value) {
00022     Generator::setParam(name, value);
00023 
00024     // Strings
00025     if (name == "ALPGENFILE") {
00026       getLog() << Log::INFO << "Setting ALPGENFILE = " << value << endl;
00027       size_t nch = (value.size() < 100) ? value.size() : 99;
00028       for (size_t i = 0; i < 100; i++) {
00029         if (i < nch) {
00030           FC_AHIO.FILENAME[i] = value.data()[i];
00031         } else {
00032           FC_AHIO.FILENAME[i] = ' ';
00033         }
00034       }
00035     }
00036 
00037     // Integers
00038     if (name == "IEXC") {
00039       getLog() << Log::INFO << "Setting ALPGEN IEXC = " << value << endl;
00040       FC_AHOPTS.IEXC = asInt(value);
00041     }
00042 
00043     // Doubles
00044     else if (name == "ETACLMAX") {
00045       getLog() << Log::INFO << "Setting ETACLMAX = " << value << endl;
00046       FC_AHOPTS.ETACLMAX = asDouble(value);
00047     }
00048 
00049     // Fallback
00050     else {
00051       //getLog() << Log::ERROR << "AlpGen doesn't have a parameter called " << name << endl;
00052       return FAILURE;
00053     }
00054     return SUCCESS;
00055   }
00056 
00057 
00058 }
Generated on Tue Mar 6 10:39:38 2012 for AGILe - A Generator Interface Library (+ executable) by  doxygen 1.6.3