Skip to content

QPix Software Overview

The Q-Pix simulation process involves many packages used in series. The following flow chart documents the overall process.

QPix Input, Code, and Output Structure

The simulation begins in a couple different ways depending on what kind of events you are trying to simulate. Geant4 is a very powerful tool and can simulate almost anything. That being said, neutrinos are treated like space holder particles called geantinos which won’t do anything and won’t return any sort of interactions. If you want to simulate a particle in liquid argon (not a neutrino), you can do it directly with qpixg4. If on the other hand, you want to simulate a neutrino event, you will need to use a generator to produce the initial neutrino interactions and feed the final state particles into qpixg4 and Geant4.

genie: a neutrino event generator that specializes in higher energy events (good for beam neutrinos)

marley: (Model of Argon Reaction Low Energy Yields)a neutrino event generator that specializes in lower energy events (good for supernova neutrinos)

If you are trying to simulate low energy events like supernova neutrinos, you want to use marley. When qpixg4 was developed, they built in ways to use marley through qpixg4. 

That being said, if you are trying to simulate higher evergy neutrinos, marley’s range is not adequate, and another event generator needs to be used. Unfortunately, beam neutrinos were a more recent thing with the group and the same ease of use was not built into qpixg4. Genie will simulate a neutrino interaction (in our case, with an Argon atom) and walk the interaction step by step, following each particle until the remaining particles are considered stable. Essentially everything that Genie simulates is the stuff that occurs within the argon atom. Once the particles are stable enough to leave the nucleus, they are able to be inserted into qpixg4 as generator particles. Genie outputs all of this data into a .ghep.root file. This file is good, but has too much, and unproperly formatted data. Instead, we need to convert it to a different format. Genie has a way to do this, so using the .ghep.root file, it can be converted to a .gtrac.root file which is actually useful to us. 

qpixg4: 

Geant4 is a powerful software that simulates the interactions of particles within a detector/world. It allows you to define a world, and a detector volume, material, and geometry. It will use initial generator particles with parameters (position, momentum, energy, etc.) defined by the user and uses properties like mean free path to walk each generator particle through the volume until an interaction is forced. It will simulate the interaction, and walk the new product particles forward. This will continue until particles decay, are stopped or exit the detector. Fun note: since the mean free path of the neutrino is so large, Geant4 will skip the entire detector and no interactions will ever be triggered. This is why Geant4 is not a plausible option for simulating neutrino events. The Q-Pix group uses Geant4 in a manner that already has a detector set up to be a standard DUNE APA (a 2.3mx6.0mx3.6m box filled with liquid argon). Using a user made macro, qpixg4 will either simulate its own generator particles (for non neutrino events) or use the inputted generator particles (for neutrino events). It will then simulate the entire interaction and record the tracks, steps, hits, and other information in a .root file which is output at the end of the process. 

qpixrtd:

qpixrtd is a simulation software that turns the Geant4 hit information into simulated electrons, and then propagates those electrons towards a simulated pixel wall. It simulates the pixel response, the resets, and the readout. Ultimately it turns a simulated real event into the data that we see from the detector. If using the RTD script, there will be options for running the sample including a start event, end event, reset threshold (in units of electrons; 6250 = 1fc), and options to turn on/off noise and recombination. By doing this, you will be able to break large qpixg4 samples into smaller bites if desired, as well as run idealistic samples and analysis before attempting to tackle the full problem.  

QPix Light Simulations:

There is ongoing work to develop simulation tools that will focus on or incorporate photons into the simulation process.  Charged particles in liquid argon cause it to scintillate a lot and we know the speed of light in liquid argon is much much faster than the drift velocity of electrons. Knowing this information, we can use the time of the arrival of photons at the pixel wall to designate a relatively accurate t0, and the time of resets to determine a precise z position of the original tracks. At the moment, DUNE is being built to include photomultiplier tubes, however research is being done to incorporate light sensitive material to Q-Pix to allow for the collection of both light and charge. In order to simulate this, there needs to be new software that will be able to account for the scintillation photons, and propagate them accurately. This is still in the works, but will fall somewhere along the same place as qpixrtd.

qpixrec and further analysis:

 qpixrec is a python based software that turns the reset data of qpixrtd into various pandas dataframes. From these dataframes, an event reconstruction and t0 are calculated and catalogued into an event summary dataframe. The qpixrec software is modular. root_to_pandas.py takes the .root output of qpixrtd and constructs g4 and reset dataframes. functional_form.py takes the dataframes from root_to_pandas.py and finds a functional form between the RMS and mean(ToA) of a pixel’s reset data. t0_hitmaker.py takes the dataframes from root_to_pandas.py and the functional form from functional_form.py to calculate the t0 and reconstruct the event. Further analysis is done on Jupyter Notebooks.

Other Coding Resources

For links to coding resources including python, C++, bash/linux, and HTML/CSS, go to our mitchcomp computing resources page