00001 #include "AGILe/AlpGen/AlpGenFPythia.hh" 00002 #include "AGILe/AlpGen/AlpGenWrapper.hh" 00003 #include "AGILe/Utils.hh" 00004 #include "HepMC/HEPEVT_Wrapper.h" 00005 00006 namespace AGILe { 00007 00008 00009 // Standard constructor 00010 AlpGenFPythia::AlpGenFPythia() { 00011 _myName = "AlpGenPythia"; 00012 00013 // Set flag to read from LHA event file 00014 FPythia::setParam("MSTP(143)", 1); 00015 00016 // Set the ALPGEN filename to "zhjj" by default 00017 FC_AHIO.FILENAME[0] = 'z'; 00018 FC_AHIO.FILENAME[1] = 'h'; 00019 FC_AHIO.FILENAME[2] = 'j'; 00020 FC_AHIO.FILENAME[3] = 'j'; 00021 } 00022 00023 00024 // Set string parameters 00025 bool AlpGenFPythia::setParam(const string& name, const string& value) { 00026 // Try AlpGen param handling first 00027 bool ok = _alpgen.setParam(name, value); 00028 if (ok) return SUCCESS; 00029 // Fall back to Pythia param handling 00030 ok = FPythia::setParam(name, value); 00031 if (ok) return SUCCESS; 00032 // Fail 00033 MSG_ERROR("AlpGenPythia doesn't have a parameter called " << name); 00034 return FAILURE; 00035 } 00036 00037 00039 00040 } 00041 00042 00043 // Class factory 00044 extern "C" { 00045 AGILe::Generator* create() { return new AGILe::AlpGenFPythia(); } 00046 void destroy(AGILe::Generator* gen) { delete gen; } 00047 }