This repository focuses on the studies of the hadronic endcap (forward endcap) insert in the official ePIC simulations. For our previous studies and a description of the detector, see our publication.
Feel free to add anything you find useful/relevant for these studies. But please stay organized (tried to make good directories) and include helpful commit messages, files with descriptive titles, and code with good comments.
- eic-shell
- Contains all the software needed for these simulation studies, including the ePIC simulation model, npsim, and EICrecon.
- Clone this repository
- Enter eic-shell
- Can now do data generation, simulation, and analysis (see below)
Due to the lack of official ePIC data in the insert region (3 < η < 4), we are generating our own. This is done with input/gen_particles.cxx
. This code generates a hepmc file of single-particles generated along the hadron beam axis (contains a rotation from the electron beam axis to hadron beam axis). Angles in this frame are referred to by η*. Currently, only single-particle hepmc files are being generated.
The generation can be done with input/generate_input.sh
and gen_and_sim_brycecanyon.sh
(latter in combination with simulation and reconstruction).
A handy conversion tool is found here. Some common conversions for these studies are listed below. η* = 2.0 is directed into the ECal and the other angles are directed towards the insert.
η* | 2.0 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 | 3.8 | 3.9 | 4.0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
θ (deg.) | 15.415 | 5.700 | 5.159 | 4.668 | 4.225 | 3.823 | 3.459 | 3.130 | 2.833 | 2.563 | 2.319 | 2.099 |
The generated hepmc files can now be fed into npsim
and the ePIC model to simulate the propagation of the single particles through the ePIC detector (uses Geant4).
Steps:
source /opt/detector/setup.sh
to load the ePIC detector model.npsim --compactFile $DETECTOR_PATH/epic_brycecanyon.xml --numberOfEvents ${num_events} --inputFiles ${hepmcfile} --outputFile output.edm4hep.root
eicrecon -Ppodio:output_file=eicrecon_out.root -Pjana:nevents=${num_events} -Pdd4hep:xml_files=epic_brycecanyon.xml output.edm4hep.root
#2 starts the simulation. epic_brycecanyon.xml
is the XML file of the ePIC system including the insert. Do not use arches. There is no insert in arches. The ${hepmcfile}
in --inputFiles ${hepmcfile}
option should be the file created during data generation.
#3 takes the output npsim/Geant4 file and feeds it to EICrecon. The last argument is the input file from step #2.
This simulation can be done with run_sim_brycecanyon.sh
or gen_and_sim_brycecanyon.sh
(latter in combination with data generation). Note these scripts will move your output files to a directory output
. If files with the same name exist in the output directory, they will be overwritten.
The analysis directory contains analysis code for both validation and physics studies. Analysis code should be in ROOT, Python, or Jupyter notebooks. To promote collaboration and easy accessibility, Jupyter notebooks are encouraged.
This directory should contain relevant plots and files completed during these studies. Any presentations made on these studies should also be put here.