Skip to main content

EEC computations in python

Project description

EnergyEnergyCorrelators

This library can be used to compute various Energy-Energy Correlators (EECs) [1, 2, 3] on collections of particles. The core computations are carried out efficiently in C++ utilizing the BOOST Histogram package (a copy of which is distributed with this library). Note that a C++14-compatible compiler is required by the BOOST Histogram package. The C++ interface is header-only to facilitate easy integration into any existing framework, including the FastJet library. A convenient Python interface is also provided using Cython and multiprocessing.

Documentation

This README is currently the documentation for the EEC library. In the future, this package may be incorporated into other projects, such as EnergyFlow or FastJet contrib.

The EEC library provides a variety of types of energy-energy correlators that can be computed, utilizing a flexible design sctructure that facilitates adding new computations easily. Each computation is represented by its own C++ class, which derives from the common EECBase class that contains common functionality such as passing in particles and extracting the histogrammed result.

Since the value of any EEC on a given event is a distribution, a histogram must be declared in advance that will be filled event-by-event. The computation classes are templated to allow for user specification of axes transformations. The template arguments should be models of the BOOST Histogram Transform concept, such as boost::histogram::axis::transform::id (the identity transform, bins will be linearly spaced) or boost::histgraom::axis::transform::log (to get logarithmically spaced bins).

Since version 0.1.0, the EEC library can raise the transverse momentum of each vertex of the EEC to an arbitrary power (only an exponent of 1 is infrared and collinear safe). Additionally, charge-dependent EECs can be computed by passing in particle charges and specifying an integer exponent for the charge of each vertex of the EEC.

Current EEC computations are described below:

  • EECLongestSide: Computes the N-point EEC distribution binned according to the longest side (largest angle) between the N particles. Supported values of N are 2, 3, 4, and 5 (larger values are simply computationally untenable). Since the resulting distribution is one-dimensional, there is a single template argument (that defaults to the identity) specifying which type of axis should be used. The constructor takes four required arguments: the number of bins, axis minimum, axis maximum, and value of N. Additionally, there are futher default arguments which are detailed below. EECLongestSide_id and EECLongestSide_log are provided as typdefs of this class with the axis transform already included.

  • EECTriangleOPE: This is a three-dimensional EEEC that uses coordinates that are particularly suited for studying the OPE limit where two of the three particles are close to collinear. There are three template arguments, corresponding to the xL, xi, and phi axes, respectively. The constructor takes nine arguments: for each axis (in the same order as the template arguments), the number of bins, axis minimum, and axis maximum. Additionally, the same EECTriangleOPE_id_id_id, EECTriangleOPE_log_id_id, EECTriangleOPE_id_log_id, and EECTriangleOPE_log_log_id are provided as typedefs of this class with the axes transforms already specified.

Common arguments to each EEC class are the following:

  • bool norm: whether or not to divide the transverse momenta by their sum prior to computing the EEC.
  • vector<double> pt_powers: exponent for the pT on each vertex of the EEC. Length must match the number of particles being correlated, or else be length 1 in which case the same power is used for all vertices.
  • vector<unsigned int> ch_powers: similar to pt_powers except that these are the exponents of the charges for each vertex. If any of these are non-zero, then particle charges are expected to be provided.
  • bool check_degen: do no EEC computation but check if any particle distances are degenerate will each other in a given event.
  • bool average_verts: do not separate the computation based on the asymmetry of the vertices, but instead average over all combinations (see below).

If pt_powers and ch_powers create distinguished vertices, then more than one histogram will be employed to calculate the EEC for each possibility (the average_verts option turns off this behavior). Currently, this is only relevant for N=3 computations: N=2 is automatically symmetric and N=4 and N=5 require symmetric vertices. The description method of the class contains information about the different histograms created.

The resulting histogram and corresponding errors can be accessed with the get_hist method, which accepts a boolean for whether or not to include the overflow bins and an index which defaults to 0 for which histogram to select (see above for how there can be multiple histograms per computation) and returns a pair of vectors of doubles, which are the flattened (C-style) histogram values and uncertainties. There are also bin_edges and bin_centers methods (specific to each computation class) that return the bins, which take an integer to specify an axis (if there is more than one).

Additionally, if the EEC_HIST_FORMATTED_OUTPUT macro is defined prior to the includion of EEC.hh (note that this requires that boost/format.hpp is available), then the histograms are printable to any output stream using the output method.

C++ Usage (Header-only)

The entire library is contained in a single header file, eec/include/EEC.hh. If you plan on using the EEC library with FastJet, ensure that PseudoJet.hh is included prior to including EEC.hh. This will expose an overloaded compute method for each EEC computation that accepts a vector of PseudoJet objects. Otherwise, there is a compute method that takes a vector of doubles, which must be size 3N where N is the number of particles, arranged as pT1, rap1, phi1, pT2, rap2, phi2, ..., pTN, rapN, phiN.

Python Usage

The EEC library also contains a Cython-based wrapper of the core C++ code. This is most easily used by installing via pip, e.g. pip install EnergyEnergyCorrelators. NumPy is the only required package. Note that a C++14-enabled compiler must be available for the compilation from source to succeed.

There is one Python class for each EEC computation. The templated arguments are dealt with by specifying the axis transforms as a tuple of strings. Currently, only 'id' and 'log' are supported, in the combinations for which there is a provided C++ typedef (see above). The arguments to the classes are straightforward, and can be examined more closely in core.pyx. There is also an eec method that can be used to parallelize computations on many events in Python.

