Code Monkey home page Code Monkey logo

ostap's Introduction

Ostap Project

ostap Coverage Status Build Status pipeline status Join the chat at https://gitter.im/OstapHEP/ostap DOI Anaconda-Server Badge

Nowadays ROOT and PyROOT are de-facto standard tools for performing physics analysis. The Ostap project is a community-driven initiative aiming to provide more user friendly and more intuitive interface to ROOT and PyROOT and extending the existing functionality.

Project started in 2009 from the private collections of python functions used in Kali - framework for calibration of LHCb electromagnetic calorimeter. A lot of functionality is picked from Bender project - python based physics analysis environment used in LHCb experiemnt. Till Autumn 2016 the project was a part of LHCb software suit and with great success has been used for preparation of approximately 60 physics papers. A standalone, LHCb independent version, has appeared at start of 2017

Key features include:

  • Very easy manipulations with ROOT and RooFit objects: histograms, trees, datasets, etc
  • Very easy interface to RooFit machinery
  • Extended set of models.PDFs for RooFit
  • Powerful, pickle-based persistency for object
  • Interactive ostap analysis environment

Dependencies

  • mandatory: ROOT version <6.22 or >=6.24, RooFit
  • highly desirable: numpy
    • mandatory for Fast Fourier Transform, used in histogram/function parameterization;
    • optional for some other issues, in particular for the prime number treatment;
  • optional: scipy
    • numerical integration (quadratures, cubatures), root finding, minimization;
    • ostap offers home-made replacements, but the native methods from scipy are more efficient;
  • optional: pathos, dill, multiprocess and ppt
    • needed for parallel processing;
    • ostap offers a multiprocessing-based replacement with reduced functionality;
  • optional: terminaltables
    • nice format of tables - in particular for nice printout for TTree, TChain, RooDataSet, ... ;
    • ostap offers a home-made replacement with a bit reduced functionalty.
  • desirable: [more_itertoos]
    • chunked stuff is used in parallelization for spliting jobs into chunks
    • ostap offers a home-made replacement
  • optional (only for python3, 3.6<=version ) : berkeleydb
    • python interface to Berkeley DB (libdb needs to be installed!)
  • optional (only for python3, 3.3<=version<3.10 ) : bsddb3
    • python interface to Berkeley DB (libdb needs to be installed!)

Setup

There are several possibilities to start working with Ostap, you can build Ostap on the Linux or lxplus/7, run the docker container and now the Ostap is available on conda and SWAN.

The possible setup options are described here

ostap's People

Contributors

eduardo-rodrigues avatar gitter-badger avatar katrinleinweber avatar mazurov avatar pro100tema avatar simonwaldherr avatar tatianaovsiannikova avatar vanyabelyaev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ostap's Issues

Confusing output of ROOT.TTree.statVar method

Output prints " ... mean = XXX +- YYY ...", which is a bit confusing, as YYY is an individual uncertainty of single entry, but not an uncertainty of the mean, which is also random value. Better switch to ""...mean=XXX rms=YYY...".

In principle, estimates of uncertainties for mean and rms random valuers (under the Gaussian hypothesis ) are also worth to be printed.

Let me alsothsnk authors for the incredible tool!!

`PhaseSpace3` and `PhaseSpace3s` do not agree

Ostap::Math::PhaseSpace3 and Ostap::Math::PhaeSpace3s do not agree

import ROOT, math
from   ostap.core.pyrouts  import Ostap
from   ostap.logger.logger import getLogger

logger = getLogger ("ChicPi")

PS3 = Ostap.Math.PhaseSpace3  ## <-- HERE 
PS3 = Ostap.Math.PhaseSpace3s ## <-- HERE  
GeV = 1.0
MeV = 0.001 * GeV


m_chic1 = 3510.67 * MeV
m_K     = 493.677 * MeV
m_pi    = 139.570 * MeV
m_p     = 938.272 * MeV
m_Lb    = 5619.60 * MeV


ps_pi = PS3 ( m_chic1 , m_pi , m_p )
ps_K  = PS3 ( m_chic1 , m_K  , m_p )

logger.info ( "PS(pi)                       : %s "  % ps_pi ( m_Lb ) )
logger.info ( "PS(K)                        : %s "  % ps_K  ( m_Lb ) )
r = ps_pi ( m_Lb ) / ps_K ( m_Lb )

theta_C = 13.02 * math.pi / 180.0
tc2     = math.tan (  theta_C ) **2
logger.info ( "PS(pi)/PS(K)                 : %s "  % r    )
logger.info ( "tan^2 theta_C                : %s "  % tc2  )
logger.info ( "PS(pi)/PS(K) * tan^2 theta_C : %s "  % ( r  * tc2 ) )

Problem during ostap installation

I have follow the direction to install ostap on my Ubuntu machine. However, when I execute

cmake .. -DCMAKE_INSTALL_PREFIX=..

I have the following error. I am wondering if you could tell me how to fix it. Thank you.

........
........
-- Configuring done (3.8s)
CMake Error at source/CMakeROOT_6_23.cmake:225 (add_dependencies):
The dependency target "ROOT::MathMore" of target "ostapDict" does not
exist.
Call Stack (most recent call first):
source/CMakeLists.txt:14 (include)

CMake Error at source/CMakeROOT_6_23.cmake:194 (target_link_libraries):
Target "ostap" links to:

ROOT::MathMore

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Call Stack (most recent call first):
source/CMakeLists.txt:14 (include)

CMake Error at source/CMakeROOT_6_23.cmake:226 (target_link_libraries):
Target "ostapDict" links to:

ROOT::MathMore

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

Call Stack (most recent call first):
source/CMakeLists.txt:14 (include)

-- Generating done (0.0s)
CMake Generate step failed. Build files cannot be regenerated correctly.

Error with ROOT.TMinuit

Seems TMinuit works not correctly as it fails if one tries to follow examples. (Ostap: 1.4.5.0, Python 3.8.0 | packaged by conda-forge | (default, Nov 22 2019, 19:11:38) )

In [1]: m = ROOT.TMinuit(9)
In [2]: help(m)
In [3]: m.addPar ( 'ququ' , 10 , 0.1 )

TypeError Traceback (most recent call last)
/home/adzyuba/miniconda3/envs/ostap-env/bin/ostap in
----> 1 m.addPar ( 'ququ' , 10 , 0.1 )

/home/adzyuba/miniconda3/envs/ostap-env/lib/python3.8/site-packages/ostap/fitting/minuit.py in mn_add_par(self, name, start, step, low, high)
225 ipar = len ( self )
226 ierr = ROOT.Long ( 0 )
--> 227 self.mnparm ( ipar , name , start , step , low , high , ierr )
228 #
229 return ierr

TypeError: void TMinuit::mnparm(int k, TString cnamj, double uk, double wk, double a, double b, int& ierflg) =>
could not convert argument 7 (use ctypes.c_int for pass-by-ref of ints)

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.