EIC MC afterburner. Software package to provide framework independent well validated crossing angle and beam effects C++ library and HepMC file converter (abconv) for Electron Ion Collider.
Physics simulated:
Software:
root.hepmc
converter, that adds crossing_angle_hor and beam effectsThe converter and benchmark require libyaml-cpp. Those are available in package managers for the most of systems:
apt install libyaml-cpp-dev # Debian/Ubuntu/Mint
yum install yaml-cpp-devel # RHEL/CentOS/Fedora
git clone https://eicweb.phy.anl.gov/monte_carlo/afterburner.git
mkdir -p afterburner/build
cd afterburner/build
# setup cmake (c++ code lives in cpp directory)
cmake ../cpp
# to build all
cmake --build ../cpp --target all
# to install
cmake --build ../cpp --target install -- -j 8
Preinstalled versions are available in ATHENA containers.
# Process my whole file, add crossing angle, beam effects, do validation plots
abconv my.hepmc
# Same, but limit the number of events to 1000 and set the output name as 'test'
abconv my.hepmc -o test -l 1000
# Just convert hepmc3 to hepmc2 don't use afterburner, don't create plots
abconv my.hepmc -f hepmc2 --ab-off --plot-off
# Just convert hepmc3 to hepmc.root don't use afterburner, don't create plots
abconv my.hepmc -f treeroot --ab-off --plot-off
Note: In the final example above, you want the treeroot
option. The root
option creates a (rather strange) flat file.
How exactly the afterburner works illustrated by abconv my.hepmc
command.
AB opens the input file, gets beam particles and extract beam energy settings (from the first event). See beam energy settings for the details below.
AB awaits that there is no crossing angle between beam particles. To check this
AB calculates a crossing angle between the beam particles. If the crossing angle is not zero
and --exit-ca
flag is set - AB exits; without the flag a warning is issued.
AB processes events applying crossing angle and beam effects for each event.
-s,--ev-start
, -e,--ev-end
, -l,--limit
flags limit the number of events to process
By defaults AB also creates *.hist.root file that contains validation histograms
--plot-off
flag can switch off histograms creation
P.S. Is one needs just HepMC3->HepMC2 converter one can use --ab-off
flag to disable
afterburner during conversion. This way abconv could be use as different HepMC formats
converter.
-p/--preset
flag one can select a profile:
(!) For now IP8 is a copy of IP6 parameters with 35 mrad crossing angle. It will be populated with IP8 own parameters as soon as they are officially published.
Flag | Description |
---|---|
-h,--help | Print this help message and exit |
-v,--version | Shows package version number |
-o,--output TEXT | Base name for Output files ((!) no extension) |
-p,--preset TEXT | Beams configuration 0: IP6 High divergence[default], 1: IP6 High acceptance, 2: IP6 eAu |
-i,--in-format TEXT | Input format: auto [default], hepmc2, hepmc3, hpe, lhef, gz, treeroot, root |
-f,--out-format TEXT | Output format: hepmc3 [default], hepmc2, dot, none (no events file is saved) |
-s,--ev-start INT | Start event index (all previous are skipped) |
-e,--ev-end INT | End event index (end processing after this event) |
-l,--limit UINT | Limit number of events to process. (Shutdown after this number of parsed events) |
--ab-off | No afterburner is applied |
--plot-off | Don't produce validation plots |
--exit-ca | Check existing crossing angle and exit if CA>1mrad (1) |
(1) How
--exit-ca
works exactly: when afterburner processes the first event it checks if it has 2 beam particles (fails with non zero code if not) and then calculates their crossing angle with the--exit-ca
is set and crossing angle absolute value is > 1mrad program ends with 0 code. This method is very coarse as if in a source file the crossing angle is 0 but all beam effects do exist, beam effects will be applied twice
-p,--preset flag, values [0,1,2,3,4,5] set config and auto determine energy from source file:
The other options sets energy settings manually, not checking the source file:
ip6_hidiv_41x5 | ip6_hidiv_100x5 | ip6_hidiv_100x10 | ip6_hidiv_275x10 | ip6_hidiv_275x18 |
ip6_hiacc_41x5 | ip6_hiacc_100x5 | ip6_hiacc_100x10 | ip6_hiacc_275x10 | ip6_hiacc_275x18 |
ip6_eau_41x5 | ip6_eau_110x5 | ip6_eau_110x10 | ip6_eau_110x18 | - |
ip8_hidiv_41x5 | ip8_hidiv_100x5 | ip8_hidiv_100x10 | ip8_hidiv_275x10 | ip8_hidiv_275x18 |
ip8_hiacc_41x5 | ip8_hiacc_100x5 | ip8_hiacc_100x10 | ip8_hiacc_275x10 | ip8_hiacc_275x18 |
ip8_eau_41x5 | ip8_eau_110x5 | ip8_eau_110x10 | ip8_eau_110x18 | - |
Example of manual configuration setting:
abconv -p ip6_hidiv_100x5 source_file.hepmc
(!) For now IP8 is a copy of IP6 parameters with 35 mrad crossing angle. It will be populated with IP8 own parameters as soon as they are officially published.
The validation is performed by comparison of the resulting particle distributions with Pythia8 beam effects simulation. The later was also validated with Fun4All afterburner implementation.
To apply benchmarks. Head-on data (no crossing angle nor effects) is located:
https://eics3.sdcc.bnl.gov:9000/minio/eictest/ATHENA/WG/BeamEffects/
The validation plots are generated and can be viewed in python/comparison.ipynb
Essential plots from the latest validation run:
The discrepancy in low Eta has been explained by a slight phase space difference in generated headon and full beam effects files on Pythia8 side. TL;DR; It is Fine
41x5 GeV | 100x10 GeV | 275x18 GeV |
---|---|---|