Changeset View
Changeset View
Standalone View
Standalone View
test/exampleWriteHepMC.cc
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | #endif | ||||
hasCharm = true; | hasCharm = true; | ||||
} | } | ||||
} | } | ||||
return ( hasLepton && ( !hasCharm ) ); | return ( hasLepton && ( !hasCharm ) ); | ||||
} | } | ||||
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 44 Lines • Show Last 20 Lines |