28 #include "JetEnergyLoss.h"
29 #include "JetEnergyLossManager.h"
30 #include "JetScapeWriterStream.h"
32 #include "JetScapeWriterHepMC.h"
42 #include "GubserHydro.h"
43 #include "HydroFromFile.h"
44 #include "PythiaGun.h"
45 #include "PartonPrinter.h"
46 #include "HadronizationManager.h"
47 #include "Hadronization.h"
48 #include "ColoredHadronization.h"
49 #include "ColorlessHadronization.h"
52 #include "InitialFromFile.h"
56 #include "TrentoInitial.h"
61 using namespace Jetscape;
68 int main(
int argc,
char** argv)
70 clock_t
t; t = clock();
77 JetScapeLogger::Instance()->SetInfo(
true);
78 JetScapeLogger::Instance()->SetDebug(
false);
79 JetScapeLogger::Instance()->SetRemark(
false);
82 JetScapeLogger::Instance()->SetVerboseLevel(8);
86 auto jetscape = make_shared<JetScape>(
"./jetscape_init.xml", 20);
88 jetscape->SetId(
"primary");
89 jetscape->SetReuseHydro (
true);
90 jetscape->SetNReuseHydro (20);
92 auto jlossmanager = make_shared<JetEnergyLossManager> ();
93 auto jloss = make_shared<JetEnergyLoss> ();
94 auto hydro = make_shared<HydroFromFile> ();
97 auto matter = make_shared<Matter> ();
98 auto lbt = make_shared<LBT> ();
99 auto martini = make_shared<Martini> ();
100 auto adscft = make_shared<AdSCFT> ();
108 auto pythiaGun= make_shared<PythiaGun> ();
110 auto printer = make_shared<PartonPrinter> ();
112 auto hadroMgr = make_shared<HadronizationManager> ();
113 auto hadro = make_shared<Hadronization> ();
114 auto hadroModule = make_shared<ColoredHadronization> ();
115 auto colorless = make_shared<ColorlessHadronization> ();
118 auto writer= make_shared<JetScapeWriterAscii> (
"test_out.dat");
121 auto writerhepmc= make_shared<JetScapeWriterHepMC> (
"test_out.hepmc");
122 jetscape->Add(writerhepmc);
130 auto initial = make_shared<InitialFromFile>();
131 jetscape->Add(initial);
134 jetscape->Add(pythiaGun);
138 jetscape->Add(hydro);
149 jlossmanager->Add(jloss);
151 jetscape->Add(jlossmanager);
153 jetscape->Add(printer);
155 hadro->Add(hadroModule);
157 hadroMgr->Add(hadro);
158 jetscape->Add(hadroMgr);
160 jetscape->Add(writer);
172 INFO_NICE<<
"Finished!";
177 writer->WriteComment (
"EVENT GENERATION INFORMATION" );
178 Pythia8::Info&
info = pythiaGun->info;
179 std::ostringstream oss;
180 oss.str(
""); oss <<
"nTried = " << info.nTried();
181 writer->WriteComment ( oss.str() );
182 oss.str(
""); oss <<
"nSelected = " << info.nSelected();
183 writer->WriteComment ( oss.str() );
184 oss.str(
""); oss <<
"nAccepted = " << info.nAccepted();
185 writer->WriteComment ( oss.str() );
186 oss.str(
""); oss <<
"sigmaGen = " << info.sigmaGen();
187 writer->WriteComment ( oss.str() );
188 oss.str(
""); oss <<
"sigmaErr = " << info.sigmaErr();
189 writer->WriteComment ( oss.str() );
191 oss.str(
""); oss <<
"eCM = " << info.eCM();
192 writer->WriteComment ( oss.str() );
193 oss.str(
""); oss <<
"pTHatMin = " << pythiaGun->GetpTHatMin();
194 writer->WriteComment ( oss.str() );
195 oss.str(
""); oss <<
"pTHatMax = " << pythiaGun->GetpTHatMax();
198 writer->WriteComment ( oss.str() );
199 writer->WriteComment (
"/EVENT GENERATION INFORMATION" );
203 printf (
"CPU time: %f seconds.\n",((
float)t)/CLOCKS_PER_SEC);
204 printf (
"Real time: %f seconds.\n",difftime(end,start));
211 cout <<
" nTried = " << info.nTried() << endl;
212 cout <<
" nSelected = " << info.nSelected() << endl;
213 cout <<
" nAccepted = " << info.nAccepted() << endl;
214 cout <<
" sigmaGen = " << info.sigmaGen() << endl;
215 cout <<
" sigmaErr = " << info.sigmaErr() << endl;
225 INFO_NICE<<
"------------------------------------------------------";
226 INFO_NICE<<
"| Jet in hydro from file Test JetScape Framework ... |";
227 INFO_NICE<<
"------------------------------------------------------";