Changeset View
Changeset View
Standalone View
Standalone View
test/example1.cc
Show All 40 Lines | |||||
#endif | #endif | ||||
#include <iostream> | #include <iostream> | ||||
#include <list> | #include <list> | ||||
#include <string> | #include <string> | ||||
int main( int /*argc*/, char** /*argv*/ ) | int main( int /*argc*/, char** /*argv*/ ) | ||||
{ | { | ||||
EvtParticle* parent( 0 ); | EvtParticle* parent( nullptr ); | ||||
// Define the random number generator | // Define the random number generator | ||||
EvtRandomEngine* eng = 0; | EvtRandomEngine* eng = nullptr; | ||||
#ifdef EVTGEN_CPP11 | #ifdef EVTGEN_CPP11 | ||||
// Use the Mersenne-Twister generator (C++11 only) | // Use the Mersenne-Twister generator (C++11 only) | ||||
eng = new EvtMTRandomEngine(); | eng = new EvtMTRandomEngine(); | ||||
#else | #else | ||||
eng = new EvtSimpleRandomEngine(); | eng = new EvtSimpleRandomEngine(); | ||||
#endif | #endif | ||||
EvtRandom::setRandomEngine( eng ); | EvtRandom::setRandomEngine( eng ); | ||||
EvtAbsRadCorr* radCorrEngine = 0; | EvtAbsRadCorr* radCorrEngine = nullptr; | ||||
std::list<EvtDecayBase*> extraModels; | std::list<EvtDecayBase*> extraModels; | ||||
#ifdef EVTGEN_EXTERNAL | #ifdef EVTGEN_EXTERNAL | ||||
bool convertPythiaCodes( false ); | bool convertPythiaCodes( false ); | ||||
bool useEvtGenRandom( true ); | bool useEvtGenRandom( true ); | ||||
EvtExternalGenList genList( convertPythiaCodes, "", "gamma", useEvtGenRandom ); | EvtExternalGenList genList( convertPythiaCodes, "", "gamma", useEvtGenRandom ); | ||||
radCorrEngine = genList.getPhotosModel(); | radCorrEngine = genList.getPhotosModel(); | ||||
extraModels = genList.getListOfModels(); | extraModels = genList.getListOfModels(); | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |