Skip to main content

A package to compare cutflow histograms from ROOT files.

Project description

cutflow_compare

Overview

cutflow_compare is a Python package designed to compare cutflow histograms from ROOT files. It provides a straightforward command-line interface for users to analyze and visualize differences in cutflow data across different regions.

Features

  • Compare cutflow histograms from multiple ROOT files.
  • Generate a CSV report of the comparison results.
  • Easy to use with command-line arguments for file input and region selection.

Installation

You can install the package using pip:

pip install cutflow_compare

Usage

After installation, you can use the command-line tool directly:

cutflow_compare --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3

Or, if running from source:

python cutflow_compare.py --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3

Note:

Make sure the same regions are present in both files with the same name.

Arguments

  • --files: List of input ROOT files to compare. Required.
  • --regions: List of regions to compare within the cutflow histograms. Required.
  • --separate-selections: Optional flag to keep selections separate instead of merging them.
  • --relative-error: Optional flag to include relative error calculations in the output.

Output

The tool generates a CSV file named cutflow_comparison_result.csv containing the comparison results. If the --relative-error flag is used, the CSV will also include relative error calculations for each region.

Example

cutflow_compare --files histoOut-compared.root histoOut-reference.root -r region1 region2 region3 --relative-error

This command compares the specified regions (region1, region2, region3) in the two provided ROOT files (histoOut-compared.root and histoOut-reference.root). It outputs the results to cutflow_comparison_result.csv, including relative error calculations.

This command will compare the specified regions in the two provided ROOT files and output the results to cutflow_comparison_result.csv.

Requirements

  • Python 3.6+
  • ROOT (must be installed separately, e.g., via conda: conda install -c conda-forge root)
  • pandas (install via pip: pip install pandas)
  • uncertainties (install via pip: pip install uncertainties)

Make sure all dependencies are installed before running the tool.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

Acknowledgments

This package utilizes the ROOT framework for data analysis and visualization.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cutflow_compare-0.1.5.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cutflow_compare-0.1.5-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file cutflow_compare-0.1.5.tar.gz.

File metadata

  • Download URL: cutflow_compare-0.1.5.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for cutflow_compare-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a8d9a58f0a504fa3e8210b6c31ebaaed4a6cb59b29e929d619c6b4451753e0f2
MD5 998cdb85dbd62b4f2621e1c0f6cb673f
BLAKE2b-256 fa685e0228363bba1b35a94d2d9ec0934414495d715f5c1caf865af26615715f

See more details on using hashes here.

File details

Details for the file cutflow_compare-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for cutflow_compare-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d4b6577c3ab5e9612a09b65b040ece9143753d5cf84ec90f3e6d5497d26feb65
MD5 e56fcb1c6163c7793c4f6291b80e7c50
BLAKE2b-256 2fe7661c07936f9899e7da79a2a70fa25d1415c2d66e831b12ea82f40f3e21d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page