00001 // -*- C++ -*- 00002 #include "AGILe/Charybdis/Charybdis.hh" 00003 #include "AGILe/Charybdis/CharybdisWrapper.hh" 00004 #include "AGILe/Utils.hh" 00005 // #include "HepMC/HEPEVT_Wrapper.h" 00006 00007 00008 //----------------------------------------------------------------------------- 00009 // Implementation file for Charybdis helper class. 00010 // This is a single location for handling of Charybdis parameters between 00011 // several "host" generators cf. the AlpGen class. 00012 // 00013 // Authors: Doug Gingrich 00014 // Andy Buckley 00015 //----------------------------------------------------------------------------- 00016 00017 00018 namespace AGILe { 00019 00020 // Set string parameters 00021 bool Charybdis::setParam(const string& name, const string& value) { 00022 Generator::setParam(name, value); 00023 00024 // Set double-valued params 00025 if (name == "MPLNCK") { 00026 MSG_INFO("Setting ... (MPLNCK) = " << value); 00027 FC_BHPARM.MPLNCK = asDouble(value); 00028 } else if (name == "MINMSS") { 00029 MSG_INFO("Setting ... (MINMSS) = " << value); 00030 FC_BHPARM.MINMSS = asDouble(value); 00031 } else if (name == "MAXMSS") { 00032 MSG_INFO("Setting ... (MAXMSS) = " << value); 00033 FC_BHPARM.MAXMSS = asDouble(value); 00034 } else if (name == "THWMAX") { 00035 MSG_INFO("Setting ... (THWMAX) = " << value); 00036 FC_BH1003.THWMAX = asDouble(value); 00037 } else if (name == "RMMINM") { 00038 MSG_INFO("Setting ... (RMMINM) = " << value); 00039 FC_BH1003.RMMINM = asDouble(value); 00040 00041 // Set int-valued params 00042 } else if (name == "PDFGUP") { 00043 MSG_INFO("Setting Charybdis PDFGUP = " << value); 00044 FC_HEPRUP.PDFGUP[0] = asInt(value); 00045 FC_HEPRUP.PDFGUP[1] = asInt(value); 00046 } else if (name == "PDFSUP") { 00047 MSG_INFO("Setting Charybdis = " << value); 00048 FC_HEPRUP.PDFSUP[0] = asInt(value); 00049 FC_HEPRUP.PDFSUP[1] = asInt(value); 00050 } else if (name == "MSSDEF") { 00051 MSG_INFO("Setting ... (MSSDEF) = " << value); 00052 FC_BHPARM.MSSDEF = asInt(value); 00053 } else if (name == "NBODY") { 00054 MSG_INFO("Setting ... (NBODY) = " << value); 00055 FC_BHPARM.NBODY = asInt(value); 00056 } else if (name == "IBHPRN") { 00057 MSG_INFO("Setting ... (IBHPRN) = " << value); 00058 FC_BHPARM.IBHPRN = asInt(value); 00059 } else if (name == "MSSDEC") { 00060 MSG_INFO("Setting ... (MSSDEC) = " << value); 00061 FC_BHPARM.MSSDEC = asInt(value); 00062 } else if (name == "TOTDIM") { 00063 MSG_INFO("Setting ... (TOTDIM) = " << value); 00064 FC_BLACKH.TOTDIM = asInt(value); 00065 00066 // Set bool-valued params 00067 } else if (name == "TIMVAR") { 00068 MSG_INFO("Setting ... (TIMVAR) = " << value); 00069 FC_BHPARM.TIMVAR = asInt(value); 00070 } else if (name == "GTSCA") { 00071 MSG_INFO("Setting ... (GTSCA) = " << value); 00072 FC_BHPARM.GTSCA = asInt(value); 00073 } else if (name == "GRYBDY") { 00074 MSG_INFO("Setting ... (GRYBDY) = " << value); 00075 FC_BHPARM.GRYBDY = asInt(value); 00076 } else if (name == "KINCUT") { 00077 MSG_INFO("Setting ... (KINCUT) = " << value); 00078 FC_BHPARM.KINCUT = asInt(value); 00079 } else if (name == "YRCSEC") { 00080 MSG_INFO("Setting ... (YRCSEC) = " << value); 00081 FC_BH1003.YRCSEC = asInt(value); 00082 } else if (name == "RMBOIL") { 00083 MSG_INFO("Setting ... (RMBOIL) = " << value); 00084 FC_BH1003.RMBOIL = asInt(value); 00085 } else { 00086 MSG_ERROR("Charybdis doesn't have a parameter called " << name); 00087 return FAILURE; 00088 } 00089 return SUCCESS; 00090 } 00091 00092 00093 }