Project

General

Profile

Python-based EDM analysis » History » Version 6

« Previous - Version 6/22 (diff) - Next » - Current version
Gleb Lukicov, 10/26/2019 06:16 PM


Python-based EDM analysis

Python is awesome! You can start using it for your analysis in two ways: 1) writing Python-based ROOT macros (pyROOT), or interact with ROOT files directly in a JupyerLab environment (JupyROOT) 2) Convert ROOT file into Numpy/HDF/etc. format and fit using Python tools directly (e.g. scipy-optimize).

JupyROOT/pyROOT

Blinding
To get started you need to set-up the official blinding tools on your laptop here: https://cdcvs.fnal.gov/redmine/projects/gm2analyses/wiki/Library_installation
Then go to the bottom of that page, and follow "Using the code in Python3". There are already examples provided for a 5 parameter fit by Kim!

Here is one for the tracker fit for an EDM-based analysis
https://github.com/glukicov/EDMTracking/blob/master/SimpleBlindedFit.ipynb

To install JupyerLab on your laptop follow the instructions here: https://jupyterlab.readthedocs.io/en/stable/
Make sure to go via the pip installation route (not anaconda!).

That's it! The rest is the same as using a ROOT C macro, but being in a Jupyer environment one can execute things interactively and use native Python plotting tools.

ROOT-independent analysis
*This section will be updated with more details soon *