cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
pythia_object.cc
Go to the documentation of this file.
1#include <Pythia8/Pythia.h>
2
4#include "CepGen/Generator.h"
6#include "CepGen/Utils/Test.h"
7
8using namespace std;
9
10int main() {
12
13 int seed1 = 1234567, seed2 = 7654321;
14
15 auto cg_pythia = cepgen::EventModifierFactory::get().build("pythia8");
16 cg_pythia->readString("Random:seed = " + to_string(seed1));
17
18 auto pythia = cg_pythia->engine<Pythia8::Pythia>();
19 CG_TEST_EQUAL(pythia->checkVersion(), true, "Pythia 8 object version");
20 CG_TEST_EQUAL(pythia->mode("Random:seed"), seed1, "Parameter set on wrapper");
21
22 pythia->readString("Random:seed = " + to_string(seed2));
23 CG_TEST_EQUAL(pythia->mode("Random:seed"), seed2, "Parameter set on engine");
24
26}
#define CG_TEST_SUMMARY
Definition Test.h:127
#define CG_TEST_EQUAL(var1, var2, name)
Definition Test.h:45
void initialise(bool safe_mode)
int main()