Skip to content

Instantly share code, notes, and snippets.

@DraTeots
Last active June 5, 2023 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DraTeots/601778a25e485a2eafc9a04eb47e24fd to your computer and use it in GitHub Desktop.
Save DraTeots/601778a25e485a2eafc9a04eb47e24fd to your computer and use it in GitHub Desktop.
Get started with EIC simulation and reconstruction (EPIC)

Get started with EIC simulation and reconstruction

The quickest and recommended way to start with EIC software is eic-shell

The EIC environment eic-shell is a singularity/docker container with a curated selection of software components. It is the recommended way to use eicrecon as it already has all of the dependencies compiled with matching version numbers. This requires either singularity or docker to be installed on your local machine. Below are some quick start instructions for using Singularity.

Quick start for eic-shell

# if on the JLab CUE you should do fisrt:
# module load singularity/3.9.5

mkdir ~/eic
cd ~/eic

curl --location https://get.epic-eic.org | bash
./eic-shell

Don't forget to run module load singularity/3.9.5 if running at JLab CUE

Full tutorials on setting up you environment with eic-shell can be found here:

Using the eic-shell environment

Once inside the eic-shell you should source the geometry setup script since this is not done by default. Then, clone the EICrecon repository and build it:

source /opt/detector/setup.sh

git clone https://github.com/eic/EICrecon
cmake -S EICrecon -B build
cmake --build build --target install -- -j8

Assuming all goes well, EICrecon will be installed in the EICrecon directory. To set you environment up to use it, source the setup script generated by the build:

source EICrecon/bin/eicrecon-this.sh

Test the installation by running the eicrecon executable with no arguments:

eicrecon

Usage:
    eicrecon [options] source1 source2 ...

Description:
    Command-line interface for running JANA plugins. This can be used to
    read in events and process them. Command-line flags control configuration
    while additional arguments denote input files, which are to be loaded and
    processed by the appropriate EventSource plugin.

Options:
   -h   --help                  Display this message
   -v   --version               Display version information
   -c   --configs               Display configuration parameters
   -l   --loadconfigs <file>    Load configuration parameters from file
   -d   --dumpconfigs <file>    Dump configuration parameters to file
   -b   --benchmark             Run in benchmark mode
   -L   --list_factories        List all the factories without running
   -Pkey=value                  Specify a configuration parameter

Example:
    eicrecon -Pplugins=plugin1,plugin2,plugin3 -Pnthreads=8 inputfile1.txt

At this point, you can create your own user plugin or add a new factory (i.e. algorithm).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment