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 #include <iostream>
0018 #include <time.h>
0019
0020
0021 #include "JetScape.h"
0022 #include "JetEnergyLoss.h"
0023 #include "JetEnergyLossManager.h"
0024 #include "JetScapeWriterStream.h"
0025 #ifdef USE_HEPMC
0026 #include "JetScapeWriterHepMC.h"
0027 #endif
0028
0029 #include "Brick.h"
0030 #include "PGun.h"
0031 #include "ElossValidation.h"
0032 #include "HadronizationManager.h"
0033 #include "Hadronization.h"
0034 #include "ColoredHadronization.h"
0035
0036 #include <chrono>
0037
0038 using namespace Jetscape;
0039
0040
0041 void Show();
0042
0043
0044
0045 int main(int argc, char** argv)
0046 {
0047 clock_t t; t = clock();
0048 time_t start, end; time(&start);
0049
0050 JetScapeLogger::Instance()->SetInfo(true);
0051 JetScapeLogger::Instance()->SetDebug(false);
0052 JetScapeLogger::Instance()->SetRemark(false);
0053 JetScapeLogger::Instance()->SetVerboseLevel(0);
0054
0055 Show();
0056
0057
0058 auto jetscape = make_shared<JetScape>();
0059 jetscape->SetXMLMainFileName("../config/jetscape_main.xml");
0060 jetscape->SetXMLUserFileName("../config/jetscape_user.xml");
0061 jetscape->SetId("primary");
0062
0063
0064 auto ini = make_shared<InitialState>();
0065 ini->SetId("InitialState");
0066
0067
0068 auto pGun= make_shared<PGun> ();
0069
0070
0071 auto hydro = make_shared<Brick> ();
0072
0073
0074 auto jlossmanager = make_shared<JetEnergyLossManager> ();
0075
0076
0077 auto jloss = make_shared<JetEnergyLoss> ();
0078
0079
0080
0081
0082 auto eloss1 = make_shared<ElossValidate> ();
0083
0084
0085 auto writer= make_shared<JetScapeWriterAscii> ("validate_out.dat");
0086
0087
0088 jetscape->Add(ini);
0089 jetscape->Add(pGun);
0090 jetscape->Add(hydro);
0091
0092
0093 jloss->Add(eloss1);
0094 jlossmanager->Add(jloss);
0095 jetscape->Add(jlossmanager);
0096
0097
0098
0099
0100 jetscape->Add(writer);
0101
0102
0103 jetscape->Init();
0104
0105
0106 jetscape->Exec();
0107
0108 jetscape->Finish();
0109
0110 INFO_NICE<<"Finished!";
0111 cout<<endl;
0112
0113 t = clock() - t;
0114 time(&end);
0115 printf ("CPU time: %f seconds.\n",((float)t)/CLOCKS_PER_SEC);
0116 printf ("Real time: %f seconds.\n",difftime(end,start));
0117
0118 return 0;
0119 }
0120
0121
0122
0123 void Show()
0124 {
0125 INFO_NICE<<"--------------------------------------";
0126 INFO_NICE<<"| Validation Test JetScape Framework |";
0127 INFO_NICE<<"--------------------------------------";
0128 INFO_NICE;
0129 }