This repository holds (part of) the code base used to make the calculations of the paper CP violation and material interaction of neutral kaons in measurements of the CKM angle γ using B±→DK± decays where D→K0Sπ+π−. There is only part of the code because
- some of the amplitude model implementations used in the paper are not made by me, and not public
- a lot of random scripts have not been included.
The code has four parts:
- a c++ program that calculates the D→K0Sπ+π− decay amplitude at a specified set of grid points in phase space
- a set of python classes that can calculate experimental yields and fit them (among other things) given the output of step 1
- a set of python scripts that use these classes to run all studies going into the paper
- a set of Jupyter notebooks that make the plots of the paper, based on these studies
This program is described in the README in the amplitudes_calculations subdirectory
Are in the python subdir. They are reasonably self-explanatory - for their use, see the scripts described below.
The scripts scripts/run_complete_simple_bias_study.py and scripts/run_momentum_averaged_bias_study.py run a well-defined bias study for a single momentum input, or averaging over a momentum distribution, respectively. There are also scripts that submit them to the Oxford batch system in the same folder (easy to modify for other batch systems, I imagine).
The scripts scripts/submit_uncertainty_studies.py and scripts/submit_scans.py runs the above scripts with a series of different inputs, in order to produce all of the calculations needed for the bias values and uncertainties in the paper.
There are various bits and pieces in the notebooks. The important one is this one, because it makes the plots of the paper, including all uncertainty calculations etc.