This C++ version of BAT is still being maintained, but addition of new features is unlikely. Check out our new incarnation, BAT.jl, the Bayesian analysis toolkit in Julia. In addition to Metropolis-Hastings sampling, BAT.jl supports Hamiltonian Monte Carlo (HMC) with automatic differentiation, automatic prior-based parameter space transformations, and much more. See the BAT.jl documentation.

Estimating trigger efficiencies - tutorial for BAT 0.9

Physics motivation

Triggers are essential at collider experiments if the number of 'interesting events' is accompanied by background processes. The efficiencies for triggers are then needed, e.g., to calculate the production cross-section of the process under study. Usually the trigger efficiency is a function of several variables. This tutorial shows how to evaluate the trigger efficiency for objects at a collider as a function of the transverse momentum. Further information on the details of the physics and the original analysis can be found here.

Tutorial

This tutorial shows how to use a pre-defined BAT model for fitting data with binomial uncertainties from within ROOT. The data come in form of two histograms which are divided.

The tutorial is split into several steps:

Steps marked with * are advanced examples and independent of the limit part of the tutorial. A proposal for additional studies is also given.


Step 1 - Getting started

Copy the histogram file data.root to your local directory. The histogram hist_all represents a reference spectrum of the pT distribution from a particular object, e.g., muons measured during collisions. The spectrum can be obtained, e.g., from the Monte Carlo or a set of tagged objects (using the tag-and-probe method). The histogram hist_sub represents a subset of the objects, e.g., all muons which were triggered. These are referred to as probe objects when using tag-and-probe. The trigger efficiency can be estimed by dividing the two histograms bin-by-bin.

Have a look at the two distributions and estimate the trigger efficiency for small and large values by eye. Where is the point of inflection of the efficiency?

The efficiency can be estimated by fitting the ratio of the two data sets bin-by-bin. How can the uncertainties in each bin be calculated? Are the uncertainties symmetric?

Prepare a ROOT macro for fitting the efiiciency using the BCEfficiencyFitter. Define a suitable fit function for the efficiency.

Solution


Step 2 - Interpreting the results

Run the macro after you have defined the fit function. The MCMC might take a while. Have a look at the plots generated. Does the fit function with the best-fit parameters look reasonable? Compare the results from Minuit and the MCMC. Are both physical? The priors for the fit parameters are chosen to be flat in this example. Check that the minimum and maximum allowed values for the parameters are chosen appropriatly.

Solution


Step 3 - Setting up priors

By default the BCEfficiencyFitter uses flat priors for all parameters. An easy way to set different than flat priors for individual parameters is by using SetPrior() methods. Set up the following priors for the parameters of the fit function:

Investigate the impact of the priors on the results of the fit.

Solution


Step 4 - Adding systematic uncertainties

Typically the scale of the transverse momentum is only known with the limited precision. Include the systematic uncertainty of 2.5 GeV/c on transverse momentum in the fit as a nuisance parameter.

Hint: Include a new parameter with as a Gaussian prior around 0 and add the parameter value to x in the definition of the fit function.

Investigate the impact of the systematics on the results of the fit.

Solution


Step 5 - Extending the fitter class (advanced)

Implement a new fitter class derived from BCEfficiencyFitter and use this new class in the fit. Compile the code in a standalone program. This approach will generally lead to speed-up of the calculation and allow further extensions to the fit.

Solution


Additional studies


Further material and documentation

An introduction to BAT can be found here.

An introduction to this tutorial can be found here.




Daniel Kollar and Kevin Kröninger