A single parton propagating in a brick of fixed temperature and length - TianyuDai/JETSCAPE-rhic-ags GitHub Wiki
Example of XML for the brick test, JETSCAPE-rhic-ags/config/jetscape_user_brick.xml:
<jetscape>
<nEvents> 10000 </nEvents>
<!-- JetScape Writer Settings -->
<outputFilename>brick_out</outputFilename>
<JetScapeWriterAscii> on </JetScapeWriterAscii>
<!-- Hard Process -->
<Hard>
<PGun>
<pT>120</pT>
<parID>21</parID>
</PGun>
</Hard>
<!-- Hydro Module -->
<Hydro>
<Brick>
<T>0.2</T>
</Brick>
</Hydro>
<!--Eloss Modules -->
<Eloss>
<deltaT>0.01</deltaT>
<maxT>1</maxT>
<Martini>
<alpha_s> 0.3 </alpha_s>
<pcut> 1.0 </pcut>
</Martini>
</Eloss>
</jetscape>
cd /rhic-ags-school/JETSCAPE-rhic-ags/build
./runJetscape ../config/jetscape_user_brick.xml
Understanding the raw ASCII JETSCAPE output and processing the raw ASCII JETSCAPE output using JETSCAPE-rhic-ags/examples/FinalStatePartons.cc
cd /rhic-ags-school/JETSCAPE-rhic-ags/build
makedir ../../JETSCAPE-output
./FinalStatePartons brick_out.dat ../../JETSCAPE-output/my_final_state_partons.txt
cd /rhic-ags-school/JETSCAPE-rhic-ags/analysis
python3 plot_energy_distribution.py
JETSCAPE-rhic-ags/analysis/plot_energy_distribution.py
import numpy as np
import matplotlib.pyplot as plt
energy_list = []
i_energy = 3
n_bins = 100
E0 = 120
with open("../../JETSCAPE-output/my_final_state_partons.txt", "r") as data_file:
lines = data_file.readlines()
for line in lines:
if '#' in line:
continue
arr = line.split()
energy_list.append(float(arr[i_energy]))
plt.figure()
plt.hist(energy_list, n_bins, density=True, histtype='step', stacked=True, fill=False)
plt.title("Energy distribution of final partons, $E_0 = 120$ GeV")
plt.xlabel('E (GeV)')
plt.ylabel('dN/dE')
plt.yscale('log')
plt.xlim(1, 120)
plt.savefig("../../JETSCAPE-output/parton_energy_distribution.pdf")