BcVegPy

GitLab GitLab Repository ./enable BcVegPy/HEAD

Authors: Philip Ilten ORCID iD; Jake Pfaller ORCID iD

Keywords: B_c mesons, heavy quarkonium, Les Houches Accord, Fortran

Plugins: LHAupBcVegPy (LHAup)

Dependencies: PYTHIA8>=8.318, GFORTRAN

Pythia Versions: 8.318

PythiaParallel: No

XML Documentation: No

Test Image: pythia8/dev:test

License: GNU GPL v2 or later


This package interfaces the BCVEGPY Fortran generator for the hadronic production of \(B_c\) mesons with Pythia. BCVEGPY events are passed to Pythia through the Les Houches Accord user-process class LHAupBcVegPy, after which Pythia performs the showering, hadronization, and decays. The S-wave, P-wave, color-octet, and 2S \(B_c\) states of BCVEGPY are available.

Requirements

Building

The package uses the standard PYTHIA-CONTRIB build system. The pythia8-config script must either be along PATH or passed to configure.

./configure --with-pythia8-config=/path/to/pythia8-config
make -j

This first builds the Fortran source into lib/libBcVegPyFortran.a, and then the plugin library lib/libBcVegPy.so.

Usage

The BCVEGPY grid files are located through the BCVEGPYDATAROOT environment variable, which must point to share/BcVegPy of this package.

export BCVEGPYDATAROOT=$PWD/share/BcVegPy

The generator is then loaded in Pythia with the following setting. Note that loading the plugin sets Beams:frameType = 5, adds the 2S states 100541 (\(B_c(2S)^+\)) and 100543 (\(B_c^*(2S)^+\)), with \(B_c^{(*)+}\pi\pi\) decays, to the particle data if they are not already defined, and updates the P-wave states 10543, 10541, 20543, and 545 (states 3 to 6 below) if they have not been changed. These are given the absolute values of the BcVegPy:masses of states 3 to 6, which are below the \(B+D\) threshold, as observed by LHCb, zero widths, and radiative decays: \(^1P_1 \to B_c^+\gamma\), and \(^3P_J \to B_c^{*+}\gamma\). If any of these particles is changed, e.g., its mass, it is not updated, and so its decays should also be set.

Init:plugins = {libBcVegPy.so::LHAupBcVegPy}

The center-of-mass energy, in GeV, must be set with the BCVEGPY command upcom ecm, e.g., BcVegPy:cmnds += {upcom ecm 14000}. Pre-generated VEGAS grids, share/BcVegPy/data/<energy>/grade*.dat, are provided for 7, 8, 13, 13.6, and 14 TeV, and are read by default (loggrade ivegasopen 0); other energies are not supported by the provided grids. Setting loggrade ivegasopen 1 instead recalculates the grid for the requested state with VEGAS and rewrites the corresponding existing grid file, while with loggrade iusecurdir 1 the grid files are taken from the current directory rather than BCVEGPYDATAROOT. A minimal test that loads and initializes the plugin is provided in share/BcVegPy/examples.

cd share/BcVegPy/examples
make testPlugins
./testPlugins LHAupBcVegPy.cmnd

Settings

The following Pythia settings are defined by the package.

The commands are applied in the order BcVegPy:defaultCmnds, then the files of BcVegPy:cmndFiles, and finally BcVegPy:cmnds, where a later command overrides an earlier one.

BCVEGPY Commands

BCVEGPY is configured by setting variables in its Fortran common blocks. Each command has the form

<common block> <variable> <value> [<index>]

and is case insensitive.

If an invalid command is given, e.g., an unknown variable, an index outside its dimension, or a malformed value, it is reported as an error and Pythia initialization fails.

The \(B_c\) state to generate is selected with counter ibcstate <state>, while mixevnt imix 1 mixes the states.

State Description
1 color-singlet \(^1S_0\)
2 color-singlet \(^3S_1\)
3 color-singlet \(^1P_1\)
4 color-singlet \(^3P_0\)
5 color-singlet \(^3P_1\)
6 color-singlet \(^3P_2\)
7 color-octet \(^1S_0\)
8 color-octet \(^3S_1\)
9 color-singlet \(2S\) \(^1S_0\)
10 color-singlet \(2S\) \(^3S_1\)

The \(B_c\) mass of each state is set by BcVegPy:masses. By default, all of these masses are negative, so the masses are taken from the Pythia particle data, which for the P-wave and 2S states are set by the plugin as described above, and can be changed with, e.g., 541:m0 = 6.2745, while the default BCVEGPY masses are used for any meson that is not defined. The 2S states added to the particle data by the plugin use the absolute values of the masses of states 9 and 10. The quark masses and wave-function parameters (pmbc, pmb, pmc, fbc, and fbcc of the upcom and wavezero common blocks) are recomputed from these masses, the selected state, and BcVegPy:massRatios after all commands have been read, so these should not be set directly. Note that the provided grids were calculated with the default BCVEGPY masses. The grids are still valid for other masses, but are less efficient, and the cross sections stored with them, which determine the fraction of each state when the states are mixed, are not updated.

By default, unweighted events are generated (usertran idpp 1), for which BCVEGPY limits the event weights to its maximum of 200000 pb (XMAXUP). With the Pythia PDFs and \(\alpha_s\), this underestimates the cross section, e.g., by a factor of about 2 for the S-wave states at 13 TeV, and biases the kinematic distributions. Each event with a limited weight is reported as a warning, so their number is given by Pythia::stat(). The maximum can be raised with BcVegPy:weightMax, which reduces this bias, but also the unweighting efficiency, e.g., at 13 TeV with the provided grids, a maximum of 1e7 pb limits the S-wave cross sections by less than 1%, with an efficiency of about 1%. Weighted events, using the Les Houches strategy 4, are generated with usertran idpp 4, where the event weight, in pb, is given by Info::weight(). This avoids the limit, but with the provided grids the weights vary strongly, so that many more events are needed for the same statistical precision. Only the values 1 and 4 of idpp are supported, and other values fail the initialization.

