PACIAE 4 (Parton And-hadron China Institute of Atomic Energy) is a multipurpose Monte Carlo event generator developed to describe a wide range of collisions, including lepton-lepton, lepton-hadron, lepton-nucleus, hadron-hadron, hadron-nucleus, and nucleus-nucleus collisions. It is built based on PYTHIA 6.4 & PYTHIA 8.3, and incorporates parton and hadron rescattering stages to address the nuclear medium effects. PACIAE 4 is the new generation of PACIAE model surpassing the version PACIAE 3. In PACIAE 4, the old fixed-format FORTRAN 77 code has been refactored and rewritten by the free-format modern Fortran mixed with C++ languages. The C++-based PYTHIA 8 is interfaced in. More physics and features are available.
Just download the file and decompress it. Then you can get the PACIAE 4 source code directly.
-
make
tool,gfortran
andg++
compilers are required. -
PYTHIA 8
library is indispensable. PYTHIA official website: https://pythia.org/ . Download then build PYTHIA 8 using the following command:./configure make -j
-j
flag will compile PYTHIA 8 more quickly using multiple cores. After the compilation and build completed, copy the Makefile.inc file the PYTHIA 8 generated and paste it into the PACIAE 4 directory. If you have the installed PYTHIA 8 already, just copy the Makefile.inc from your own installed PYTHIA 8 directory and paste it into the PACIAE 4 directory. Makefile.inc file is very important for the running of PACIAE 4. It specifies the PYTHIA 8 distribution path.
NB: The current Makefile is designed for linux system. The support for other OS will be updated in the next version.
We encourage users to run the program on LINUX.
Two ways to run the program are provided.
-
Manual running. Use the
make
tool to compile the source code, link and build the PACIAE program. Then execute it by hand.GFortran
andg++
compilers have been pre-specified inside Makefile:- Compile code, link and build the programs by the command:
One can choose
make
make -j
to compile in parallel. The executable program xPaciae.x and the input files usu.dat, pythia6_extra.cfg and pythia8_extra.cfg will be generated in the foldersim
(simulation). Entersim
. - Modify the input files according to your wish. The basic PACIAE-related and few PYTHIA-related parameters and switches are included in the usu.dat file. Moreover, user can add extra settings for PYTHIA 6/8 in pythia6_extra.cfg and pythia6_extra.cfg files, which requires the knowledge of PYTHIA parameters. See PYTHIA 6.4 Physics and Manual, JHEP 05 (2006) 026 and PYTHIA 8 online manual for more details. Thanks to these two files, PACIAE 4 can use almost all PYTHIA 6/8 features.
- Run the program by the command:
One can use the following command to run the program in the background and record the time and log information.
./xPaciae.x
nohup time ./xPaciae.x > paciae.log &
- Compile code, link and build the programs by the command:
-
(Recommended) Use the PACIAE.sh shell-script to compile, link and build the program, generate input files and run the program automatically.
- Modify the PACIAE.sh file as needed. usu.dat, pythia6_extra.cfg and pythia6_extra.cfg have been integrated within PACIAE.sh file. User can modify them in PACIAE.sh directly. See
USU_DAT_BLOCKTEXT
,PY6_CFG_BLOCKTEXT
andPY8_CFG_BLOCKTEXT
parts inside it. - If executable permissions are missing, grant executable permissions to PACIAE.sh by command (only once):
chmod +x PACIAE.sh
- Run the PACIAE.sh script by the command:
./PACIAE.sh
- rms_analysis.f90 is a stand-alone program used in conjunction with the PACIAE.sh script to average the internal analysis files rms.out generated by each PACIAE simulation.
- Modify the PACIAE.sh file as needed. usu.dat, pythia6_extra.cfg and pythia6_extra.cfg have been integrated within PACIAE.sh file. User can modify them in PACIAE.sh directly. See
Advanced usage for PACIAE.sh
-
More PACIAE-related settings.
The forward parameters in the PACIAE.sh file provide some basic settings for simulations (They are actually aliases for those in the
usu.dat
part.). More PACIAE-related settings can be found and modified in the embeddedusu.dat
part of PACIAE.sh. The meanings of those parameters can be found in theAnnotation of usu.dat
part.For example, one can choose to turn off the nPDF of nuclei by setting the parameter adj1(5) = 0 ( Default = 9):
... #################### usu.dat #################### ... ${k_parcas}, 0.47, 0.4, 1000, 0, ${a_lund}, ... ! adj1(1)-adj1(10) ...
For comparison, the original line is
${k_parcas}, 0.47, 0.4, 1000, 9, ${a_lund}, ... ! adj1(1)-adj1(10)
Note that the default nPDF is a preset 208Pb EPS09 LO nPDF. If one wants to simulate Au+Au collisions with the accurate 197Au EPS09 LO nPDF, an adj(5) = 1 and a corresponding grid file (place it into
your-PYTHIA8-directory/share/Pythia8/pdfdata/
directory manually) are required. -
More PYTHIA-related settings.
In the embedded
pythia6/8_extra.cfg
part of PACIAE.sh, one can find statements of direct inputs of PYTHIA 6/8. They are "cardfiles" of PYTHIA 6/8. This part of the statement will prioritize overwriting the previous PYTHIA-related settings and will be passed into PYTHIA 6/8 directly. It requires the knowledge of PYTHIA parameters. See PYTHIA 6.4 Physics and Manual, JHEP 05 (2006) 026 and PYTHIA 8 online manual for more details. With this way, we can use almost all the features of PYTHIA 6/8.For example, one can use a lower reference scale (pT0Ref) of the minimum pT cutoff (related to the regularization of the divergence of the QCD cross section for pT -> 0) to enhance the underlying-events (multiparton interactions), leading to a larger multiplicity of final-state hadrons:
... ################ pythia6/8_extra.cfg ############# ... # pythia8_extra.cfg ... MultipartonInteractions:pT0Ref = 1.0 // Default = 2.28, pT0Ref scale ...
-
Freely specified subprocesses.
PACIAE provides several pre-defined subprocesses, e.g. inelastic (INEL), non-single diffractive (NSD), etc., controlled by the input parameter nchan in the input file
usu.dat
(or the alias i_channel in PACIAE.sh). But in fact, one can specify any subprocesses freely (as long as PYTHIA, and physics, allow) as follows: Choose a nchan (i_channel) > 10 (If not, the subprocesses you choose and those the PACIAE pre-defines will be mixed together.), then specify subprocesses in thepythia6/8_extra.cfg
part. See PYTHIA 6.4 Physics and Manual, JHEP 05 (2006) 026 and PYTHIA 8 online manual for more details about subprocesses.For example, one can simulate the Higgs boson production process fermion + anti-fermion -> H0 by setting
... i_channel=999 ... ################ pythia6/8_extra.cfg ############# ... # pythia8_extra.cfg ... HiggsSM:ffbar2H = on // Specify fermion + anti-fermion -> H0 process ...
-
Scheduling system task submission.
It is also worth mentioning that tasks can be submitted to computer clusters and supercomputers using the PACIAE.sh script (It is currently available for SLURM, LSF and PBS scheduling systems only.). More detailed information and usage can be found in the
SCHEDULE_SYSTEM_BLOCKTEXT
part of the PACIAE.sh file.
- The ASCII (text) human-readable output file oscar.out of the final particles following the OSCAR1997A standard can be generated via the switch nosc = 1. A file snippet is as follows:
1 | OSC1997A
2 | final_id_p_x
3 | PACIAE program_version projectile+target frame energy 1
4 | Event_1 number_of_events number_of_particles b_parameter b_angle event_weight
5 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1 (GeV & fm)
6 | Particle_No_2 id2 px2 py2 pz2 E2 m2 x2 y2 z2 t2
7 | ...
8 | Event_2 number_of_events number_of_particles b_parameter b_angle event_weight
9 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1
10 | ...
- The full event history following the OSCAR199A standard including (
STAGE_0
) the initial state,(STAGE_1
) the initial partonic state,(STAGE_2
) the final partonic state,(STAGE_3
) the initial hadronic state from the hadronization, and (STAGE_4
) the final hadronic state, can be generated via nosc = 2. A file snippet is as follows:
1 | # OSC1999A
2 | # full_event_history
3 | # PACIAE program_version
4 | # projectile+target frame energy 1
5 | Event_1 N_events N_particles b_parameter b_angle STAGE_0 event_weight
6 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1 (GeV & fm)
7 | Particle_No_2 id2 px2 py2 pz2 E2 m2 x2 y2 z2 t2
8 | ...
9 | Event_1 N_events N_particles b_parameter b_angle STAGE_1 event_weight
10 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1
11 | ...
12 | Event_1 N_events N_particles b_parameter b_angle STAGE_2 event_weight
13 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1
14 | ...
15 | Event_1 N_events N_particles b_parameter b_angle STAGE_3 event_weight
16 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1
17 | ...
18 | Event_1 N_events N_particles b_parameter b_angle STAGE_4 event_weight
19 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1
20 | ...
21 | Event_2 N_events N_particles b_parameter b_angle STAGE_0 event_weight
22 | Particle_No_1 id1 px1 py1 pz1 E1 m1 x1 y1 z1 t1
23 | ...
@ArcsaberHep (An-Ke Lei) @ArcsaberkxL
Feel free to dive in! Any bug reports, comments and suggestions are welcome. Please do not hesitate to contact us.
- An-Ke Lei, ankeleihep@gmail.com or ankelei@mails.ccnu.edu.cn
- Zhi-Lei She, shezhilei@cug.edu.cn
- Dai-Mei Zhou, zhoudm@mail.ccnu.edu.cn
- Yu-Liang Yan, yuliang86@yeah.net
- Ben-Hao Sa, sabhliuym35@qq.com
GPL v2.0 and any later version.
PACIAE 4.0 code are hosted on https://github.com/ArcsaberHep/PACIAE4 and https://gitee.com/arcsaberhep/PACIAE4.
The released code are available on https://github.com/ArcsaberHep/PACIAE4/releases and https://gitee.com/arcsaberhep/PACIAE4/releases.
- Recent version:
- PACIAE 4.0: A brief introduction to PACIAE 4.0, Comput.Phys.Commun. 310 (2025) 109520 or 2411.14255 [hep-ph].
- PACIAE 3.0: An introduction to the parton and hadron cascade model PACIAE 3.0, Phys. Rev. C 108 (2023) 6, 064909 or 2309.05110 [hep-ph].
- Past version:
-
PACIAE 2.2.2: Revisiting the centrality definition and observable centrality dependence of relativistic heavy-ion collisions in PACIAE model, Comput. Phys. Commun. 284 (2023) 108615 or arXiv:2212.04087 [nucl-th].
-
PACIAE 2.2.1: An updated issue of the parton and hadron cascade model PACIAE 2.2, Comput. Phys. Commun. 274 (2022) 108289.
-
PACIAE 2.2.0: Announcement for the replacement of the PACIAE 2.1 and PACIAE 2.2 series, Comput. Phys. Commun. 224 (2018) 417-418.
-
PACIAE 2.2.0: An upgraded issue of the parton and hadron cascade model, PACIAE 2.2, Comput. Phys. Commun. 193 (2015) 89-94 or arXiv:1412.7579 [nucl-th].
-
PACIAE 2.1: An updated issue of the parton and hadron cascade model PACIAE 2.0, Comput. Phys. Commun. 184 (2013) 1476-1479 or arXiv:1206.4795 [nucl-th].
-
PACIAE 2.0: An updated parton and hadron cascade model (program) for the relativistic nuclear collisions, Comput. Phys. Commun. 183 (2012) 333-346 or arXiv:1104.1238 [nucl-th].
-
PACIAE 1.0: Charge particle universal rapidity scaling in e+e-, pbar + p and Au + Au collisions at relativistic energies and its partonic origin, J. Phys. G 32 (2006) 243-250; Influence of the partonic Pauli blocking on the hadronic final state in relativistic nucleus-nucleus collisions, Phys. Rev. C 70 (2004) 034904.
-
- Ancient version:
- JPCIAE: J/psi dynamical suppression in a hadron and string cascade model (or Formation time effect on J/psi dynamical nuclear suppression), Phys. Rev. C 59 (1999) 2728-2733 or arXiv:nucl-th/9803033; J/psi normal and anomalous suppressions in a hadron and string cascade model, J.Phys.G 25 (1999) 1123-1133 or arXiv:nucl-th/9809020; Inclusive and direct photons in S + Au collisions at 200A GeV/c, Phys. Rev. C 61 (2000) 064905 or arXiv:nucl-th/9904035.
- Original version:
-
LUCIAE 3.0: A New version of a computer program for firecracker model and rescattering in relativistic heavy ion collisions, Comput. Phys. Commun. 116 (1999) 353 or arXiv:nucl-th/9804001
-
LUCIAE 2.0: An Event generator for the firecracker model and the rescattering in high-energy pA and AA collisions: LUCIAE version 2.0, Comput. Phys. Commun. 90 (1995) 121-140; Final state interactions in the (nuclear) FRITIOF string interaction scenario, Z. Phys. C 70 (1996) 499.
-
- Special version:
- HYDRO-PACIAE, a hydrodynamic and transport hybrid model for ultra-relativistic heavy ion collisions, J.Phys.G 40 (2013) 025102 or arXiv:1110.6704 [nucl-th].
-
A comprehensive guide to the physics and usage of PYTHIA 8.3, SciPost Phys.Codeb. 8 (2022) or arXiv:2203.11601 [hep-ph].
-
PYTHIA 6.4 Physics and Manual, JHEP 05 (2006) 026 or arXiv:hep-ph/0603175 [hep-ph] (and its update notes: https://pythia.org/download/pythia6/pythia6428.update).
-
In "analy_40.f90" and "Rms_analysis.f90", fixed analysis code of mean pT, < pT >. Analysis code of anisotropic flows were added.
-
In "main_40.f90", "Pythia8CppInterface.hpp" and "Pythia8CppInterface.cpp", the random 2*pi angle of the impact parameter was introduced for the Angantyr modes.
-
In "main_40.f90" and "Pythia8CppInterface.cpp", the subprocesses for lepton-induced collisions were adjusted.
-
In "Pythia8CppInterface.cpp", fixed two bugs of "B_PY8" and "C_PY8" frameworks.
- When performing lepton-nucleus collisions, nPDF statements might be applied to the lepton.
- A "Beams:idB" was wrongly written as "Beams:idA", which caused serious problems for lepton-nucleus collisions when instantiating and initializing subcollisions (lp, ln, nl and pl).
Thanks to Simón Fonseca for reporting the bug.
- The released version is 4.0.02.
- The code have been refactored and rewrite by the free-format modern Fortran + C++ from the fixed-format FORTRAN77.
- PYTHIA 8 can be interfaced in now.
- The gluon splitting and quark deexcitation mechanisms, along with the coalescence hadronization model have been improved.
- The partonic and hadronic cascades have been improved.
- Some other aspects.