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 #include "JetScape.h"
0026 #include "JetEnergyLoss.h"
0027 #include "JetEnergyLossManager.h"
0028 #include "JetScapeWriterStream.h"
0029 #ifdef USE_HEPMC
0030 #include "JetScapeWriterHepMC.h"
0031 #endif
0032
0033
0034 #include "AdSCFT.h"
0035 #include "Matter.h"
0036 #include "Martini.h"
0037 #include "CLViscWrapper.h"
0038
0039 #include "TrentoInitial.h"
0040 #include "PGun.h"
0041 #include "PartonPrinter.h"
0042 #include "HadronizationManager.h"
0043 #include "Hadronization.h"
0044 #include "ColoredHadronization.h"
0045
0046 #include <chrono>
0047 #include <thread>
0048
0049 using namespace std;
0050
0051 using namespace Jetscape;
0052
0053
0054 void Show();
0055
0056
0057
0058 int main(int argc, char** argv)
0059 {
0060 clock_t t; t = clock();
0061 time_t start, end; time(&start);
0062
0063 cout<<endl;
0064
0065
0066
0067 JetScapeLogger::Instance()->SetInfo(true);
0068 JetScapeLogger::Instance()->SetDebug(true);
0069 JetScapeLogger::Instance()->SetRemark(false);
0070
0071
0072 JetScapeLogger::Instance()->SetVerboseLevel(8);
0073
0074 Show();
0075
0076 auto jetscape = make_shared<JetScape>();
0077 const char* mainXMLName = "../config/jetscape_main.xml";
0078 const char* userXMLName = "../config/jetscape_user.xml";
0079
0080 jetscape->SetXMLMainFileName(mainXMLName);
0081 jetscape->SetXMLUserFileName(userXMLName);
0082
0083 jetscape->SetNumberOfEvents(1);
0084 jetscape->SetReuseHydro (false);
0085 jetscape->SetNReuseHydro (0);
0086
0087
0088
0089
0090
0091 auto trento = make_shared<TrentoInitial>();
0092 auto pGun= make_shared<PGun> ();
0093 auto hydro = make_shared<CLVisc> ();
0094 jetscape->Add(trento);
0095 jetscape->Add(pGun);
0096 jetscape->Add(hydro);
0097
0098
0099
0100
0101
0102
0103 auto jlossmanager = make_shared<JetEnergyLossManager> ();
0104 auto jloss = make_shared<JetEnergyLoss> ();
0105
0106 auto matter = make_shared<Matter> ();
0107
0108
0109
0110
0111
0112 jloss->Add(matter);
0113
0114
0115
0116 jlossmanager->Add(jloss);
0117 jetscape->Add(jlossmanager);
0118
0119
0120
0121 auto printer = make_shared<PartonPrinter> ();
0122 jetscape->Add(printer);
0123 auto hadroMgr = make_shared<HadronizationManager> ();
0124 auto hadro = make_shared<Hadronization> ();
0125 auto hadroModule = make_shared<ColoredHadronization> ();
0126 hadro->Add(hadroModule);
0127
0128
0129 hadroMgr->Add(hadro);
0130 jetscape->Add(hadroMgr);
0131
0132
0133 auto writer= make_shared<JetScapeWriterAscii> ("test_out.dat");
0134
0135
0136
0137 #ifdef USE_HEPMC
0138
0139 #endif
0140 jetscape->Add(writer);
0141
0142
0143 jetscape->Init();
0144
0145
0146 jetscape->Exec();
0147
0148
0149
0150 jetscape->Finish();
0151
0152 INFO_NICE<<"Finished!";
0153 cout<<endl;
0154
0155
0156
0157
0158 t = clock() - t;
0159 time(&end);
0160 printf ("CPU time: %f seconds.\n",((float)t)/CLOCKS_PER_SEC);
0161 printf ("Real time: %f seconds.\n",difftime(end,start));
0162
0163 return 0;
0164 }
0165
0166
0167
0168 void Show()
0169 {
0170 INFO_NICE<<"-----------------------------------------------";
0171 INFO_NICE<<"| CLVisc Test JetScape Framework ... |";
0172 INFO_NICE<<"-----------------------------------------------";
0173 INFO_NICE;
0174 }