A project for obtaining energy-weighted correlations in Pythia and on CMS Open Data.
RENC_Intro.mp4
ResolvedEnergyCorrelators (RENCs, read "ren-sees") is a project dedicated to computing energy-weighted correlations in particle physics datasets. It facilitates the analysis of both simulated data from Pythia and real data provided publicly by CERN (and CMS).
Warning
Using CMS Open Data without performing the correct experimental data analysis procedures, including unfolding, event selection, and many more, does not and cannot provide results that can be called "true experimental analyses". CERN has graciously provided public access to a tremendous amount of open particle physics datasets, including both simulated and real data, and this has facilitated a wonderful bridge between the theoretical and experimental particle physics communities; any theoretical computations involving or compared to open data must be followed by the appropriate experimental procedures before they constitute any true experimental discovery.
-
Jet Properties:
Basic properties of jets -- useful for testing the structure of the C++ code and for seeing how python histograms can be plotted.
-
New Angles on Energy Correlators:
Introduces a new parameterization for N-point Energy Correlators (ENCs) as detailed in [2410.xxxx].
-
Energy Weighted Observable Correlators (EWOCs):
Not yet included: will introduce a new type of energy correlator on non-angular observables as detailed in [24yy.xxxx].
-
Python Classes:
./plot/plotter.py
contains a python plotting class inspired by the MIT Open Data plotting format;./plot/histogram.py
contains a python histogram class with several functionalities, including:- integrating out variables;
- finding sub-histograms;
- plotting 1-, 2-, and 3-dimensional data;
- Examples of the usage for these classes can be found, for example, in
./plot/jet_properties
.
The project is organized into several directories, each serving a specific purpose:
Makefile.inc
: Configuration file for compilation settings.
README.md
: Project documentation.
write/
: Contains the main C++ source code for computing Energy Correlators:
-
new_enc/
: Executables for computing Projected ENCs, Resolved 3-Point ENCs, and Resolved 4-Point ENCs; -
src/
: Core C++ source files; -
utils/
: Utility functions and classes for data processing; -
include/
: Header files defining interfaces and data structures; -
data/
: Houses datasets, including the CMS 2011A Jet Primary Dataset.
plot/
: Houses python tools for data visualization:
-
plotter.py
: Plotter class inspired by the MIT Open Data plot format. -
histogram.py
: Contains a histogram class which is useful for plotting ENCs, testing their normalization, integrating over variables, finding sub-histograms, etc.. -
utils/
: Python utility modules. -
jet_properties/
: Example plotting code for plotting properties of jets from different samples. -
encs/
: Project-specific plotting code for ENCs.
output/
: Contains directories for storing output data and generated figures:
-
new_encs/
: Output data files from C++ ENC computations. -
new_enc_figures/
: Figures and plots generated using the tools in./plot/encs
.
bin/
: Example command-line code for generating events and output.
To install RENCs, follow these steps:
-
Clone the Repository
git clone https://github.com/samcaf/ResolvedEnergyCorrelators.git
-
Navigate to the Directory
cd ResolvedEnergyCorrelators
-
Configure the Makefile
Before compiling the code, you'll need to edit
Makefile.inc
to set up the necessary directories:- Open
Makefile.inc
in your preferred text editor. - Modify the following variables to match the installation paths and versions on your system:
SOFTWARE_DIR
PYTHIA_VERSION
FASTJET_VERSION
- Note: If you don't have Pythia or FastJet installed, you can try running the following after setting up the directories/version numbers above:
and
make download_pythia make install_pythia
respectively.make download_fastjet make install_fastjet
- Open
-
Compile the Code
Run
make
to compile all relevant C++ code, prepare output directories, download a text file containing the CMS 2011A Jet Primary Dataset (from FastEEC) towrite/data
, and set up a Python virtual environmentmake
If you run into problems with the Open Data event reader, such as
od::EventReader: Error: Input file not found.
please check that
write/data/
contains a file calledcms_jet_run2011A.opendata.txt
, and that the address to this file on your machine is the same as the variablecms_jets_file
in the header filewrite/include/opendata_utils.h
.
After installation, you are ready to start computing Energy-Weighted Correlations!
Note that to use the plotting tools provided in ./plot
, you will need to have access to the relevant python libraries; these are provided in the virtual environment after running make
, and can be accessed in bash, via
source ./plot/venv/bin/activate
To generate histogram files containing jet properties (mass, transverse momentum, pseudorapidity, etc.) with the keyword opendata_test
in the directory ./output/jet_properties/
, try running the following command:
./write/jet_properties --use_opendata true --n_events 100000 --nbins 100 --file_prefix opendata_test
You can look at/use/modify the plotting tools in ./plot/jet_properties
for some example plots of jet masses.
Additional examples, including examples for computing ENCs in Pythia, can be found in ./bin/
.
To generate files containing N-Point Energy Correlators (ENCs) with the keyword opendata_test
in the directory ./output/new_encs/
, try running one of the commands below.
You can use the plotting tools in ./plot/encs
, which can be modified to produce your own versions of the plots from [2410.xxxx].
Additional examples for computing ENCs, including examples for computing ENCs in Pythia, can be found in ./bin/
.
Generate PENCs by running:
./write/new_enc/2particle --use_opendata true --use_deltaR --use_pt --weights 1.0 --n_events 100000 --nbins 200 --file_prefix opendata_test
The weight 1.0 indicates the energy weight associated with a particle in the jet -- or the value of N-1 for the ENC. It can be replaced by any list of weights (any list of the desired values for N-1);
Generate RE3Cs with:
./write/new_enc/3particle --use_opendata true --use_deltaR --use_pt --weights 1.0 1.0 --n_events 100000 --nbins 150 --file_prefix opendata_test
The weights (1.0, 1.0) indicate the energy weights associated with a pair of resolved particles, and can be changed to any pair or list of pairs;
Generate RE4Cs using:
./write/new_enc/4particle --use_opendata true --use_deltaR --use_pt --weights 1.0 1.0 1.0 --n_events 100000 --nbins 150 --file_prefix opendata_test
The weights (1.0, 1.0, 1.0) can be changed to any list of triples.
We welcome contributions from the community! To contribute:
-
Fork the Repository
Click on the 'Fork' button at the top right corner of the repository page.
-
Create a New Branch
git checkout -b feature/YourFeature
-
Commit Your Changes
git commit -m "Add your feature"
-
Push to Your Branch
git push origin feature/YourFeature
-
Open a Pull Request
Navigate to the original repository and click on 'New Pull Request'.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or suggestions:
-
Email: samuelaf@mit.edu
-
GitHub Issues: Issue Tracker