Coder Social home page Coder Social logo

binfit_tutorial's Introduction

Hands-on binfit tutorial notebook

Tutorial for the binfit package developed for template fits in Belle II analyses.

As of now this is simply an annoted version of the notebook that comes with binfit in the examples directory. To get started with the tutorial, just open the notebook or click here.

Background information on binfit and relation to TemplateFitter

binfit is a python package for performing template fits in pure python developed and maintained by William Sutcliffe.

Its code is based in large parts on Maximillian Welsch's TemplateFitter package, which is also openly available on github.

Another fork of the TemplateFitter package is being actively developed by Felix Metzner, also on github. As far as I understand he extends it generalizes the template fitter, e.g. with support for arbitrary dimensions, adaptive binning.

Implementation / Features

The common features of the binfit an TemplateFitter / packages are (adapted from this TemplateFitter talk):

  • no reliance on ROOT: evaluation of the (log-)likelihood function relies on numpy operations
  • supports minimization with both scipy.optimize (LLSQ method) or iminuit (standalone Minuit implementation in python).
  • template likelihood fits (simultaneous in different channels)
  • fix, create bounds or profile parameters
  • different Toy MC study methods available

binfit-specific:

The distinguishing feature of binfit from the other TemplateFitter packages, is that it gets rid of for-loops over the decay-channels in the fit by using numpy matrix operations only. These are more performant, because numpy performs the loops in performant C in the background.

Other references / tutorials

An already existing example notebook can be found in the binfit/examples/ directory of the packages. It requires you to clone binfit (see Installation section below). I will take inspiration from that.

If you want to understand the theory of template fitting, I recommend Maximillian Welsch's talk. at the October 2019 B2GM. For uncertainty handling, I recommend Markus Prim's talk at the physics performance meeting: Template Fitting Including Systematics (youtube).

If you want to try out Max' TemplateFitter, e.g. to compare it to binfit, TemplateFitter also has good jupyter notebook tutorials.

Tutorial author

Michael Eliachevitch

binfit_tutorial's People

Contributors

meliache avatar

Watchers

 avatar  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.