#include <Rapgap.hh>
Public Types | |
enum | Result { SUCCESS = 1, FAILURE = 0 } |
Really just syntactic sugar for bool returns from setParam. More... | |
Public Member Functions | |
Rapgap () | |
Standard constructor. | |
virtual | ~Rapgap () |
Destructor. | |
void | setGenSpecificInitialState (PdgCode p1=PROTON, double e1=6000.0, PdgCode p2=PROTON, double e2=7000.0) |
Set up initial state from supplied params. | |
virtual bool | setParam (const string &name, const string &value) |
Pass an string parameter to the generator. | |
virtual const string | getName () const |
Generator name. | |
void | makeEvent (HepMC::GenEvent &evt) |
Run the generator for one event. | |
virtual const double | getCrossSection () |
Set the random number generator seed. | |
void | finalize () |
Tidy up after ourselves. | |
void | setInitialState (int p1=PROTON, double e1=7000.0, int p2=PROTON, double e2=7000.0) |
Define initial state. | |
virtual const GeneratorState & | getState () |
Get a generator state object. | |
virtual void | setState (const GeneratorState &state) |
Setup the generator from a generator state object. | |
virtual void | setVersion (const std::string &version) |
Set the generator version. | |
virtual const std::string | getVersion () |
Get the generator version. This implementation is used as a last resort to determine the generator version. Ideally a specific generator will know its own version and overwrite this. Some generators (e.g. FHerwig) don't know this. | |
virtual std::string | getPDFSet (PdgCode pid) |
virtual int | getPDFMember (PdgCode pid) |
Get the PDF id number for a given particle. | |
virtual std::string | getPDFScheme (PdgCode pid) const |
Get the PDF scheme used by the generator (LHAPDF or other). | |
virtual void | setSeed (const int value) |
Set the random number generator seed. | |
virtual bool | setParam (const std::string &name, const int &value) |
Pass an int-valued parameter to the generator. | |
virtual bool | setParam (const std::string &name, const unsigned int &value) |
Pass an int-valued parameter to the generator. | |
virtual bool | setParam (const std::string &name, const long &value) |
Pass an int-valued parameter to the generator. | |
virtual bool | setParam (const std::string &name, const unsigned long &value) |
Pass an int-valued parameter to the generator. | |
virtual bool | setParam (const std::string &name, const double &value) |
Pass a double/float-valued parameter to the generator. | |
virtual bool | setParam (const std::string &name, const float &value) |
Pass a double/float-valued parameter to the generator. | |
virtual bool | setParam (const std::string &name, const bool &value) |
Pass a bool-valued parameter to the generator. | |
virtual bool | setParam (const std::string &name, const std::string &value) |
Pass a string-valued parameter to the generator. | |
Protected Member Functions | |
void | initialize () |
Set up default params etc. | |
void | fillEvent (HepMC::GenEvent &evt) |
Fill a HepMC event. | |
Log & | getLog () const |
Get named logger. | |
virtual void | clearEvent (HepMC::GenEvent &evt) |
Clear the supplied event. | |
Protected Attributes | |
string | _particleName1 |
Internal storage of initial state params. | |
string | _particleName2 |
double | _e1 |
double | _e2 |
int | _nevt |
Event counter. | |
HepMC::IO_HEPEVT | _hepevt |
HEPEVT->HepMC converter. | |
double | _crossSection |
bool | _initialstateset |
Flag for detecting whether the setInitialState method has run. | |
bool | _initialized |
Flag for detecting whether the initialization method has run. | |
map< PdgCode, std::string > | _particleNames |
Collection of translated names for particles. | |
string | _myName |
Generator name. |
Abstract base class for Rapgap interface
Definition at line 13 of file Rapgap.hh.
enum Result [inherited] |
Really just syntactic sugar for bool returns from setParam.
Definition at line 37 of file Generator.hh.
Rapgap | ( | ) |
Standard constructor.
Definition at line 25 of file Rapgap.cc.
References Rapgap::_nevt, Generator::_particleNames, AGILe::ANTIMUON, AGILe::ANTINEUTRON, AGILe::ANTIPROTON, AGILe::ELECTRON, AGILe::MUON, AGILe::NEUTRON, AGILe::NU_E, AGILe::NU_EBAR, AGILe::NU_MU, AGILe::NU_MUBAR, AGILe::NU_TAU, AGILe::NU_TAUBAR, AGILe::PHOTON, AGILe::PIMINUS, AGILe::PIPLUS, AGILe::POSITRON, and AGILe::PROTON.
00025 { 00026 HepMC::HEPEVT_Wrapper::set_sizeof_real(8); 00027 00028 _particleNames[ELECTRON] = "e-"; 00029 _particleNames[POSITRON] = "e+"; 00030 _particleNames[PROTON] = "p+"; 00031 _particleNames[ANTIPROTON] = "pbar-"; 00032 _particleNames[NEUTRON] = "n0"; 00033 _particleNames[ANTINEUTRON] = "nbar0"; 00034 _particleNames[PHOTON] = "gamma"; 00035 _particleNames[MUON] = "mu-"; 00036 _particleNames[ANTIMUON] = "mu+"; 00037 // TAU, ANTITAU 00038 _particleNames[NU_E] = "nu_e"; 00039 _particleNames[NU_EBAR] = "nu_ebar"; 00040 _particleNames[NU_MU] = "nu_mu"; 00041 _particleNames[NU_MUBAR] = "nu_mubar"; 00042 _particleNames[NU_TAU] = "nu_tau"; 00043 _particleNames[NU_TAUBAR] = "nu_taubar"; 00044 _particleNames[PIPLUS] = "pi+"; 00045 _particleNames[PIMINUS] = "pi-"; 00046 00047 // Start counting events at 1. 00048 _nevt = 1; 00049 }
virtual ~Rapgap | ( | ) | [inline, virtual] |
virtual void clearEvent | ( | HepMC::GenEvent & | evt | ) | [inline, protected, virtual, inherited] |
Clear the supplied event.
Definition at line 275 of file Generator.hh.
Referenced by Generator::makeEvent(), FHerwigJimmy::makeEvent(), and AlpGenFHerwigJimmy::makeEvent().
void fillEvent | ( | HepMC::GenEvent & | evt | ) | [protected] |
Fill a HepMC event.
Definition at line 139 of file Rapgap.cc.
References Rapgap::_hepevt, Log::DEBUG, FC_EFFIC, AGILe::fixHepMCUnitsFromGeVmm(), Rapgap::getCrossSection(), Generator::getLog(), and xsec.
Referenced by Rapgap::makeEvent().
00139 { 00140 _hepevt.fill_next_event(&evt); 00141 fixHepMCUnitsFromGeVmm(evt); 00142 #ifdef HEPMC_HAS_CROSS_SECTION 00143 const double xsecval = getCrossSection(); 00144 const double xsecerr = FC_EFFIC.SD; 00145 getLog() << Log::DEBUG << "Writing cross-section = " << xsecval << " +- " << xsecerr << endl; 00146 HepMC::GenCrossSection xsec; 00147 xsec.set_cross_section(xsecval, xsecerr); 00148 evt.set_cross_section(xsec); 00149 #endif 00150 }
void finalize | ( | ) | [virtual] |
Tidy up after ourselves.
Implements Generator.
Definition at line 223 of file Rapgap.cc.
References call_raend(), Generator::getLog(), and Log::INFO.
00223 { 00224 getLog() << Log::INFO << "Finalising..." << endl; 00225 // Print out stats from run 00226 call_raend(20); 00227 }
const double getCrossSection | ( | ) | [virtual] |
Set the random number generator seed.
Return the generated cross section in pb.
Reimplemented from Generator.
Definition at line 152 of file Rapgap.cc.
References Generator::_crossSection, and FC_EFFIC.
Referenced by Rapgap::fillEvent().
00152 { 00153 _crossSection = FC_EFFIC.AVGI * 1000.0; 00154 return _crossSection; 00155 }
Log& getLog | ( | ) | const [inline, protected, inherited] |
Get named logger.
Definition at line 257 of file Generator.hh.
References Generator::getName().
Referenced by Rapgap::fillEvent(), Phojet::fillEvent(), Cascade::fillEvent(), Ariadne::fillEvent(), Rapgap::finalize(), Phojet::finalize(), Cascade::finalize(), Ariadne::finalize(), Rapgap::initialize(), Cascade::initialize(), Cascade::makeEvent(), Rapgap::setGenSpecificInitialState(), Phojet::setGenSpecificInitialState(), Cascade::setGenSpecificInitialState(), Ariadne::setGenSpecificInitialState(), Rapgap::setParam(), Cascade::setParam(), and AlpGen::setParam().
00257 { 00258 return Log::getLog("AGILe." + getName()); 00259 }
virtual const string getName | ( | ) | const [inline, virtual] |
virtual int getPDFMember | ( | PdgCode | pid | ) | [inline, virtual, inherited] |
Get the PDF id number for a given particle.
Reimplemented in Ariadne, FHerwig, FPythia, and Phojet.
Definition at line 132 of file Generator.hh.
References Generator::getName().
Referenced by Generator::getState().
00132 { 00133 throw runtime_error("Have not implemented getPDFMember in " + getName()); 00134 }
virtual std::string getPDFScheme | ( | PdgCode | pid | ) | const [inline, virtual, inherited] |
Get the PDF scheme used by the generator (LHAPDF or other).
Reimplemented in Ariadne, FHerwig, FPythia, and Phojet.
Definition at line 138 of file Generator.hh.
References Generator::getName().
Referenced by Generator::getState().
00138 { 00139 throw runtime_error("Have not implemented getPDFScheme in " + getName()); 00140 }
virtual std::string getPDFSet | ( | PdgCode | pid | ) | [inline, virtual, inherited] |
Get the PDF set used by the generator, e.g. HWLHAPDF (for herwig) or one of the default sets.
Reimplemented in Ariadne, FHerwig, FPythia, and Phojet.
Definition at line 126 of file Generator.hh.
References Generator::getName().
Referenced by Generator::getState().
00126 { 00127 throw runtime_error("Have not implemented getPDFSet in " + getName()); 00128 }
virtual const GeneratorState& getState | ( | ) | [inline, virtual, inherited] |
Get a generator state object.
Definition at line 72 of file Generator.hh.
References Generator::_myState, GeneratorState::addPDF(), GeneratorState::getBeams(), Generator::getCrossSection(), Generator::getName(), Generator::getPDFMember(), Generator::getPDFScheme(), Generator::getPDFSet(), Generator::getVersion(), PDF::member, Beam::name, PDF::particleId, PDF::scheme, PDF::set, GeneratorState::setCrossSection(), GeneratorState::setName(), and GeneratorState::setVersion().
00072 { 00073 string myName = getName(); 00074 _myState.setName(myName); 00075 _myState.setVersion(getVersion()); 00076 _myState.setCrossSection(getCrossSection()); 00077 PDF pdf; 00078 foreach (Beam b, _myState.getBeams()) { 00079 pdf.particleId = b.name; 00080 pdf.set = getPDFSet(b.name); 00081 pdf.member = getPDFMember(b.name); 00082 pdf.scheme = getPDFScheme(b.name); 00083 _myState.addPDF(pdf); 00084 } 00085 return _myState; 00086 }
virtual const std::string getVersion | ( | ) | [inline, virtual, inherited] |
Get the generator version. This implementation is used as a last resort to determine the generator version. Ideally a specific generator will know its own version and overwrite this. Some generators (e.g. FHerwig) don't know this.
Reimplemented in Ariadne, FPythia, and Phojet.
Definition at line 112 of file Generator.hh.
References Generator::_myVersion, Generator::_versionSet, and MSG_ERROR.
Referenced by Generator::getState().
00112 { 00113 if (!_versionSet) { 00115 MSG_ERROR("You asked the generator " //<< getName() 00116 << " what version it is, but it doesn't know!\n" 00117 << "You should set the version with a call to setVersion(string)"); 00118 throw runtime_error("Version unknown for generator"); 00119 } 00120 return _myVersion; 00121 }
void initialize | ( | ) | [protected, virtual] |
Set up default params etc.
Reimplemented from Generator.
Definition at line 52 of file Rapgap.cc.
References Generator::_initialized, call_graini(), call_hercha(), call_ptime(), call_pytcha(), call_raend(), call_rapcha(), call_rapgap(), call_steer(), Generator::getLog(), Log::INFO, and k.
00052 { 00053 Generator::initialize(); 00054 //Rapgap::setParam("LEPI", "2212"); 00055 //Rapgap::setParam("HADI", "2212"); 00056 //int ISEED = 213123; 00057 //int N1 = 0; 00058 //int N2 = 0; 00059 //call_rm48in(ISEED, N1, N2); 00060 //call_rapgap(); 00061 // Initialise Rapgap parameters 00062 getLog() << Log::INFO << "Now calling GRAINI..." << endl; 00063 call_graini(); 00064 getLog() << Log::INFO << "GRAINI is done..." << endl; 00065 00066 // Switch on QCD processes by default 00067 getLog() << Log::INFO << "Setup basic processes..." << endl; 00068 //Rapgap::setParam("IPRO", 18); 00069 //Rapgap::setParam("IDIR", 0); // Don't do DIS but diffractive stuff by default 00070 //Rapgap::setParam("INTER", 2); // Switch to charged current interaction 00074 00075 getLog() << Log::INFO << "Now calling Steer..." << endl; 00076 getLog() << Log::INFO << "In case nothing happens from this point on," << endl; 00077 getLog() << Log::INFO << "make sure you specified a cascade steering file on CL:" << endl; 00078 getLog() << Log::INFO << "agile-runmc RapgapPythia6:X:Y < steer_pp ... " << endl; 00079 call_steer(); 00080 //getLog() << Log::INFO << "Steer is done..." << endl; 00081 00082 getLog() << Log::INFO << "Change standard RAPGAP parameters..." << endl; 00083 call_rapcha(); 00084 //getLog() << Log::INFO << "Change standard HERACLES parameters..." << endl; 00085 call_hercha(); 00086 //getLog() << Log::INFO << "Change standard PYTHIA parameters..." << endl; 00087 call_pytcha(); 00088 00089 //getLog() << Log::INFO << "Change standard ARIADNE parameters..." << endl; 00090 //call_aricha(); 00091 //getLog() << Log::INFO << "Init ARIADNE..." << endl; 00092 //const char* NAME = "RAPGAP"; 00093 //call_arinit(NAME); 00094 00095 getLog() << Log::INFO << "Calling PTIME..." << endl; 00096 const char* name = "rapgap"; 00097 int j = 1; 00098 int k = 0; 00099 call_ptime(name, j, k); 00100 00101 getLog() << Log::INFO << "Now perfroming basic cross-section integration..." << endl; 00102 call_rapgap(); 00103 getLog() << Log::INFO << "RAPGAP is done..." << endl; 00104 call_raend(1); 00105 _initialized = true; 00106 }
void makeEvent | ( | HepMC::GenEvent & | evt | ) | [virtual] |
Run the generator for one event.
Reimplemented from Generator.
Definition at line 127 of file Rapgap.cc.
References Rapgap::_nevt, call_event(), call_pyhepc(), and Rapgap::fillEvent().
00127 { 00128 Generator::makeEvent(evt); 00129 call_event(); 00130 call_pyhepc(1); 00131 // fill the event using HepMC 00132 Rapgap::fillEvent(evt); 00133 evt.set_event_number(_nevt); 00134 // Increment an event counter (Pythia does not count for itself). 00135 _nevt++; 00136 }
void setGenSpecificInitialState | ( | PdgCode | p1 = PROTON , |
|
double | e1 = 6000.0 , |
|||
PdgCode | p2 = PROTON , |
|||
double | e2 = 7000.0 | |||
) | [virtual] |
Set up initial state from supplied params.
Implements Generator.
Definition at line 108 of file Rapgap.cc.
References Generator::getLog(), Log::INFO, and Rapgap::setParam().
00108 { 00109 getLog() << Log::INFO << "Setting initial state..." << endl; 00110 // For Pythia, we have to hold on to this state until initialize() is called. 00111 //_particleName1 = _particleNames[p1]; 00112 //_particleName2 = _particleNames[p2]; 00114 //Rapgap::setParam("KBE1", _particleNames[ParticleName(p1)]); 00115 //Rapgap::setParam("KBE2", _particleNames[ParticleName(p2)]); 00116 Rapgap::setParam("KBE1", p1); 00117 Rapgap::setParam("KBE2", p2); 00118 Rapgap::setParam("PBE1", e1); 00119 Rapgap::setParam("PBE2", e2); 00120 //Rapgap::setParam("PLEP", e1); 00121 //Rapgap::setParam("PPIN", e2); 00122 //Rapgap::setParam("LEPI", p1); 00123 //Rapgap::setParam("HADI", p2); 00124 }
void setInitialState | ( | int | p1 = PROTON , |
|
double | e1 = 7000.0 , |
|||
int | p2 = PROTON , |
|||
double | e2 = 7000.0 | |||
) | [inline, inherited] |
Define initial state.
Definition at line 54 of file Generator.hh.
References Generator::_initialstateset, Generator::_myState, Beam::energy, Beam::name, Beam::position, GeneratorState::setBeams(), and Generator::setGenSpecificInitialState().
Referenced by Generator::initialize().
00056 { 00057 setGenSpecificInitialState(p1, e1, p2, e2); 00059 _initialstateset = true; 00060 Beam beam1, beam2; 00061 beam1.name = p1; 00062 beam2.name = p2; 00063 beam1.energy = e1; 00064 beam2.energy = e2; 00065 beam1.position = 1; 00066 beam2.position = 2; 00067 _myState.setBeams(beam1, beam2); 00068 }
virtual bool setParam | ( | const std::string & | name, | |
const std::string & | value | |||
) | [inline, virtual, inherited] |
Pass a string-valued parameter to the generator.
Definition at line 224 of file Generator.hh.
References Generator::_initialized, Generator::_myState, MSG_ERROR, and GeneratorState::setParam().
00224 { 00225 if (_initialized) { 00226 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00227 throw runtime_error("Tried to set param after generator initialization"); 00228 } 00229 _myState.setParam(name, value); 00230 return true; 00231 }
virtual bool setParam | ( | const std::string & | name, | |
const bool & | value | |||
) | [inline, virtual, inherited] |
Pass a bool-valued parameter to the generator.
Definition at line 214 of file Generator.hh.
References Generator::_initialized, MSG_ERROR, Generator::setParam(), and AGILe::toString().
00214 { 00215 if (_initialized) { 00216 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00217 throw runtime_error("Tried to set param after generator initialization"); 00218 } 00219 return setParam(name, toString(value)); 00220 }
virtual bool setParam | ( | const std::string & | name, | |
const float & | value | |||
) | [inline, virtual, inherited] |
Pass a double/float-valued parameter to the generator.
Definition at line 204 of file Generator.hh.
References Generator::_initialized, MSG_ERROR, Generator::setParam(), and AGILe::toString().
00204 { 00205 if (_initialized) { 00206 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00207 throw runtime_error("Tried to set param after generator initialization"); 00208 } 00209 return setParam(name, toString(value)); 00210 }
virtual bool setParam | ( | const std::string & | name, | |
const double & | value | |||
) | [inline, virtual, inherited] |
Pass a double/float-valued parameter to the generator.
Definition at line 194 of file Generator.hh.
References Generator::_initialized, MSG_ERROR, Generator::setParam(), and AGILe::toString().
00194 { 00195 if (_initialized) { 00196 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00197 throw runtime_error("Tried to set param after generator initialization."); 00198 } 00199 return setParam(name, toString(value)); 00200 }
virtual bool setParam | ( | const std::string & | name, | |
const unsigned long & | value | |||
) | [inline, virtual, inherited] |
Pass an int-valued parameter to the generator.
Definition at line 184 of file Generator.hh.
References Generator::_initialized, MSG_ERROR, Generator::setParam(), and AGILe::toString().
00184 { 00185 if (_initialized) { 00186 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00187 throw runtime_error("Tried to set param after generator initialization"); 00188 } 00189 return setParam(name, toString(value)); 00190 }
virtual bool setParam | ( | const std::string & | name, | |
const long & | value | |||
) | [inline, virtual, inherited] |
Pass an int-valued parameter to the generator.
Definition at line 174 of file Generator.hh.
References Generator::_initialized, MSG_ERROR, Generator::setParam(), and AGILe::toString().
00174 { 00175 if (_initialized) { 00176 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00177 throw runtime_error("Tried to set param after generator initialization"); 00178 } 00179 return setParam(name, toString(value)); 00180 }
virtual bool setParam | ( | const std::string & | name, | |
const unsigned int & | value | |||
) | [inline, virtual, inherited] |
Pass an int-valued parameter to the generator.
Definition at line 164 of file Generator.hh.
References Generator::_initialized, MSG_ERROR, Generator::setParam(), and AGILe::toString().
00164 { 00165 if (_initialized) { 00166 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00167 throw runtime_error("Tried to set param after generator initialization"); 00168 } 00169 return setParam(name, toString(value)); 00170 }
virtual bool setParam | ( | const std::string & | name, | |
const int & | value | |||
) | [inline, virtual, inherited] |
Pass an int-valued parameter to the generator.
Definition at line 154 of file Generator.hh.
References Generator::_initialized, MSG_ERROR, and AGILe::toString().
Referenced by Generator::setParam().
00154 { 00155 if (_initialized) { 00156 MSG_ERROR("Can't set parameter " << name << ": generator has already been initialized"); 00157 throw runtime_error("Tried to set param after generator initialization"); 00158 } 00159 return setParam(name, toString(value)); 00160 }
bool setParam | ( | const string & | name, | |
const string & | value | |||
) | [virtual] |
Pass an string parameter to the generator.
Definition at line 158 of file Rapgap.cc.
References AGILe::asDouble(), AGILe::asInt(), Log::ERROR, FC_BEAM, FC_DISDIF, FC_INPU, FC_LUCO, FC_PTCUT, FC_RAPA, Generator::getLog(), Log::INFO, and Generator::SUCCESS.
Referenced by Rapgap::setGenSpecificInitialState().
00158 { 00159 Generator::setParam(name, value); 00160 00162 if (name == "PPIN") { 00163 getLog() << Log::INFO << "Setting ... (PPIN) = " << value << endl; 00164 FC_INPU.PIN = -1*asDouble(value); 00165 } else if (name == "PLEP") { 00166 getLog() << Log::INFO << "Setting ... (PLEP) = " << value << endl; 00167 FC_INPU.PLEPIN = asDouble(value); 00168 } 00169 else if (name == "PBE1") { 00170 getLog() << Log::INFO << "Setting ... (PBE1) = " << value << endl; 00171 //FC_BEAM.PBEAM[0] = -1*asDouble(value); 00172 FC_BEAM.PBE1 = -1*asDouble(value); 00173 } 00174 else if (name == "PBE2") { 00175 getLog() << Log::INFO << "Setting ... (PBE2) = " << value << endl; 00176 FC_BEAM.PBEAM[1] = asDouble(value); 00177 } 00178 else if (name == "PT2CUT") { 00179 getLog() << Log::INFO << "Setting ... (PT2CUT) = " << value << endl; 00180 FC_PTCUT.PT2CUT[1] = asDouble(value); 00181 } 00182 00184 else if (name == "KBE1") { 00185 getLog() << Log::INFO << "Setting ... (KBE1) = " << value << endl; 00186 FC_BEAM.KBEAM[0] = -1*asInt(value); 00187 } 00188 else if (name == "KBE2") { 00189 getLog() << Log::INFO << "Setting ... (KBE2) = " << value << endl; 00190 FC_BEAM.KBEAM[1] = asInt(value); 00191 } 00192 else if (name == "HADI") { 00193 getLog() << Log::INFO << "Setting ... (HADI) = " << value << endl; 00194 FC_INPU.HADI = asInt(value); 00195 } else if (name == "LEPI") { 00196 getLog() << Log::INFO << "Setting ... (LEPI) = " << value << endl; 00197 FC_INPU.LEPI = asInt(value); 00198 } else if (name == "IPRO") { 00199 getLog() << Log::INFO << "Setting ... (IPRO) = " << value << endl; 00200 FC_RAPA.IPRO = asInt(value); 00201 } else if (name == "IDIR") { 00202 getLog() << Log::INFO << "Setting ... (IDIR) = " << value << endl; 00203 FC_DISDIF.IDIR = asInt(value); 00204 } else if (name == "NFLAV") { 00205 getLog() << Log::INFO << "Setting ... (NFLAV) = " << value << endl; 00206 FC_LUCO.NFLAV = asInt(value); 00207 } else if (name == "NFLQCDC") { 00208 getLog() << Log::INFO << "Setting ... (NFLQCDC) = " << value << endl; 00209 FC_LUCO.NFLQCDC = asInt(value); 00210 } else if (name == "INTER") { 00211 getLog() << Log::INFO << "Setting ... (INTER) = " << value << endl; 00212 FC_INPU.INTER = asInt(value); 00213 } 00214 00215 else { 00216 getLog() << Log::ERROR << "Rapgap doesn't have a parameter called " << name << endl; 00217 //return FAILURE; 00218 } 00219 return SUCCESS; 00220 }
virtual void setSeed | ( | const int | value | ) | [inline, virtual, inherited] |
Set the random number generator seed.
Reimplemented in Ariadne, FHerwig, FPythia, and Phojet.
Definition at line 144 of file Generator.hh.
References Generator::_initialized, Generator::_myState, GeneratorState::addSeed(), and MSG_ERROR.
00144 { 00145 if (_initialized) { 00146 MSG_ERROR("Can't set seed: generator has already been initialized"); 00147 throw (runtime_error("Tried to set RNG seed after generator initialization")); 00148 } 00149 _myState.addSeed(value); 00150 }
virtual void setState | ( | const GeneratorState & | state | ) | [inline, virtual, inherited] |
Setup the generator from a generator state object.
Definition at line 90 of file Generator.hh.
virtual void setVersion | ( | const std::string & | version | ) | [inline, virtual, inherited] |
Set the generator version.
Definition at line 102 of file Generator.hh.
References Generator::_myVersion, and Generator::_versionSet.
Referenced by AGILe::Loader::createGen().
00102 { 00103 _myVersion = version; 00104 _versionSet = true; 00105 }
double _crossSection [protected, inherited] |
Definition at line 282 of file Generator.hh.
Referenced by Rapgap::getCrossSection(), Phojet::getCrossSection(), Generator::getCrossSection(), FPythia::getCrossSection(), FHerwig::getCrossSection(), Cascade::getCrossSection(), and Ariadne::getCrossSection().
HepMC::IO_HEPEVT _hepevt [protected] |
HEPEVT->HepMC converter.
Definition at line 73 of file Rapgap.hh.
Referenced by Rapgap::fillEvent().
bool _initialized [protected, inherited] |
Flag for detecting whether the initialization method has run.
Definition at line 288 of file Generator.hh.
Referenced by Rapgap::initialize(), Phojet::initialize(), FPythia::initialize(), FHerwigJimmy::initialize(), FHerwig::initialize(), Cascade::initialize(), Ariadne::initialize(), Generator::makeEvent(), Generator::setParam(), and Generator::setSeed().
bool _initialstateset [protected, inherited] |
Flag for detecting whether the setInitialState method has run.
Definition at line 285 of file Generator.hh.
Referenced by Generator::initialize(), and Generator::setInitialState().
string _myName [protected, inherited] |
Generator name.
Definition at line 294 of file Generator.hh.
Referenced by AlpGenFHerwig::AlpGenFHerwig(), AlpGenFPythia::AlpGenFPythia(), CharybdisFHerwig::CharybdisFHerwig(), CharybdisFHerwigJimmy::CharybdisFHerwigJimmy(), CharybdisFPythia::CharybdisFPythia(), FHerwig::FHerwig(), FHerwigJimmy::FHerwigJimmy(), FPythia::FPythia(), and Generator::getName().
int _nevt [protected] |
Event counter.
Definition at line 70 of file Rapgap.hh.
Referenced by Rapgap::makeEvent(), and Rapgap::Rapgap().
string _particleName1 [protected] |
string _particleName2 [protected] |
map<PdgCode, std::string> _particleNames [protected, inherited] |
Collection of translated names for particles.
Definition at line 291 of file Generator.hh.
Referenced by FHerwig::_beamNumber(), Ariadne::Ariadne(), FHerwig::FHerwig(), FPythia::FPythia(), Phojet::Phojet(), Rapgap::Rapgap(), Phojet::setGenSpecificInitialState(), FPythia::setGenSpecificInitialState(), FHerwig::setGenSpecificInitialState(), and Ariadne::setGenSpecificInitialState().