Coder Social home page Coder Social logo

matthewervinchasco / root2struct Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 156 KB

Import ROOT Ntuples into MATLAB

Python 65.35% MATLAB 34.65%
atlas cern cern-root cms high-energy-physics lhc matlab particle particle-physics physics pyroot python open-science root root-cern large-hadron-collider quantum

root2struct's Introduction

The MATLAB code runs Python to use PyROOT for extracting data from a ROOT file. Running this package requires the compatibility of three platforms: MATLAB, Python, and ROOT. The version for each platform used here is listed below:

MATLAB version R2021b

Python version 3.8

ROOT version 6.30.04

Begin by creating a Python environment from within a MATLAB session with the command:

pyenv(Version=pathtoPython)

You will also need to know the path to your ROOT installation to execute the thisroot.bat script.

The main entry point is the MATLAB script root2struct.mlx View the Example.mlx file for context. The code file ".m" counterparts are included here for visibility.

The Python scripts CollectNtuples.py and NtupleParserCode.py are helper files used in root2struct.mlx, taking advantage of PyROOT.

The Python script hsimple2.py generates the py-hsimple2.root file used in the example. It is modified from the file found in the PyROOT tutorial: https://root.cern.ch/doc/master/group__tutorial__pyroot.html

root2struct's People

Contributors

matthewervinchasco avatar

Watchers

 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.