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