Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 16

Monte Carlo Event Generation for 2→2 Scalar Scattering

Recommended resources

Hello! Welcome back to our journey into Quantum Field Theory.

In our last lesson, we successfully calculated the total cross-section () for scattering in theory. We did this by analytically and numerically integrating the differential cross-section, , using Python and SciPy. This gave us a single number representing the total probability of an interaction.

Today, we're going to take a significant step closer to how modern particle physics is actually done. Instead of calculating a single, total rate, we will build a simple event generator. An event generator is a program that simulates the outcome of individual scattering events, producing final-state particles whose momentum distributions match the predictions of our theory. This allows for a much more direct and detailed comparison between theory and experiment.

Our learning outcome is to implement a simple Monte Carlo event generator for a 2→2 scalar field theory process using the calculated amplitude. This will be your first foray into using Monte Carlo methods in a QFT context, a powerful and widely used technique in computational physics.

1. From Cross-Sections to Event Generation

So far, we have focused on the differential cross-section . This function can be interpreted as a probability distribution: it tells us the relative probability of particles scattering into a given solid angle .

An event generator's job is to act like a virtual particle accelerator. It "collides" particles and generates final states (in our case, the scattering angles and ) according to this probability distribution. By generating millions of such "events," we can build up statistical distributions of observables (like the scattering angle) that can be directly compared to histograms measured in a real detector.

The core of this process is a numerical technique known as the Monte Carlo method, which uses random sampling to solve problems that might be difficult to handle analytically.

Introduction to Event Generators

This lecture provides an excellent introduction to the philosophy behind Monte Carlo event generators in particle physics. It explains why we need them and the basic idea of using random numbers to simulate physical processes.

Please watch the following segments: (Slides 4-5, timestamp ~2:30 - 4:00): This introduces the core task of making predictions by integrating differential cross-sections over specific regions of phase space. (Slides 23-26, timestamp ~16:40 - 20:30): This section, titled 'Monte Carlo', gives a clear, high-level definition of the Monte Carlo method and explains why its convergence properties make it indispensable for high-dimensional problems in physics.


2. The Accept-Reject Method

How do we generate random numbers that follow a specific, non-uniform probability distribution? One of the simplest and most elegant Monte Carlo techniques is the accept-reject method.

Imagine you want to generate random points under a complicated curve . The accept-reject algorithm works as follows:

  1. Enclose your function within a simpler shape for which you can easily generate random points (e.g., a rectangle). Let the height of this rectangle be , the maximum value of .
  2. Generate a random point uniformly within this rectangle.
  3. Accept the point if . This means the point falls under the curve.
  4. Reject the point if it's above the curve.
  5. The -coordinates of the accepted points will be distributed according to the probability distribution defined by .

This "hit-or-miss" approach is a cornerstone of Monte Carlo simulation.

Introduction to Event Generators

This part of the same lecture beautifully illustrates the accept-reject method using a simple visual example and then summarizes the general workflow.

Please watch these segments: (Slide 23, timestamp ~16:40 - 17:50): Pay close attention to the visual example of throwing random points in a box to estimate the area under a curve. This is the accept-reject method in action. (Slides 36-37, timestamp ~28:00 - 29:30): This provides a concise summary of the general procedure: generate a 'trial' from a simple distribution, then accept or reject it based on the ratio to the true, more complex distribution.


3. Application to Scattering

Let's apply this to our scattering process. The probability of scattering into a solid angle element is proportional to . Therefore, the probability distribution for the angles is:

For our theory, , which is a constant. So, the probability distribution simplifies to:

This means the distribution is uniform in (from 0 to ) but depends on (from 0 to ). Our task is to generate pairs of that follow this distribution.

Algorithm:

  1. Generate : Since the distribution is uniform in , we can generate it directly: , where is a uniform random number in .
  2. Generate : The probability distribution for is . We will use the accept-reject method.
    • The function we want to sample from is . Its domain is .
    • The maximum value is .
    • Trial Generation:
      a. Generate a trial angle uniformly from .
      b. Generate a second uniform random number from .
    • Accept-Reject Step:
      c. If , we accept .
      d. Otherwise, we reject it and try again with a new and .

