Giter VIP home page Giter VIP logo

templatefitter's Introduction

Vytautas Vislavicius
[email protected]
***This is the first/quick README of the fitter that will be updated in the future.***

Generic 1/2/3D chi2 fitter using RooFit. Functions, templates, you name it, it fits it.
Example of the fitter has been included in Example_2.C. Depending on your needs, it might be
sufficient to simply copy the macro from void Example_2() and with some modifications depending on your needs, the code should be running in no time.

Few things to consider:
-- The Example_2() uses two dummy histograms that mimic 2-particle correlation at high and low multiplicities, here called as target and template, respectively. The template is combined with Fourier harmonics and fitted into the target distribution to extract the scale of the template as well as different coefficients of Fourier harmonics. In practice this corresponds to template fit method to calculate v2 and v3 coefficients.
-- The MINOS treatment of uncertainties in RooFit is somewhat different, the reference addressing it will be added later
-- The fit function is defined in TemplateFunction.C. This has to be a class inheriting from FunctionObject and overriding the "()" and "isValid()" operator/function. The "()" operator contains a user-defined fit function, which can be a combination of analytical expressions, histograms, graphs, and virtually anything else. The function "isValid()" has to be defined by the user to check if all the relevant contents are set (e.g. if the evaluation of the function requires a histogram, in the "isValid()" function one would check if the histogram is set correct.). Please also note that since the "()" operator is treated as a TFX in the fitter, the possible uncertainties within the function (eg if there is a histogram with uncertainties within the function), these uncertainties will not contribute to the calculation of the chi2.
-- I am also working on including a generic TMinuit fitter in the class, which would allow for a user-defined chi2 prescription, this will probably have to wait a little bit more.

Overall, code is simple, but a lot of thought went into it. I have no way to control who, how,
and for which purpose one uses it, so please be fair and whenever using it, at least
acknowledge clearly the author of this.

templatefitter's People

Contributors

vvislavi avatar

Watchers

 avatar

Forkers

wenyacern

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.