00001 // -*- C++ -*- 00002 #include "AGILe/Charybdis/CharybdisFPythia.hh" 00003 #include "AGILe/FPythia/FPythia.hh" 00004 #include "AGILe/FPythia/FPythiaWrapper62.hh" 00005 #include "AGILe/Utils.hh" 00006 00007 //----------------------------------------------------------------------------- 00008 // Implementation file for class : CharybdisFPythia 00009 // This is the file-reading interface only. It needs to be used in conjunction 00010 // with FPythia. This class is only to provide access to the parameter 00011 // settings. 00012 // 00013 // Authors: Doug Gingrich 00014 // Andy Buckley 00015 //----------------------------------------------------------------------------- 00016 00017 00018 namespace AGILe { 00019 00020 00021 // Constructor 00022 CharybdisFPythia::CharybdisFPythia() { 00023 _myName = "CharybdisPythia"; 00024 00025 FC_HEPRUP.IDBMUP[0] = 2212; 00026 FC_HEPRUP.IDBMUP[1] = 2212; 00027 FC_HEPRUP.EBMUP[0] = 7000.0; 00028 FC_HEPRUP.EBMUP[1] = 7000.0; 00029 FC_HEPRUP.PDFGUP[0] = -1; 00030 FC_HEPRUP.PDFGUP[1] = -1; 00031 FC_HEPRUP.PDFSUP[0] = -1; 00032 FC_HEPRUP.PDFSUP[1] = -1; 00033 FC_PYPARS.mstp[142] = 1; 00034 } 00035 00036 00037 // Set parameters 00038 bool CharybdisFPythia::setParam(const string& name, const string& value) { 00039 // Try Charybdis param handling first 00040 bool ok = _charybdis.setParam(name, value); 00041 if (ok) return SUCCESS; 00042 // Fall back to Herwig param handling 00043 ok = FPythia::setParam(name, value); 00044 if (ok) return SUCCESS; 00045 // Fail 00046 MSG_ERROR("CharybdisFPythia doesn't have a parameter called " << name); 00047 return FAILURE; 00048 } 00049 00050 00051 } 00052 00053 00054 // Class factory 00055 extern "C" { 00056 AGILe::Generator* create() { return new AGILe::CharybdisFPythia(); } 00057 void destroy(AGILe::Generator* gen) { delete gen; } 00058 }