51 {
52
53
54
57
58
60
61 UInt_t
seed = gRandom->GetSeed();
62
63
64 TPythia8*
pythia8 = TPythia8::Instance();
65 if (pythia8) {
66 pythia8->Pythia8()->readString(Form(
"Random:seed = %u", seed));
67 pythia8->Pythia8()->readString(
"Random:setSeed = on");
69 LOG(
debug) <<
"TEvtGenDecayer: Pythia8 RNG seeded with " <<
seed;
70 }
71
72 EvtRandomEngine* randomEngine = new EvtMTRandomEngine(seed);
73 EvtRandom::setRandomEngine(randomEngine);
74
75 LOG(info) <<
"TEvtGenDecayer: Random engine initialized with seed " <<
seed;
76
77
78 std::string photonType("gamma");
79 bool useEvtGenRandom(true);
80 bool convertPythiaCodes(false);
81 std::string pythiaDir("");
82
83 EvtExternalGenList* externalGenList = new EvtExternalGenList(
84 convertPythiaCodes, pythiaDir, photonType, useEvtGenRandom);
85
86
87 EvtAbsRadCorr* radCorrEngine = externalGenList->getPhotosModel();
88 if (radCorrEngine) {
89 LOG(info) << "TEvtGenDecayer: PHOTOS radiative corrections enabled";
90 } else {
91 LOG(warning) << "TEvtGenDecayer: PHOTOS not available, proceeding "
92 "without radiative corrections";
93 }
94
95
96 std::list<EvtDecayBase*> extraModels = externalGenList->getListOfModels();
97
98
100 radCorrEngine, &extraModels, 1, false);
101
102 LOG(
debug) <<
"TEvtGenDecayer: EvtGen created with " << EvtPDL::entries()
103 << " particle entries";
104
105 LOG(info) << "TEvtGenDecayer: EvtGen initialized with decay file: "
108 } else {
110 << "TEvtGenDecayer: No EvtGen files specified, using Pythia8 only";
111 }
112
113
114 LOG(info) << "TEvtGenDecayer initialized - EvtGen: "
118
121 }
122}