This project is forked from Dhevan, Aranya, and Stephen's repository, and extends the original program's functionality by parallelizing the ddsim
and reconstruction processes to test different ePIC configurations. The main program is epic_sim2.py
, which is a modified version of the original createSimFiles.py
and createGenFiles.py
.
- The
eic-shell
Singularity container must be installed and configured. - The
ePIC
detector must be installed and configured. - If using the
analyzeSimFiles
plugin (or any other plugin), compile it first. To compile the plugin, head toEICreconPlugins/analyzeLumiHits/build
and runcmake .. && make -j$(nproc)
. Verify the installation by exporting the plugin folder (export EICrecon_MY=${PWD}/EICrecon_MY
), ensuring that theanalyzeSimFiles.sh
file is located in theEICrecon_MY/plugins
directory. If it's missing, copy theanalyzeLumiHits.so
file from theEICreconPlugins/analyzeLumiHits/build
directory toEICrecon_MY/plugins
. Finally, run theeicrecon -Pplugins=analyzeSimFiles,JTest -Pjana:nevents=10
test command as described in the tutorial.
- Configure the
simulation_settings.json
file with the correct paths and desired parameters. - Run
epic_sim2.py
outside the Singularity container.
- A JSON configuration file (
simulation_settings.json
) containing simulation parameters. - ePIC detector configuration files (in XML format).
.hepmc
files generated by program based on the settings.- Singularity container image (
.sif
file).
- Loads and validates simulation settings from the JSON configuration file.
- Sets up logging and backup directories.
- Prepares the detector configurations.
- Executes simulations in parallel using
ProcessPoolExecutor
:- Enters the
eic-shell
Singularity container in each subprocess. - Sources the relevant detector configuration file.
- Runs the
ddsim
command. - Exports the
EICrecon_MY
plugin directory. - Optionally runs the
eicrecon
command for reconstruction.
- Enters the
- Simulated event files (ROOT files).
- Reconstruction output files (ROOT files, if enabled).
- Log files for each process.
- README file containing simulation parameters and settings.
├── 2.0x0.1px
│ ├── epic
│ ├── logs
│ ├── output_beamEffectsElectrons_20edm4hep.root
│ ├── output_beamEffectsElectrons_30edm4hep.root
│ ├── output_idealElectrons_20edm4hep.root
│ ├── output_idealElectrons_30edm4hep.root
│ ├── podio_output.root
│ └── recon
│ ├── recon_output_beamEffectsElectrons_20edm4hep.root
│ ├── recon_output_beamEffectsElectrons_30edm4hep.root
│ ├── recon_output_idealElectrons_20edm4hep.root
│ └── recon_output_idealElectrons_30edm4hep.root
├── execution_report.txt
├── overview.log
└── README.txt