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 eec. 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.0.1.tar.gz (355.8 kB view details)

Uploaded Source

Built Distributions

EnergyEnergyCorrelators-1.0.1-cp39-cp39-win_amd64.whl (359.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

EnergyEnergyCorrelators-1.0.1-cp39-cp39-manylinux2010_x86_64.whl (909.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

EnergyEnergyCorrelators-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl (898.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

EnergyEnergyCorrelators-1.0.1-cp38-cp38-win_amd64.whl (359.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

EnergyEnergyCorrelators-1.0.1-cp38-cp38-manylinux2010_x86_64.whl (908.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

EnergyEnergyCorrelators-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl (898.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

EnergyEnergyCorrelators-1.0.1-cp37-cp37m-win_amd64.whl (359.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

EnergyEnergyCorrelators-1.0.1-cp37-cp37m-manylinux2010_x86_64.whl (908.5 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

EnergyEnergyCorrelators-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl (898.3 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

EnergyEnergyCorrelators-1.0.1-cp36-cp36m-win_amd64.whl (359.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

EnergyEnergyCorrelators-1.0.1-cp36-cp36m-manylinux2010_x86_64.whl (908.5 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

EnergyEnergyCorrelators-1.0.1-cp36-cp36m-macosx_10_9_x86_64.whl (898.3 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file EnergyEnergyCorrelators-1.0.1.tar.gz.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1.tar.gz
  • Upload date:
  • Size: 355.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.1

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1.tar.gz
Algorithm Hash digest
SHA256 38dd57359d9e62fd1e85f86c651e25d398f1ef874d870fff14285ee8d019c61a
MD5 d096d212ad038cc7030115722ea4a0e5
BLAKE2b-256 3276a532955d5741e47f0979f0f3a891ad51a22e6a6b18c821c04e390e4044c9

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 359.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e135cd05b2ec504d187af3258b52c5e7521282747818d76d325e23251b0ecdf3
MD5 1e2e0fe721709dd19ac0661103b7f28f
BLAKE2b-256 5b126575905cc4bc9d68104400c64944f0437e5fc898d5f6d990be37cfbb24e7

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 909.0 kB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.1

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3863baea1b9bcb9a3ecb9bd769fd16322ee67e0efdf06bbb71a342fe63088030
MD5 0ec490d03351f641a9cfa044b795c8f7
BLAKE2b-256 ce93e836f84b5a7e668a1455c6addab1f0a893a9faca5354a59f416349055dcc

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ce93067ce1216a85b5763fbae18729c9953e41591e03d1c0421fac7ce42d50f8
MD5 375dad2d6bed47ed4b14600ccdc0259c
BLAKE2b-256 13a8adff10ed75b3fd831fb65b95fe3161acd9377af8de33b6cae3e0e25d39c9

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 359.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 31af670b5f6cb8a51c2b996dd3b0a2b98df98651eec97dbccd4673b03791533a
MD5 d29ea2f8ba5005989892ea9d1a05bd06
BLAKE2b-256 018fb7401733c2913f7bbee530914f5055e3a51e1aff1e5b7e73876052a663ac

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 908.7 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.1

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9e4f64a95ba417f7cd6f4a62041be289f95b18c12a1a16e169d74c14f1e2f018
MD5 8efde7b319a0710e64361dda95b3626e
BLAKE2b-256 63555a9c2c3d31a6f0755e3ca549dd5b68e35ef555586491683e4e2c2c4cffd9

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c5eb8b6111fa6b0b24ac3404c0a04aa24a9b3db64e641fe9ac35a97fca6e7372
MD5 b0ff3b9438f0a6c29a010bad1b5e896a
BLAKE2b-256 32751488319d47fd624feb32f72da8d920d00b66025ef20cdd64185043dc675d

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 359.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a9a00a30c2b22923f564d1d2a5e22a69287098e512cb9739a03366b2619f6a86
MD5 4dfd867ba7593724ab5a9ad73137f51e
BLAKE2b-256 770911e1892c6ab2483533e2791b896efa9fa2b5176fc6b732f1c210d36a9dd4

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 908.5 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.1

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 2e5062b576367994a1e609454519087ff38e139d7552e4d8a3ebf507c4e849ff
MD5 8f956cbe97dee0a7fafc76a4d4795c57
BLAKE2b-256 3703dc4b18c42234eec32477ed4f08f5502ff70628a54e98204eb65bae26e6e0

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 da5ce5e852353c129aa4349cf7dd32d45c24c4010a91c70940f2600ca198a90a
MD5 2ef157a2056230c25ac82329bcf08b68
BLAKE2b-256 e7aaf2b4825d1d9eed8bd9dd5ac6bc5e3991d10f9847a29fdc576452a8bf87fd

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 359.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 851a767503ae9d69619b0bd15e0bd09bc2e9131fc4ad5152c1e9d68a97c01407
MD5 058fb80f33bace94628d8f9e0211efc9
BLAKE2b-256 40eb365411e4b94d17475d76dfa7dfc69d825b5e633bc1efbff0a7655aa23d82

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: EnergyEnergyCorrelators-1.0.1-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 908.5 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.1

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e257b2ab750aff6fe047b91460dcd9e8f42001de6de356787c0854228b64bbf0
MD5 30de0562796c89a586675884fab3f1ad
BLAKE2b-256 66be27e973977e11ab255d37aa903b3595831930c6e649ae9c12c608f22725d1

See more details on using hashes here.

File details

Details for the file EnergyEnergyCorrelators-1.0.1-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for EnergyEnergyCorrelators-1.0.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ae1824f599bd3abeaf853c776294482a075a353917a75f0e2e757e63ce9cd44f
MD5 9c668ead25ad41c02cd14ff172d8d28c
BLAKE2b-256 4e0f799dc7632a9b852eeb7956d494218e5127b1429bcf5d6dd9fa3a26090296

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