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