Super-K Code: Making a Monte Carlo Tuning Sample

Super-K Code Exercise: Making a Monte Carlo Tuning Sample

This exercise will allow you to employ skills learned from the previous tutorials, and in fact is a task similar to the kind of thing one often needs to do in reality. The idea is to create a sample of MC events that one can compare to data. You will take a file of stopping muon data events, fit (reconstruct) them, and create kinematics files using the fit results in order to simulate a matched MC sample.

Monte Carlo Tuning

Detector simulation code usually has a number of parameters that can be tweaked in order to change the nature of the simulation. Some examples are: sizes or densities of detector elements, optical properties of detector materials, properties of the electronics. Sometimes these parameters are quantities that can be known precisely, either from the way the detector is constructed or else independently measured: for instance, in Super-K the sizes of the PMTs are well known, as is the density of the water. Other parameters may not be so well known, either because it's hard to measure them directly or they might change with time. For instance, transparency of the water in Super-K can vary with its cleanliness. For the case when the parameters aren't well known, one can "tune" them: i.e. determine parameter values in order that simulated events match real data events as well as possible.

A typical way of tuning the MC is to obtain a data sample, and simulate a MC sample which in principle should match it. Then, one looks at various key distributions for data and Monte Carlo (the nature of which depends on what parameters you're looking at) and tweaks the parameters until the distributions match are well matched.

A Stopping Muon Example

For this example, you will take a sample of selected stopping muons in Super-K (real data events). You will then fit them using a simple fitter called muboy. The fitter outputs vertex and direction for each muon. You will use this information to create a kinematics file that corresponds to the stopping muon sample, i.e. each real data event will have a corresponding event in the kinematics file for simulation. Then, run skdetsim to simulate the events. Finally, you will create plots for your data and MC distributions for comparison. The point of the example is to create a sample that can be used for tuning; we'll stop short of the actual tuning step (although some of you will be doing this later). I am not providing complete canned code for each of these steps: your challenge is to fill in the blanks to complete the task. Most of the examples we've done so far should give you guidance.

Files for this example

Copy the following files from

/var/phy/project/hep/neutrino/work/schol/superk/examples
into your working directory:

Basic Steps

A Refinement

Since the entry point given by muboy is on the ID cylinder, if you make the vertex the same as the muboy entry point, the muon will not be properly tracked in the OD (check this yourself with superscan). To simulate events with appropriate OD light, you will need to extrapolate the muboy track back to where it intersects the OD outer wall, and make the vertex the entry point in the OD.

Try this next, and make a plot of the distribution of OD hits for data and MC. Here are some tools that will help: