This code is meant to simulate the processes involved in the detection of light emitted by aerogel by a multi-anode PMT. The code works by:
- Simulating a beam of particles (momentum, position, and the angle of the beam can be adjusted)
- A detector is also simulated which consists of:
- A multianode PMT or a set of a multi-anode PMT
- Two pieces of aerogel used to create the Cherenkov light
- An event is considered to be when a single particle impinges the detector
- This means that even if no light is emitted (i.e the particle is not greater than the Cherenkov threshold) it is still considered an event
- PositionClass: Determines the position of all objects in the code including the position of the beam and the detector components (aerogel and mPMT)
- DirectionClass: Determines the angle of all objects in the code
- BeamClass: Generates particles for each event, can set positions, angles, and momentum
- AerogelClass: This is where the particle creates the photons within each aerogel and where the event class is created.
- RandomEventClass: The class that contains the number of photons produced from a single particle. The event contains:
- DetectedEventClass: A class that represents when a photon is detected by a PMT has the same form as the RandomEventClass
- PMTClass: Sets the size, position, and the number of pixels of a mPMT. Also applies a crosstalk mask to the PMT to simulate crosstalk and also reads the quantum efficiency of the detector from the quantumEfficiency.csv file
- DetectorClass: Class used to simulate the detector components. Used to arrange the geometry of the detector and simulate the analysis that goes on in the detector.
- Very complicated read separate readme for the DetectorClass
OTHER: The graphFunctionsNamespace.h contains all the graphing code used to produced plots of the histogram.
The purpose of the code is to use the simulated likelihood distribution of the different events to separate between and <
events that will be truly measured.
Steps of Simulation (for a single particle):
- The particle will generate photons at a certain Cherenkov angle and a random interaction position (z position), phi angle, and energy.
- These are then detected randomly (based off the quantum efficiency) by the PMT
- You will have a distribution of pixels that are either hit OR not hit
- Based off of this distribution of hits (and the known momentum, position, and angle) the likelihood of the
or
hypothesis is tested
The likelihood is constructed with the hypothesis that a pixel of the mPMT can either have a probability of a photon detection or a probability that the photon is not detected, per pixel.
The equation above describes these probabilities where and < is the mean photoelectrons of that pixel (i) for a given particle. The log likelihood is then a sum of multiple detection probabilities for a particle, as shown in the equation below.This can be done per beam event, which is a description of a particle with a known momentum and position. This becomes a powerful tool in estimating beam parameters (such as momentum and position) as well as determining the probability of separation of the detector.
An example of determining the probability of separation can be performed for a beam of 5GeV pions as compared to a beam of 5GeV kaons perpendicular to the mPMT. This can be calculated by generating a histogram of the difference of log-likelihood of the pion events for the pion photoelectron means and kaon photoelectron means. The same can be done for the kaon events and a second histogram can be generated, the histograms are shown below.
From these generated histograms the separation factor, which is defined as the overlap between the kaon and pion histograms at the
To speed up the analysis it was proposed that the mean number of photons be simulated for a wide range of scenarios and then act as a look-up table. This is the purpose of the "MeanGeneratorCode". The logic of the code is very simple:
- x = 0.097 to 0.1030625m (5 steps)
- y = 0.097 to 0.1030625m (5 steps)
= 0.00 to 0.40 (30)
= 0.00 to
(30)
= 0.988 to 0.999 (20) and 0.999 to 1.0 (15)
After this was done the file was created and placed in the directory: /neut/datasrv2a/kgameil/MeanInterpolationDataBank_database_2018Jan26.txt
The w parameter was added to account for two things:
- The generated means do not accurately reflect the number of photons that there will be in the edges of the detector
- The interpolation process does not account for correlations between x,y, and theta
This has a direct effect on the log likelihood for a single particle.
If it is assumed that the minimum likelihood is at 0 then their are two possible equations for w:
The effectiveness of the w parameter was tested by using a minimization of the variables values for a given configuration. By viewing the distribution of the fitted values compared to the known true value (implemented in the code) the determination of the w parameter's effectiveness can be proven.
| W Parameter OFF | W Parameter ON | |
|---|---|---|
| Linear Interpolate Mean number of Photons (default) | ![]() |
![]() |
| Spline Interpolate Mean number of Photons | ![]() |
![]() |
The above plots show a sample of the w parameter test. Two things are being tested in the above plots: the w parameter and the interpolation method of the mean number of photons (linear vs spline). It can be seen that the combination of the linear interpolation results in the most Gaussian solution without any false minima or residual effects from the interpolation. The test was performed in a location which requires interpolation between all five parameters.
- main_betaScan.txt: the main file to produce SCAN graphs of the beta minimization from Minuit
- main_betaSweep.txt: produces loglikelihood histogram for different beta values
- main_meanVsbeta.txt: produces beta value vs mean Number of photon list
- main_parameter_histogram_sweep.txt: produces files of fitted histogram parameters as well as whether minuit returned any errors or warnings








