File indexing completed on 2025-08-05 08:18:31
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 "LBT.h"
0037 #include "Martini.h"
0038 #include "Brick.h"
0039 #include "MusicWrapper.h"
0040 #include "FreestreamMilneWrapper.h"
0041 #include "HydroFromFile.h"
0042 #include "CausalLiquefier.h"
0043 #include "iSpectraSamplerWrapper.h"
0044 #include "TrentoInitial.h"
0045 #include "NullPreDynamics.h"
0046 #include "PGun.h"
0047 #include "PartonPrinter.h"
0048 #include "HadronizationManager.h"
0049 #include "Hadronization.h"
0050 #include "ColoredHadronization.h"
0051 #include "ColorlessHadronization.h"
0052
0053 #include "InitialFromFile.h"
0054
0055 #include <chrono>
0056 #include <thread>
0057
0058 using namespace std;
0059
0060 using namespace Jetscape;
0061
0062
0063 void Show();
0064
0065
0066
0067 int main(int argc, char** argv)
0068 {
0069 clock_t t; t = clock();
0070 time_t start, end; time(&start);
0071
0072 cout<<endl;
0073
0074
0075
0076 JetScapeLogger::Instance()->SetInfo(true);
0077 JetScapeLogger::Instance()->SetDebug(true);
0078 JetScapeLogger::Instance()->SetRemark(false);
0079
0080
0081 JetScapeLogger::Instance()->SetVerboseLevel(0);
0082
0083 Show();
0084
0085 auto jetscape = make_shared<JetScape>();
0086 const char* mainXMLName = "../config/jetscape_main.xml";
0087 const char* userXMLName = "../config/jetscape_user.xml";
0088
0089 jetscape->SetXMLMainFileName(mainXMLName);
0090 jetscape->SetXMLUserFileName(userXMLName);
0091
0092 jetscape->SetNumberOfEvents(2);
0093 jetscape->SetReuseHydro (true);
0094 jetscape->SetNReuseHydro (5);
0095
0096
0097
0098
0099 auto initial = make_shared<InitialFromFile>();
0100 auto freestream = make_shared<FreestreamMilneWrapper> ();
0101 auto pGun= make_shared<PGun> ();
0102 auto hydro1 = make_shared<HydroFromFile> ();
0103 auto myliquefier = make_shared<CausalLiquefier> ();
0104 hydro1->SetId("HydroFromFile");
0105
0106 jetscape->Add(initial);
0107 jetscape->Add(freestream);
0108 jetscape->Add(pGun);
0109
0110
0111 jetscape->Add(hydro1);
0112
0113
0114 auto jlossmanager = make_shared<JetEnergyLossManager> ();
0115 auto jloss = make_shared<JetEnergyLoss> ();
0116 jloss->add_a_liqueifier(myliquefier);
0117
0118
0119 auto matter = make_shared<Matter> ();
0120 auto lbt = make_shared<LBT> ();
0121
0122
0123
0124
0125 jloss->Add(matter);
0126 jloss->Add(lbt);
0127
0128
0129 jlossmanager->Add(jloss);
0130 jetscape->Add(jlossmanager);
0131
0132
0133
0134 auto hydro2 = make_shared<MpiMusic> ();
0135 hydro2->add_a_liqueifier(myliquefier);
0136 hydro2->SetId("MUSIC_2");
0137 jetscape->Add(hydro2);
0138
0139
0140 auto iSS = make_shared<iSpectraSamplerWrapper> ();
0141 jetscape->Add(iSS);
0142
0143
0144
0145 auto printer = make_shared<PartonPrinter> ();
0146 jetscape->Add(printer);
0147 auto hadroMgr = make_shared<HadronizationManager> ();
0148 auto hadro = make_shared<Hadronization> ();
0149
0150
0151 auto colorless = make_shared<ColorlessHadronization> ();
0152 hadro->Add(colorless);
0153 hadroMgr->Add(hadro);
0154 jetscape->Add(hadroMgr);
0155
0156
0157 auto writer= make_shared<JetScapeWriterAscii> ("test_out.dat");
0158
0159
0160
0161 #ifdef USE_HEPMC
0162
0163 #endif
0164 jetscape->Add(writer);
0165
0166
0167 jetscape->Init();
0168
0169
0170 jetscape->Exec();
0171
0172
0173
0174 jetscape->Finish();
0175
0176 INFO_NICE<<"Finished!";
0177 cout<<endl;
0178
0179
0180
0181
0182 t = clock() - t;
0183 time(&end);
0184 printf ("CPU time: %f seconds.\n",((float)t)/CLOCKS_PER_SEC);
0185 printf ("Real time: %f seconds.\n",difftime(end,start));
0186
0187 return 0;
0188 }
0189
0190
0191
0192 void Show()
0193 {
0194 INFO_NICE<<"-----------------------------------------------";
0195 INFO_NICE<<"| MUSIC Test JetScape Framework ... |";
0196 INFO_NICE<<"-----------------------------------------------";
0197 INFO_NICE;
0198 }