Parameters

The BCVEGPY parameters that can be set with commands are listed below, with the defaults of BcVegPy:defaultCmnds. The descriptions are quoted from the BCVEGPY papers, BCVEGPY1.0 hep-ph/0309120, BCVEGPY2.0 hep-ph/0504017, and BCVEGPY2.1 hep-ph/0604238, which describe the stand-alone program with PYTHIA 6. Notes on the use of each parameter with this package, where it differs, follow the quotes.

The other parameters of the papers are set as follows with this package. The masses PMBC, PMB, and PMC are set by BcVegPy:masses and BcVegPy:massRatios. The wave function at the origin FBC, which is "the radial wave function \(R(0)\) for S-wave production or the first derivative of the radial wave function \(R'(0)\) for P-wave production" [2.0], is fixed to \(R(0) = 1.241\) GeV\(^{3/2}\) for the 1S states, \(R(0) = 0.991\) GeV\(^{3/2}\) for the 2S states, and \(R'(0) = 0.44833\) GeV\(^{5/2}\) for the P-wave states. The number of events NEV is set by the Pythia event loop. The PYTHIA 6 parameters MSTP(51), MSTU(111), and PARU(111), "choice of the proton parton-distribution set", "order of \(\alpha_s\) in the evaluation in PYALPS", and "constant value of \(\alpha_s\)" [1.0], are replaced by PDF:pSet, SigmaProcess:alphaSorder, and SigmaProcess:alphaSvalue.

Generating Grids

New grid files, e.g., after changing the PDFs or BcVegPy:masses, or for a new energy, can be generated with share/BcVegPy/examples/grids.cc, which follows scripts/grids.py of the LHCb BcVegPyData package.

cd share/BcVegPy/examples
make grids
./grids 14000 grids14TeV -t          # quick test of the setup only
./grids 14000 grids14TeV [FILE ...]  # full grids, which can take days

The program runs the VEGAS integration of BCVEGPY (loggrade ivegasopen 1) for each of the ten states at the given energy, in GeV, and writes the grid files to the given directory, without generating any events. The grid files in the directory are overwritten. The -t option uses only a few VEGAS points, to test the setup, and the resulting grids should not be used. Optional Pythia command files can set, e.g., the PDFs, BcVegPy:masses, or the number of VEGAS points per iteration and iterations, with the defaults BcVegPy:cmnds += {vegasinf number 1000000, vegasinf nitmx 20}. For the energies known to BCVEGPY, i.e., 7, 8, 10, 13, 13.6, and 14 TeV, the grid files can then be copied to share/BcVegPy/data/<energy>, e.g., data/14TeV. Otherwise, the grid files can be used by running from their directory with BcVegPy:cmnds += {loggrade iusecurdir 1}.

LHCb:2019tea Comparison

The directory share/BcVegPy/validate/LHCb:2019tea compares Pythia + BcVegPy with the LHCb measurement of the \(B_c^-\) production fraction, $f_c/(f_u + f_d), and production asymmetry at 7 and 13 TeV, arXiv:1910.13404.

cd share/BcVegPy/validate/LHCb:2019tea
make
./generate 13000 [NBC] [NB] [OUTPUT] [FILE ...]  # writes pythia13000.dat
./generate 7000                                  # writes pythia7000.dat
python3 compare.py                               # writes compare.pdf

The generate program generates NBC weighted events (by default 10000) for each of the ten BCVEGPY states and NB inclusive non-diffractive events (by default 1000000) for the \(B^0\) and \(B^+\) mesons, and writes the binned predictions to OUTPUT. Optional Pythia command files are read for both samples. The compare.py script requires numpy and matplotlib, and plots the predictions against the LHCb fit versus \(p_T\), the average, and the production asymmetries. Note that BCVEGPY generates both charges equally, so the predicted asymmetry is zero.

Chang:2005bf Comparison

The directory share/BcVegPy/validate/Chang:2005bf compares BcVegPy with the BCVEGPY calculation of the color-singlet S-wave and P-wave, and color-octet S-wave, \(B_c\) states at the LHC (14 TeV) and the Tevatron (1.96 TeV), hep-ph/0502155.

cd share/BcVegPy/validate/Chang:2005bf
make
./generate 14000 [N] [OUTPUT] [FILE ...]  # writes bcvegpy14000.dat
./generate 1960                           # writes bcvegpy1960.dat
python3 compare.py                        # writes compare.pdf

The generate program uses the parameters of the paper, generates N weighted events (by default 200000) at the parton level for each of the eight states and each of the pT cuts of the paper, 0, 5, 20, 35, and 50 GeV, and writes the cross sections and distributions to OUTPUT. The VEGAS grids are first generated in grids<ECM>, and are reused by later runs. With the defaults, each energy takes roughly 1.5 hours. The compare.py script requires numpy and matplotlib, compares the total cross sections (Table II) and the color-octet to color-singlet ratios versus the pT cut (Table III), and plots the distributions as in Figs. 1 to 4 of the paper.

Development

The C++ bindings to the Fortran procedures and common blocks, include/BcVegPy/Wrapper.h and src/Wrapper.cc, are generated automatically and should not be edited by hand. They can be regenerated from the Fortran source, which requires gfortran, as follows.

cd fortran
python3 wrapper.py

References

BCVEGPY is described in hep-ph/0309120, hep-ph/0502155, hep-ph/0504017, and hep-ph/0604238.