eic / epic-analysis

General (SI)DIS analysis framework for the EIC
GNU Lesser General Public License v3.0
3 stars 9 forks source link

EPIC-ANALYSIS

General purpose analysis software for (SI)DIS at the EIC

This repository provides a set of common tools for the analysis of both full and fast simulations, including the following features:

If you prefer to use your own analysis code, but would still like to make use of the common tools provided in this repository (e.g., kinematics reconstruction), this is also possible; you only need to stream the data structure you need, most likely within the event loop. In this situation, it is recommended you fork the repository (pull requests are also welcome).

Here is a flowchart showing the main classes (underlined) and the connections to upstream simulation output:

fig1


Setup and Dependencies

Initial setup

First, clone this epic-analysis Github repository:

git clone git@github.com:eic/epic-analysis.git      # if you have SSH permission
git clone https://github.com/eic/epic-analysis.git  # if you do not have SSH permission

This will create the directory epic-analysis, which you can then cd into.

Upstream Dependencies

These are common dependencies used for the upstream simulation, some of which are needed for epic-analysis as well.

Follow the EIC Software Environment Setup Guide to obtain and install the EIC software image.

If you upgrade your image (eic-shell --upgrade), you may need to clean build everything: make all-clean && make

Local Dependencies

These are additional dependencies needed by epic-analysis; they will be built locally and stored in the deps/ directory (see deps/README.md for more details). This section documents how to obtain and build local dependencies:

Delphes is the only local dependency that is not mirrored in deps/, so you must download and build it first:

deps/install_delphes.sh

While you are waiting for Delphes to build, you may want to:

Building

First, set environment variables:

source environ.sh

Then compile analysis-epic (and some other local dependencies):

make
make                     # builds dependencies, then `epic-analysis` (equivalent to `make all`)
make release             # build with optimization enabled
make debug               # build with debugging symbols
make clean               # clean `epic-analysis` (but not dependencies)

make deps                # builds only dependencies
make deps-clean          # clean dependencies
make all-clean           # clean `epic-analysis` and dependencies

make <dependency>        # build a particular `<dependency>`
make <dependency>-clean  # clean a particular `<dependency>`

Additional build options are available:

INCLUDE_CENTAURO=1 make  # build with fastjet plugin Centauro (not included in Delphes by default!)
EXCLUDE_DELPHES=1 make   # build without Delphes support; primarily used to expedite CI workflows
INCLUDE_PODIO=1 make     # build with support for reading data with PODIO

Quick Start: Tutorial Macros

If you're ready to try the software hands-on, follow the tutorials in the tutorial/ directory. Otherwise continue reading below.


Simulation

Delphes Fast Simulation

Delphes Wrapper

AnalysisDelphes

ePIC Full Simulation

ATHENA and ECCE Full Simulations


Analysis Procedure

After simulation, this repository separates the analysis procedure into two stages: (1) the Analysis stage includes the event loop, which processes either fast or full simulation output, kinematics reconstruction, and your specified binning scheme, while (2) the Post-processing stage includes histogram drawing, comparisons, table printouts, and any feature you would like to add.

The two stages are driven by macros. See examples in the tutorial directory, and follow the README.

In general, these macros will run single-threaded. See HPC documentation for guidance how to run multi-threaded or on a High Performance Computing (HPC) cluster.

Analysis Stage

Analysis Macro and Class

Bin Specification

Simple Tree

Post-Processing Stage

Post-Processing Macro and Class


Contributions