Physical (real life) testing of the experimental device was volatile and expensive, so Geant4 was used to simulate the effectiveness of different device setups.
An existing build tool would take various configuration files (either a geometry or material configuration file), outputting a valid geometry file for which Geant4 can use to run simulations with.
The problem with the existing build tool was that it wasn't portable.
A set of example configuration files was provided in the repository — which was fine, except that the build tool could only read from that example directory.
This meant that in order to experiment with new geometries (a very common occurance), researchers would have to insert new configuration files directly into the main git repo, polutting the main branch and interfering with the work of others.
This caused an awful headache for the many researchers working on the experiment at the same time, since the build tool had to be modified manually to load any new config files, creating version control issues as a side effect. This necessitated an overhaul of the build tool.
Before jumping straight into programming the new build tool, I used the issues of the old system to map a set of basic requirements for the new build tool:
Together, these changes would help to ensure that the new build tool is portable and will work on any machine.
The next step was to determine the language(s) and/or libraries needed to create the new build tool. I made a couple observations:
Provided the observations, Python became the clear winner as the base language for the new build tool. Most researchers already had Python 2 and 3 from pre-existing scientific libraries, and as such were familiar with it as well.
I implemented an interactive CLI leveraging InquirerPy. Its featureset includes the basic features as outlined during my development process, as well as other quality of life additions:
Many foreseen and unforeseen problems arose during development.
My build tool was integrated into the main project, and is now used by researchers across the world working on PIONEER. To this day, my API is extensible enough to accomodate rapidly evolving configuration files, add-ons, and more, while being simple and easy to use.
I created a tool to find the optimal opening angle of a potential calorimeter setup, by comparing multiple samples' accuracy against their cost.
Calorimeters are a crucial part of the PIONEER experiment. They record energy output from scattered particles, the result of which is analyzed for how well it adheres to currently established physics. As such, the accuracy of calorimeters is imperative to the success of the experiment.
Yet, the calorimeter is extremely expensive, meaning that there is a tradeoff to be made; accuracy for cost. I wrote a Jupyter notebook graphing the accuracy of a calorimeter against its opening angle to help researchers determine which angle would provide the best "bang for your buck" from simulated data using Geant4.
Since this project was more ambiguous / flexible than Case Study 1, I had to take some time to clarify what features had to be included.
Goal: Be able to compare multiple angle openings against their accuracies, to determine which angle is "accurate enough."
Wait — What does the "accuracy" of an angle opening even mean?
In this case, accuracy informally refers to the visual spread of a 2D histogram, as will be shown later.
From this, I constructed a basic set of requirements for the program:
There were a few options for how I could go about programming this tool:
For many reasons, building a Jupyter Notebook was the clear choice. It's modular, while maintaining the performance of Python. Moreover, Python's mature and extensive collection of data analysis tools and libraries would make it faster and easier to develop the tool.
Before creating the data analysis tool, I needed to gather simulation data.
I had access to a few sample ROOT files, but not enough to do meaningful analysis with. Furthermore, simulation settings would constantly change — such as to increase the number of events (i.e. increase precision), change angle openings, or the energy of an initial particle launch.
As such, in addition to the Jupyter Notebook, I developed an internal management tool for customizing/gathering simulation data. Its features include:
This internal tool allowed me to automatically generate hundreds of datasets with different angles/configurations in an organized fashion to be analyzed later, saving an immense amount of time.
The final Jupyter Notebook built on the internal tool to display the data collected. Kernels bin the data in multiple 2D histograms (energy vs. theta), then save the resulting plots as images.
The projections of those histograms is then saved as images as well.
Lastly, several projection plots representing a wide range of angle variety is overlayed and saved as well to illustrate general trends in energy as angle changes.
It's worth noting that multiprocessing was heavily used to process hundreds of images at once, which was possible due to the I/O limiting nature of reading the data files.