References

[1] H. Chen, M. Luo, I. Moult, T. Yang, X. Zhang, H. X. Zhu, Three Point Energy Correlators in the Collinear Limit: Symmetries, Dualities and Analytic Results, [1912.11050].

[2] H. Chen, I. Moult, X. Zhang, H. X. Zhu, Rethinking Jets with Energy Correlators: Tracks, Resummation and Analytic Continuation, [2004.11381].

[3] L. Dixon, P. T. Komiske, I. Moult, J. Thaler, H. X. Zhu, Analyzing N-Point Energy Correlators with CMS Open Data, to appear soon.

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

EnergyEnergyCorrelators-1.2.0a0.tar.gz (385.8 kB view details)

Uploaded Source

Built Distributions

EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win_amd64.whl (394.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win32.whl (327.0 kB view details)

Uploaded CPython 3.9 Windows x86

EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win_amd64.whl (393.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win32.whl (326.9 kB view details)

Uploaded CPython 3.8 Windows x86

EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win_amd64.whl (393.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win32.whl (326.9 kB view details)

Uploaded CPython 3.7m Windows x86

EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win_amd64.whl (393.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win32.whl (326.8 kB view details)

Uploaded CPython 3.6m Windows x86

EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win_amd64.whl (393.1 kB view details)

Uploaded CPython 3.5m Windows x86-64

EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win32.whl (326.8 kB view details)

Uploaded CPython 3.5m Windows x86

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0.tar.gz.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0.tar.gz
  • Upload date:
  • Size: 385.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0.tar.gz
Algorithm Hash digest
SHA256 6cf762c86e11f5549707edad21ecdc31aeca95f1db9c9faab84aa81bc47eb118
MD5 22759c4fad8768e4ec948c3e28e8c919
BLAKE2b-256 4ebb105f2afac271d59e8469e109e467747f04d33bdb3cea70cdc8e2c05f43b1

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 394.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6bcb5d30a77b8bdee2ac0eef7bd471b3f15be91726e6539682edde26502aa487
MD5 f3454be1dd7de6feb6394d3cd244ce68
BLAKE2b-256 59bb4e67f66044437a18131531b40eaa93c07f905b3f99f63bb4af28957406c3

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win32.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 327.0 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 d0dea6e646f821658dd7e623427b0e5bb9eff0d973d2f02630874a41f2cf2cc2
MD5 0b38ebb56f8e31e96a002e1818472925
BLAKE2b-256 bf1194c1e552f2eb712d5e78d8cacfde3530743c0fb5b1e358dfbca9eadc2ea9

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 393.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5b374c4a91daf037d8790bc9fdb9822e1bb40f09beef70d41c4a512ac6e7a687
MD5 c3c6e616797f9fced100708f7359e27a
BLAKE2b-256 7f00fdc68bb18a01100768197b9b05583a72e4db82e6a29d71413816833b90b7

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win32.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 326.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 b3d3be349ff6575b6c9f2b910333a22df35cf999bf9a4905c7f01c15c22bf93c
MD5 96008a81c3f4d74cfe9759e87d7cd69a
BLAKE2b-256 cbebe7ad1a971ff70b6000131bb09cd4694f35ab001e1eb791580986ac261448

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 393.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 cdcd35736dc90ec4affd74090c2f2fcd5fd12cb3f960492afc6df8ad879db6bf
MD5 9a59a72da50f823eb1d034d026a4ee49
BLAKE2b-256 3a35e1f3febc6a9de755159a92379ddc47ed0e38e4c57654a52efb6e2399f06f

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 326.9 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 3892579523ced77a1f49993de25df76602590908168e82a65a953d806257364a
MD5 5b5591b7952dfa6b75d2ce28d25549d3
BLAKE2b-256 8cf8ad616bc9aa5eb08b71dd0aef2cf38948263769e44a1e38c3bdd6e97384d7

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 393.2 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 42bdb3719799a3710146d3db09ff3bb5ce692087148e5c4b15d1dc4e35e37e20
MD5 16c3b291707ca27501a5dc530655953a
BLAKE2b-256 ca1582610f6301fcaff96ecbea5c142c6186ccb2f7c54fc5187d695ef9a5f61e

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win32.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 326.8 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 2f2c7361487507990c814b88569a811a30b493c7f0b148186a62089350d5451e
MD5 2995c5ff6fc2b341d415e05728869482
BLAKE2b-256 96a30155e2b2c070f45f840a229593d54e4ce6eb99e07fbd2fdb4adafe37cfc7

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 393.1 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3feb3f646880bf809964f397878ff556cdd34727fa3465d6f889b8f6e5e18bd5
MD5 bfbe6e7a61dd66b37429509080f692b2
BLAKE2b-256 20f4fddcf08edca62384b9eaa2d3ed8fb4fafd7750a7ab376ac2f7d915641eee

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win32.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 326.8 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for EnergyEnergyCorrelators-1.2.0a0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 56711dd4665ec7a04c1095a10a839f1e481f6dc5732924cf96c4be54acc66244
MD5 450f38930fc5f90f87d4f67c6035aa7f
BLAKE2b-256 faaf17aef62ce8ec348c0cc66f13739e70a87bd28aa09fb83c2fb8bcd542ddd8

See more details on using hashes here.

Supported by

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