Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gondiaz/WCSimDataTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WCSim Python DataTools

This repository is a Python Package containing tools to process and read the simulation data for the WCTE experiment.

Dependencies

  • python
  • ROOT
  • WCSim
    Same ROOT version must be used for the compilation of WCSim and the tools provided for this package. The WCSim .root simulation files must have been produced with this particular version.

This package is known to work in the following platforms/software versions:

  • MacOS Ventura 13.2.1
    • Python 3.10.10
    • ROOT 6.24/06
  • Rocky Linux release 8.4 (Green Obsidian)
    • Python 3.7.8
    • ROOT 5.34/38
  • CentOS Linux release 7.9.2009
    • Python 3.10.13
    • ROOT 6.28/07

How To

install (recomended)

  1. Clone this repository (git clone)
  2. Move to git directory cd WCSimDataTools
  3. Use a conda environment: conda activate env-name
  4. Setup ROOT such that you can import ROOT
  5. Install the python package in editable mode pip install --editable .
    Installing in editable mode will allow you to develop package features.
  6. You can remove the package using pip uninstall wcsim-hdf5

.root to .hdf5 file conversion

After the installation, you can simply run the root-to-hdf5. It requires to provide the path to the WCSim library containing libWCSimRoot.dylib

root-to-hdf5 --wcsimlib /path/to/WCSim-build/ /path/to/files/*.root [-o outpath]

reading .hdf5 files

The wcsimreader package contains the tools to read the WCSim .hdf5 files. You can explore the data in the file by calling

from wcsimreader import utils
utils.explore_file(filename)

To read the files in a pandas.DataFrame instance you can use, for example for reading the table wcsimT/Tracks

from wcsimreader import utils
utils.read_table(filename, "wcsimT/Tracks")

To Do

  • Add Pi0 and NCapture data
  • Add tests
  • Implement conda package
  • Implement event filtering readers
  • Implement event filtering writers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •