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