1. Introduction
Understanding the internal dynamics and interactions of composite particles, such as hadrons, is a fundamental challenge. Hadrons exhibit complex internal structures that influence their interactions and decays. To characterize these structures, form factors are employed. A form factor is a mathematical function that encapsulates the spatial distribution of charge, momentum, or other intrinsic properties within a composite particle. It acts as a bridge between theoretical models and experimental observations by describing how the internal structure of a particle modifies its interaction with external fields or other particles. In hadronic decays, form factors are essential for calculating observables such as decay widths, branching fractions, and angular distributions. These observables are directly connected to the underlying dynamics of the strong interaction, as described by quantum chromodynamics (QCD). Since QCD is non-perturbative at the energy scales relevant for hadrons, direct analytical solutions are often infeasible. Instead, theoretical frameworks like lattice QCD, effective field theories, or phenomenological models provide numerical estimates of form factors.
From a computational perspective, incorporating form factors into numerical calculations poses challenges due to their multidimensional nature and dependence on kinematic variables like momentum transfer. Efficient methods for reading, interpolating, and implementing form factors are crucial for precise and fast simulations of hadronic processes.
This paper focuses on addressing these computational challenges by presenting an efficient C-code for handling form factor data. The code is benchmarked against Mathematica, a widely used computational tool. The C-code is a significant improvement over prior approaches, particularly in computational efficiency and user accessibility. Its utility could be further demonstrated by addressing more complex scenarios or exploring new physical phenomena. To this end, I propose extending the application of the code to include:
1) Non-Leptonic Decay Processes: Applying the code to compute form factors for non-leptonic decays, which are inherently more complex due to the involvement of hadronic final states.
2) Beyond Standard Model Scenarios: Incorporating additional New Physics operators or scenarios, such as exploring CP-violating effects in
decays, which require precise form factor computations.
3) Higher-Order Corrections: Using the code to study higher-order corrections to form factors, further validating its precision and adaptability.
These enhancements would highlight the flexibility of the developed code and its applicability to broader and more intricate problems.
We will demonstrate the use of our C-code in reading and implementing the form factors by using the case study of the hadronic decay
. This process is a valuable probe for physics beyond the Standard Model (SM), offering insights into new physics (NP) contributions from scalar, vector, and tensor currents. It tests the limits of the Non-Relativistic Quark (NRQ) model [1] [2] and helps investigate anomalies such as
and
[3] [4]. These anomalies suggest potential lepton universality violations in
[5]-[7] and
[6]-[8], possibly linked to new heavy [9] [10] or light states [11] [12].
Additionally, the decay rates of
and
are crucial for determining CKM matrix elements
and
[13], necessitating precise form factor calculations. The form factors can be derived from quark models [14]-[24] or lattice QCD [3] [25], which parameterizes the hadronic transition
via scalar, vector, and tensor form factors.
The LHCb Collaboration recently measured the ratio of decay rates for
and
[26]. Lattice QCD calculations have been employed to predict differential and integrated decay rates for these processes. In Ref. [3], lattice QCD form factors for the scalar, vector, and tensor currents were used, building on previous work with 2 + 1 flavors of dynamical domain-wall fermions [25]. Tensor form factors were extracted using ratios defined in Ref. [27], with uncertainties evaluated through nominal and higher-order fits. Supplemental data files provided covariance matrices for all ten
form factors. Additionally, a Mathematica code was developed to read these form factors for analysis [28].
In Sec. 2, we present the form factors of the case study of the hadronic decay of
. The program overview is presented in Section 3, and the results are discussed in Section 4. Graphical interface for the code was introduced in Section 5 and finally the conclusion is given in Section 6.
2. Lattice Form Factor: Case Study
In this section, we will demonstrate the use of our C-code in reading and implementing the form factors by using the case study of the hadronic decay
. In the presence of new physics (NP), the effective Hamiltonian for the quark-level transition
is given as follows [29]-[31]:
where
is the Fermi constant,
is the CKM matrix element, and
. The Hamiltonian is evaluated at the energy scale
.
The hadronic helicity amplitudes for the transition
are parameterized in terms of scalar, vector/axial-vector, and tensor form factors as:
Scalar and Pseudoscalar Contributions
Vector and Axial-Vector Contributions
Tensor Contributions
Scalar and Pseudoscalar Matrix Elements
(1)
(2)
Vector and Axial-Vector Matrix Elements
Tensor Matrix Elements
(3)
The covariance matrices for all ten form factors, along with the differential decay rate for
, are provided in supplemental files. Differential decay rates will be computed for the SM and NP scenarios using a C-code for validation against Mathematica results.
3. Program Overview
This paper introduces a C-language code for reading scalar, vector, and tensor lattice QCD form factors for any hadroinc transition. We will use the case study of the transition
, generating data points for the differential decay rate of the process
. The code, converted from the Mathematica code used in Ref. [3], is available on GitHub https://github.com/darkfiresmith96/Lattice_QCD under the GNU General Public License 3 (GPL) license. The primary code is organized into main.c and supplementary files (Constant.c, Constant.h, Calculate.c, Calculate.h, File_Manipulate.c, File_Manipulate.h), along with data files like covariance, results, HO_covariance, and HO_results, where HO stands for higher-order fit.
Verification against the Mathematica code showed that the C-code offers significant efficiency improvements, with a runtime ratio of 1:64.2 per data point, due to its lower-level implementation. The modularity and speed of C also enhance memory and resource control compared to Mathematica.
The code development involved three main steps: 1) File Reading: Four custom read-file functions were created to handle diverse input data structures, which were reorganized for processing. 2) Calculations: Mapping data flow from the Mathematica code required recreating its functions in C and identifying computational patterns, such as those for nominal and higher-order form factors. Complex decay rate formulas were broken down for implementation. 3) Data Output: Results were tabulated, including
, differential decay rates, and associated errors, and exported to text files for graphing, such as plotting the differential decay rate versus
.
This work highlights the advantages of C for scientific computing, particularly in efficiency and flexibility, while maintaining consistency with previous results from lattice QCD computations.
4. Results
Once the results are stored in a file, they can be imported into graphing software to create plots of the decay rate and its associated error. The format of the data file is illustrated in Figure 1. The resulting graphs of the differential distribution, generated using both the Mathematica and C codes, are shown in Figure 2, Figure 3. These graphs demonstrate that the C-code results align closely with the Mathematica results and are consistent with Ref. [3], confirming the correctness of the C implementation.
The speed comparison between the C and Mathematica codes is summarized in Figure 4 and Table 1. Both codes were tested with 10, 100, 1000, and 10,000 data points over five trials per case. The wall clock time for each trial was recorded and averaged. The resulting graph of wall clock time versus the number of data points is linear for both codes. Based on the slopes of these graphs, the C-code is determined to be approximately 64.2 times faster than the Mathematica code per data point.
Figure 1. Example of data from code.
(a) (b)
Figure 2. The differential decay rate distribution from the Mathematica code. The left panel is the Standard Model results and the right panel is the new physics results at
and
.
(a) (b)
Figure 3. The differential decay rate distribution from the C-code. The left panel is the Standard Model results and the right panel is the new physics results at
and
.
(a) (b)
Figure 4. Results of the speed test. This shows that the C-code (red) performs faster than the Mathematica code (blue). Left and right panels are the linear and log plots, consequently, of the wall clock time (sec.) versus the number of data points.
Table 1. Results of of the speed test for the C-code and the Mathematica code.
Number of points |
Average time of
mathematica code (sec.) |
Average time of C code (sec.) |
10 |
5.4264 |
0.1076 |
|
21.2736 |
0.3652 |
|
175.7828 |
2.8656 |
|
1736.1958 |
26.8708 |
5. Web Application with Graphical Interface
To expand accessibility beyond users familiar with compiling and running C code on a Linux command line, a prototype web application was developed using the Node.js framework. This web application allows users to upload the necessary data documents and input parameters via a graphical interface, as shown in Figure 5. The application then executes the C program on the server and delivers the computed raw data to the user through the webpage. Hosted on a “free-tier” Heroku Cloud instance, the system utilizes Docker for easy scaling to more powerful computational resources when needed.
Future enhancements include a generalized interface that accepts user-defined mathematical expressions in LaTeX format. Users will upload compatible data files, as illustrated in Figure 6. The application parses the input expression, generates JavaScript code to compute the results, and delivers them based on the provided data files (e.g., a spreadsheet with “x” and “y” columns). Future versions will generate and compile C code for improved efficiency. This evolution of the web application demonstrates its potential for broader user adoption and versatility.
6. Conclusion
In general, hadronic transitions are described using scalar, vector, and tensor QCD lattice form factors. While the widely used computational tool for reading and implementing form factor data files is Mathematica, this paper presented a C-code alternative that generates decay rate data points for any hadronic transition. We utilized this process
as a case study. Verification against
Figure 5. Web interface for user inputs.
Figure 6. Web application which can parse user’s expression.
the Mathematica code showed that both provided identical results. Performance comparisons revealed that the C-code was significantly more efficient, with a wall clock time ratio of 1:64.2 per data point compared to the Mathematica code. Additionally, the C-code was compact, occupying 26 KB of memory versus 107 KB for the Mathematica implementation. A user-friendly web interface was also developed to streamline input handling and computations, making the system more accessible.
Acknowledgements
We thank Stefan Meinel for providing the Mathematica code that reads the data file of the QCD lattice form factor. B.S. acknowledges the hospitality of Stefan Meinel at the Department of Physics, University of Arizona, where he gave B.S. a lesson on the mathematics and physics behind the code, as well as the algorithm of the Mathematica code. This work was financially supported by the Student/Faculty Research Engagement (SFRE) Grant and Summer Undergrad Research Experience (SURE) Grant (B.S.).