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