EWP-BplusToKstMuMu-AngAna/Code/Scripts/Python Scripts
2022-08-30 11:45:57 +02:00
..
Generator Level Fit Python Scripts used for Angular Analysis for B+toK*+Pi0mumu 2022-08-24 11:23:16 +02:00
MC Fit Python Scripts used for Angular Analysis for B+toK*+Pi0mumu 2022-08-24 11:23:16 +02:00
properties.env Updated properties env file 2022-08-24 12:25:16 +02:00
README.md Adjusted setup in readme 2022-08-30 11:45:57 +02:00
requirements.yaml Adjusted setup in readme 2022-08-30 11:45:57 +02:00
root_file_inspect.py Python Scripts used for Angular Analysis for B+toK*+Pi0mumu 2022-08-24 11:23:16 +02:00
rootio.py Python Scripts used for Angular Analysis for B+toK*+Pi0mumu 2022-08-24 11:23:16 +02:00

Angular Analysis of B+toK*+Pi0Mu-Mu+

Setup

For this setup you will need to install miniconda on the machine you are working and do the following procedure:

  1. conda env create -f requirements.yaml
  2. Check with conda activate angularanalysis if the environment is working
  3. Check out the following page in order to install the analysis-tool package: https://github.com/jonas-eschle/analysis-tools
  4. Check out the following page in order to install the angular-analysis B->K*ll package: https://gitlab.cern.ch/LHCb-RD/ewp-bd2ksteeangular-legacy/-/tree/master/b2kstll

Afterwards you can use your conda environment in order to run the code. But before you do, you need to setup the properties.env. Inside of properties.env you will find different configuration variables which are used throughout the code in order to control the behavior of the code. Below you can find a table which summarizes what these environment variables do.

Environment Variable Use-Case
LOWER_COSTHETAK_CUT Controls the lower boundary of cos(theta_K)
UPPER_COSTHETAK_CUT Controls the upper boundary of cos(theta_K)
SYS_PATH We need one local package in order to make the code work, namely hep_analytics which you can also find in this repo, the interpreter needs to find that package, so set SYS_PATH to the relative path to hep_analytics
GEN_FILE Path to the Generator File
MC_FILE Path to the MC File
MC_PHSP_FILE Path to the PHSP MC File

If you want to see how to set the environment variables, have a look at properties.env. Also, I have run the code on the LHCbA1 machine but it should make no difference where you run the code. You are done!

Useful Scripts

root_file_inspect.py

This script can be used to look inside a root file and see which branches and features it includes. To kick it off, give it a try with:

  1. python root_file_inspect.py --file=ROOT_FILE_PATH --regex=.*

You do not need to set the regex flag but it can be useful if you search for some particular feature.