Purpose
The [INSERT NAME HERE] allows the user to convert the .root file made by qpixrtd into a python pandas data frame which is then analyzed by the software. Functional form fitting is then performed on the data in order to calculate t0 values for each event. Outliers are removed, and a t0 distribution is found. The final output is a series of event reconstruction plots which contain the recreated hits, the calculated hits, and the original Geant 4 simulated events to compare to.
This page contains detailed instructions on the software use for Users (Those who wish to install and use the software for themselves), Developers (those who wish to develop their own software or build upon ours), and Maintainers (Experts who are designated as those who will maintain our software).
This page is divided into categories by:
Software Contents
The software contains four python codes: run_analysis.py, root_to_pandas.py, functional_form.py, and t0_hitmaker.py. Summaries of the different pieces of code will be described here. For more detail on the different codes, see the Mitchcomp_Qpix Github.
run_analysis.py
The purpose of run_analysis.py is to automate the execution of individual analysis scripts in a sequential order, eliminating the need for manual intervention by the user. This script has variables that designate the input/output locations of the root_to_pandas.py, the number of events, and the reset cutoff for main_subdf. Users should edit the variable list within run_analysis.py to cater to there own needs.
root_to_pandas.py
The purpose of root_to_pandas.py is to take the output root file generated by qpixrtd and convert the data into pandas data frames, which are more convenient and efficient for data analysis. The output of root_to_pandas.py includes four data frames, which are used by other code in this software.
functional_form.py
The purpose of functional_form.py is to take the data output of root_to_pandas.py and determine the pixel with the minimum pixel reset standard deviation for each event. The minimums are then used to calculated the line of best fit (functional form) and remove outliers to optimize the best fit. The output of functional_form.py is a text file containing the final best fit constant which is used by t0_hitmaker.py.
t0_hitmaker.py
The purpose of t0_hitmaker.py is to take the functional form fitting parameters from functional_form.txt and determine the t0 for each event. From the t0, we then reconstruct the x,y,z positions of the particle (muon) as it moves through the DUNE APA. The output of t0_hitmaker.py includes a t0 distribution histogram, a text file of the t0 parameters, a reconstruction data frame, and the yz distribution plots for each event.
Users Guide
For Tamu users, access to [INSERT NAME HERE] can be found on Grace [INSERT LOCATION HERE]. The software can be run by the following command:
$ python run_anlaysis.py /path/to/root/file/directory/ root_file.root
Alternatively, the script can be made executable with chmod +x run_analysis.py which allows for the following command:
$ ./run_analysis.py /path/to/root/file/directory/ root_file.rootWe highly recommend setting up a designated output directory, for example, ‘/10GeVMuons_100Events/’, to store either the RTD output root file directly or a symbolic link to it, as the outputs of run_analysis.py will be stored in the same directory.
Developers Guide
Box content
Maintenance Guide
Box content