The set of accepted pairs are our generated "events."

Test your understanding!

Why is the distribution of accepted points for expected to be flat for this isotropic scattering process, even though the distribution for itself follows ? (Hint: Think about the change of variables from to ).

Show answer

The probability element is . If we change variables to , then . The minus sign just indicates that as goes from to , goes from to . Ignoring the overall direction, the probability element in terms of is . This implies that the probability distribution is a constant, meaning the distribution of is uniform. This is a classic result for isotropic scattering.


4. Advanced Topic: Variance Reduction

The simple accept-reject method is powerful, but it can be inefficient if the function you are sampling has very sharp peaks, leading to a low acceptance rate. More advanced techniques, like importance sampling, are used to improve efficiency. The idea is to use a trial distribution that more closely matches the shape of the true distribution, concentrating the sampling effort in the "important" regions.

Comparison of Monte Carlo Integration Techniques with Variance Reduction
This figure illustrates the power of variance reduction. The top-left shows a challenging 'Camel' distribution to integrate. Plain Monte Carlo struggles, but by using smarter sampling distributions ('p_var', 'p_imp') that mimic the target function (bottom-left), the integration error (RMS deviation) decreases much faster with the number of samples (right plot). This is crucial for efficient computation in real-world problems.

While we won't implement these advanced methods today, it's important to know they exist, as they are fundamental to professional-grade event generators like PYTHIA and Herwig.


5. Your Task: Build a Simple Event Generator

Now, let's put this into practice. Your task is to write a Python script that implements the accept-reject algorithm to generate events for scattering and visualize the results.

Instructions:

  1. Set up your script: You will need numpy for random number generation and mathematical functions, and matplotlib.pyplot for plotting.
  2. Set the number of events: Define a variable, e.g., num_events = 10000, for the number of accepted events you want to generate.
  3. Implement the generation loop:
    • Create an empty list to store your accepted and angles.
    • Start a while loop that continues until you have collected num_events.
    • Inside the loop, perform one step of the accept-reject algorithm for described in Section 3.
    • If an angle is accepted, generate a corresponding uniform and append both to your list of events.
  4. Analyze the results:
    • Once the loop finishes, you will have a list of events.
    • Convert your list of angles to a NumPy array and calculate .
    • Use matplotlib.pyplot.hist to create two histograms:
      a. One for the distribution of the generated angles.
      b. One for the distribution of the generated values.
  5. Interpret the plots:
    • Does the histogram for resemble a curve?
    • Is the histogram for approximately flat, as predicted?

This exercise provides a hands-on feel for how theoretical distributions are turned into simulated data. For a real-world application of these very techniques, the paper "Particle physics phenomenology with python 3" (resource LINK) demonstrates using Monte Carlo integration to calculate cross-sections for a process in Fermi theory, and importantly, provides their Python code on GitHub—a great example of these principles in practice.


Conclusion

Congratulations! You have now built a rudimentary, but conceptually complete, Monte Carlo event generator. You've gone beyond calculating a single number and have simulated the statistical distribution of scattering outcomes predicted by a quantum field theory.

Key Takeaways:

  • An event generator uses Monte Carlo methods to produce samples of final-state particle configurations (e.g., momenta, angles) according to the probability distribution predicted by a given theory ().
  • The accept-reject method is a fundamental algorithm for sampling from an arbitrary probability distribution by generating trial events from a simpler distribution and stochastically accepting or rejecting them.
  • For isotropic scattering (like in our simple theory), the distribution of scattering events is uniform in the azimuthal angle and in .

This lesson concludes our first deep dive into a specific model, the theory. You have derived its Feynman rules, calculated a tree-level scattering amplitude, computed the cross-section, and now built a tool to simulate the events themselves.

Preview of the Next Lesson:
So far, we have only dealt with spin-0 scalar particles. The real world, however, is dominated by spin-1/2 fermions (electrons, quarks) and spin-1 bosons (photons, gluons). In the next module, we will begin our study of fermions by deriving the cornerstone of relativistic quantum mechanics: the Dirac equation. This will open the door to describing electrons and, eventually, to the theory of Quantum Electrodynamics (QED).