Giter Site home page Giter Site logo

d0tok3pi's Introduction

D0ToK3pi

First time install

Preparing to use on LXPlus:

Use a recent root environment. To match the one expected, run:

lb-run LCG/84 $SHELL

where $SHELL is your shell of choice. If you are not in this environment for setup, the mkvirtualenv step will fail with a libpython error.

Recently, on LXPlus, I have also had to add LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/afs/cern.ch/sw/lcg/releases/LCG_87/Python/2.7.10/x86_64-slc6-gcc49-opt/lib to get things to work.

Make sure .local/bin is near the beginning of your path.

pip install --user --upgrade pip
pip install --user virtualenv virtualenvwrapper

Add the following to your ~/.bashrc file:

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source $HOME/.local/bin/virtualenvwrapper.sh

If using zsh, this should be your .zshrc file, or if using oh-my-zsh, this can be added with the virtualenvwrapper plugin.

Note on zsh: This should be a custom build, the one on LXPlus is buggy.

After reruning your bashrc, you'll need to make a k3pi environment:

mkvirtualenv k3pi
pip install numpy scipy matplotlib
pip install -r requirements.txt

Running after install

Then you should be able to source ./setup.sh (be careful, if you don't specify the ./ it might not work due to a bad name choice on LXPlus).

To make the ROOT classes, try running make in CPP/shape_classes then in CPP. This creates the ROOTex library.

Config files (k3pi_config)

Basic names are stored in config.py, including the eos root path.

The modes as instances of mode_base, in modes/mode_base.py. Year, polarity, etc. are stored here, and it can produce a list of files using the files in filelists/*. Modes are created in the modes directory.

In the main __init__.py there is a MODE context manager that picks a file based on mode, and gcm which gets the current mode.

Job options (job_options)

The options for the jobs use two python package directories, helpers and modes. These files use the modes defined previously in config_files, and mostly set up the adding or add the required descriptors. The files are run through ganga_collision (ganga) or davinci_collision (small test run). The completed files are prepared for download through make_lfn_file.

Utilities (k3pi_root and k3pi_utilities)

A command line program to apply a selection and merge files is in /k3pi_root/Tree_Splitter.py.

There are lots of utilities also. selective_load is a decorator that loads the current mode. Particle is a class that stores the info about a particle, such as title and daughters. parser is a utility for creating a parser. logger.py handles logging, variables.py defines a var class and creates a bunch of variables like pt with nice LaTeX representations and units. tex_compile.py contains tex compile commands. helpers.py reimplements things like progress bars (why not use Plumbum.cli or Click?). Several are obvious tools just with an added logger call, but there also are a few custom routines. variables_from_formulae parses a string for variables, make_cut_string builds a TCut, and get_mpv computes a most probable value using Gaussian kdes. Wrappers for loading and dumbing classifiers and BDTs are in bdt_utils.py. PlotConfig in plot_config is a class to help with plotting. There is also a base folder, /K3pi_plotting, that can pdf plotting tools.

Root C code (CPP)

This creates the ROOTex library, and uses PyBind11. It contains Leading, SecondLeading, etc. It has TreeSplitter.

Analysis (analysis)

Data can be downloaded from the grid with download_data.py.

A parser is implemented for bdt_studies.py and correlations.py. Data functions for BDT are in bdt_data.py. get_root_preselection.py will get the selections and uses ROOTex.

d0tok3pi's People

Contributors

dominikmuller avatar henryiii avatar

Watchers

James Cloos avatar  avatar Eduardo Rodrigues avatar Mike Sokoloff avatar  avatar Christoph Hasse avatar  avatar  avatar  avatar  avatar Cheryl Pappenheimer avatar

Forkers

jcob95

d0tok3pi's Issues

Double tagged sample

Set up job options for the double tagged decay from stripping.

  • Define new modes in the analysis code
  • Define new modes in the job options
  • Modify job options to work with both stripped and turbo data

Setup framework for MC

Requested some simple MC which is 65% done over the holidays which contains some of the major resonances.

The code needs to be updated to create the ntuples with truth matching and to allow for the to be downloaded and obtained in the code using mode.getdata(varlist, mc=True.

Will take care of this next week.

Secondary contamination

Use the double-tagged line to investigate the secondary contamination in the sample for tight ipchis2 cuts.

We need more MC

We need more MC to get some rough idea of efficiencies

We need:

  • Turbo + mDST working (Currently being validated)
  • Remove PID cuts from our trigger line
  • Write filtering options which select on our trigger (or stripping) lines and apply additional cuts in the production system.

Mass fit for sWeights

Due to the problems with the MC production, going to optimise the selection using sWeighted data.

Implementing multi-dimensional fits in the probfit packages.

RS model as background in WS fit

The background seems to comprised of almost exclusively RS decays which have the wrong pion and due to that with a slightly different lifetime acceptance.

Restructure the python packages

I made a bit of a mess.

Should make sure that k3pi_config does not require k3pi_utilities and hence some functionality from k3pi_utilities needs to be moved over.

Next ntuple generation

When rerunning the ntuple production, need to make following changes:

  • Compute the delta mass values immediately in DaVinci
  • Add GhostProb variable (only have ProbNNghost at the moment)
  • Consistently have chi2 values divided by NDOF

Optional:

  • Implement FilterDesktops with preselection requirements (e.g. the D0 PT cut)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.