49 using namespace Jetscape;
56 int main(
int argc,
char** argv)
58 clock_t
t; t = clock();
61 string XMLname=
"./pwg2_init.xml";
62 string outname=
"test_out.dat.gz";
65 if ( argc >1 &&
string(argv[1]) ==
"-h" ) {
66 cout <<
"Usage: PWG2Wrapper [xmlname] [outputname] [Nevents]" << endl;
73 Nevents=atoi( argv[3] );
86 cout <<
"Usage: brickTest [xmlname] [outputname] [Nevents]" << endl;
93 JetScapeLogger::Instance()->SetInfo(
true);
94 JetScapeLogger::Instance()->SetDebug(
false);
95 JetScapeLogger::Instance()->SetRemark(
false);
98 JetScapeLogger::Instance()->SetVerboseLevel(0);
103 auto jetscape = make_shared<JetScape>(XMLname,Nevents);
104 jetscape->SetId(
"primary");
109 auto init = make_shared<InitialState>();
110 auto pythiaGun= make_shared<PythiaGun> ();
111 auto hydro = make_shared<Brick> ();
113 auto jlossmanager = make_shared<JetEnergyLossManager> ();
114 auto jloss = make_shared<JetEnergyLoss> ();
115 auto matter = make_shared<Matter> ();
118 auto printer = make_shared<PartonPrinter>();
119 auto hadroMgr = make_shared<HadronizationManager> ();
120 auto hadro = make_shared<Hadronization> ();
121 auto hadroModule = make_shared<ColoredHadronization> ();
122 auto colorless = make_shared<ColorlessHadronization> ();
125 auto writer= make_shared<JetScapeWriterAsciiGZ> (outname);
134 jetscape->Add(pythiaGun);
135 jetscape->Add(hydro);
141 jlossmanager->Add(jloss);
142 jetscape->Add(jlossmanager);
145 jetscape->Add(printer);
146 hadro->Add(colorless);
147 hadroMgr->Add(hadro);
148 jetscape->Add(hadroMgr);
151 jetscape->Add(writer);
161 writer->WriteComment (
"EVENT GENERATION INFORMATION" );
162 Pythia8::Info& info = pythiaGun->info;
163 std::ostringstream oss;
164 oss.str(
""); oss <<
"nTried = " << info.nTried();
165 writer->WriteComment ( oss.str() );
166 oss.str(
""); oss <<
"nSelected = " << info.nSelected();
167 writer->WriteComment ( oss.str() );
168 oss.str(
""); oss <<
"nAccepted = " << info.nAccepted();
169 writer->WriteComment ( oss.str() );
170 oss.str(
""); oss <<
"sigmaGen = " << info.sigmaGen();
171 writer->WriteComment ( oss.str() );
172 oss.str(
""); oss <<
"sigmaErr = " << info.sigmaErr();
173 writer->WriteComment ( oss.str() );
175 oss.str(
""); oss <<
"eCM = " << info.eCM();
176 writer->WriteComment ( oss.str() );
177 oss.str(
""); oss <<
"pTHatMin = " << pythiaGun->GetpTHatMin();
178 writer->WriteComment ( oss.str() );
179 oss.str(
""); oss <<
"pTHatMax = " << pythiaGun->GetpTHatMax();
180 writer->WriteComment ( oss.str() );
182 oss.str(
""); oss <<
"JETSCAPE Random Seed = " << JetScapeTaskSupport::Instance()->GetRandomSeed();
183 writer->WriteComment ( oss.str() );
185 writer->WriteComment (
"/EVENT GENERATION INFORMATION" );
195 printf (
"CPU time: %f seconds.\n",((
float)t)/CLOCKS_PER_SEC);
196 printf (
"Real time: %f seconds.\n",difftime(end,start));
211 INFO_NICE<<
"------------------------------------";
212 INFO_NICE<<
"| Brick Test JetScape Framework ... |";
213 INFO_NICE<<
"------------------------------------";