Code Monkey home page Code Monkey logo

photon_purity's Introduction

Prerequisite

  • python 3
  • ROOT + RooFit
  • bucoffea

Instructions

The purity calculation is triggered by a single script:

./fit_photon_purity.py ./path/to/input

The input directory should be a klepto.dir_archive containing the processor output merged using bumerge.

Three steps are executed:

  1. The coffea input histograms are converted into template ROOT histograms. The templates are split into the data, and two fit templates for "good" and "fake" photons. The templates are created separately for different pt ranges and data taking years. The templates are saved into a ROOT file in the intermediate directory.

  2. The templates are read from the output file of step 1. A template fit is performed to estimate the purity. Plots for each pt bin and year showing the fit result are saved in the plots folder. The resulting purities from each bin are saved into results.pkl.

  3. The results.pkl file is read and the impurity is plotted as a function of the photon pt.

NOTE: Steps 1 and 2 are only executed if their respective output files do not exist yet. Therefore, if you want to re-run all of the steps, make sure to delete their respective output files first!

photon_purity's People

Contributors

alpakpinar avatar

Watchers

James Cloos avatar

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.