File indexing completed on 2025-08-05 08:18:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <iostream>
0022 #include <time.h>
0023
0024
0025
0026
0027 #include "SmashWrapper.h"
0028
0029
0030 #include "JetScape.h"
0031 #include "JetEnergyLoss.h"
0032 #include "JetEnergyLossManager.h"
0033 #include "JetScapeWriterStream.h"
0034 #ifdef USE_HEPMC
0035 #include "JetScapeWriterHepMC.h"
0036 #endif
0037
0038
0039 #include "AdSCFT.h"
0040 #include "Matter.h"
0041 #include "Martini.h"
0042 #include "MusicWrapper.h"
0043
0044 #undef PI
0045 #undef hbarc
0046 #undef default_tol
0047 #undef absol
0048 #undef maxi
0049 #undef mini
0050 #undef sgn
0051 #undef theta
0052 #undef gmn
0053 #undef limit
0054
0055 #include "FreestreamMilneWrapper.h"
0056 #include "iSpectraSamplerWrapper.h"
0057 #include "TrentoInitial.h"
0058 #include "PGun.h"
0059 #include "HadronizationManager.h"
0060 #include "Hadronization.h"
0061 #include "ColoredHadronization.h"
0062
0063 #include <chrono>
0064 #include <thread>
0065
0066 using namespace std;
0067
0068 using namespace Jetscape;
0069
0070
0071 void Show();
0072
0073
0074
0075 int main(int argc, char** argv)
0076 {
0077 clock_t t; t = clock();
0078 time_t start, end; time(&start);
0079
0080 cout<<endl;
0081
0082
0083
0084 JetScapeLogger::Instance()->SetInfo(true);
0085 JetScapeLogger::Instance()->SetDebug(true);
0086 JetScapeLogger::Instance()->SetRemark(false);
0087
0088
0089 JetScapeLogger::Instance()->SetVerboseLevel(8);
0090
0091 Show();
0092
0093 auto jetscape = make_shared<JetScape>();
0094 const char* mainXMLName = "../config/jetscape_main.xml";
0095 const char* userXMLName = "../config/jetscape_user.xml";
0096
0097 jetscape->SetXMLMainFileName(mainXMLName);
0098 jetscape->SetXMLUserFileName(userXMLName);
0099
0100 jetscape->SetNumberOfEvents(1);
0101 jetscape->SetReuseHydro (false);
0102 jetscape->SetNReuseHydro (0);
0103
0104
0105
0106
0107
0108 auto trento = make_shared<TrentoInitial>();
0109 auto freestream = make_shared<FreestreamMilneWrapper> ();
0110 auto pGun= make_shared<PGun> ();
0111 auto hydro = make_shared<MpiMusic> ();
0112 jetscape->Add(trento);
0113 jetscape->Add(freestream);
0114 jetscape->Add(pGun);
0115 jetscape->Add(hydro);
0116
0117
0118 auto iSS = make_shared<iSpectraSamplerWrapper> ();
0119 jetscape->Add(iSS);
0120
0121
0122 auto smash = make_shared<SmashWrapper> ();
0123 jetscape->Add(smash);
0124
0125
0126 auto jlossmanager = make_shared<JetEnergyLossManager> ();
0127 auto jloss = make_shared<JetEnergyLoss> ();
0128
0129 auto matter = make_shared<Matter> ();
0130
0131
0132
0133
0134
0135 jloss->Add(matter);
0136
0137
0138
0139 jlossmanager->Add(jloss);
0140 jetscape->Add(jlossmanager);
0141
0142
0143 auto hadroMgr = make_shared<HadronizationManager> ();
0144 auto hadro = make_shared<Hadronization> ();
0145 auto hadroModule = make_shared<ColoredHadronization> ();
0146 hadro->Add(hadroModule);
0147
0148
0149 hadroMgr->Add(hadro);
0150 jetscape->Add(hadroMgr);
0151
0152
0153 auto writer= make_shared<JetScapeWriterAscii> ("test_out.dat");
0154
0155
0156
0157 #ifdef USE_HEPMC
0158
0159 #endif
0160 jetscape->Add(writer);
0161
0162
0163 jetscape->Init();
0164
0165
0166 jetscape->Exec();
0167
0168
0169
0170 jetscape->Finish();
0171
0172 INFO_NICE<<"Finished!";
0173 cout<<endl;
0174
0175
0176
0177
0178 t = clock() - t;
0179 time(&end);
0180 printf ("CPU time: %f seconds.\n",((float)t)/CLOCKS_PER_SEC);
0181 printf ("Real time: %f seconds.\n",difftime(end,start));
0182
0183 return 0;
0184 }
0185
0186
0187
0188 void Show()
0189 {
0190 INFO_NICE<<"-----------------------------------------------";
0191 INFO_NICE<<"| SMASH Test JetScape Framework ... |";
0192 INFO_NICE<<"-----------------------------------------------";
0193 INFO_NICE;
0194 }