Quick Start
Contents
Quick Start#
With the right edep-sim
file and the software environment, running edep2supera
and generating a larcv
file is simple. In this example we use a prepared example file which we download below.
! wget https://web.stanford.edu/~kterao/edep-sim-example.root
--2022-11-16 08:24:43-- https://web.stanford.edu/~kterao/edep-sim-example.root
Resolving web.stanford.edu (web.stanford.edu)... 171.67.215.200, 2607:f6d0:0:925a::ab43:d7c8
Connecting to web.stanford.edu (web.stanford.edu)|171.67.215.200|:443... connected.
HTTP request sent, awaiting response...
200 OK
Length: 6604072 (6.3M)
Saving to: 'edep-sim-example.root.1'
edep-sim-example.ro 0%[ ] 0 --.-KB/s
edep-sim-example.ro 23%[===> ] 1.48M 7.27MB/s
edep-sim-example.ro 56%[==========> ] 3.54M 8.64MB/s
edep-sim-example.ro 87%[================> ] 5.51M 9.02MB/s
edep-sim-example.ro 100%[===================>] 6.30M 9.32MB/s in 0.7s
2022-11-16 08:24:44 (9.32 MB/s) - 'edep-sim-example.root.1' saved [6604072/6604072]
Running edep2supera
#
edep2supera
installation should come with run_edep2supera.py
executable. If you installed locally by pip install --user
, make sure your local installation is exposed to $PATH
(i.e. export PATH=$HOME/.local/bin:$PATH
)
! run_edep2supera.py --help
Usage: Provide option flags followed by a list of input files.
Options:
-h, --help show this help message and exit
-o FILE, --output=FILE
output (LArCV) filename
-c CONFIG, --config=CONFIG
configuration (a filename or pre-defined key)
-n INT, --num_events=INT
number of events to process
-s INT, --skip=INT number of first events to skip
The first argument should be the output (larcv
) filename to be created. The second argument should be the first edep-sim
file to be converted. You can keep adding more arguments to add more edep-sim
files.
! run_edep2supera.py -o larcv.root -c tutorial edep-sim-example.root
Input edep-sim files:
edep-sim-example.root
... processing 10 events.
Output: larcv.root
[WARNING] <SuperaDriver::Configure> starting
[WARNING] <SuperaDriver::Configure> BBox config...
[WARNING] <SuperaDriver::Configure> Label config...
[NORMAL] <IOManager::get_data> Created TTree sparse3d_pcluster_tree (id=0) w/ 0 entries...
[NORMAL] <IOManager::get_data> Created TTree sparse3d_pcluster_semantic_tree (id=1) w/ 0 entries...
[NORMAL] <IOManager::get_data> Created TTree cluster3d_pcluster_tree (id=2) w/ 0 entries...
[NORMAL] <IOManager::get_data> Created TTree cluster3d_pcluster_dedx_tree (id=3) w/ 0 entries...
[NORMAL] <IOManager::get_data> Created TTree particle_pcluster_tree (id=4) w/ 0 entries...
[NORMAL] <IOManager::finalize> Writing sparse3d_pcluster_tree with 10 entries
[NORMAL] <IOManager::finalize> Writing sparse3d_pcluster_semantic_tree with 10 entries
[NORMAL] <IOManager::finalize> Writing cluster3d_pcluster_tree with 10 entries
[NORMAL] <IOManager::finalize> Writing cluster3d_pcluster_dedx_tree with 10 entries
[NORMAL] <IOManager::finalize> Writing particle_pcluster_tree with 10 entries
[NORMAL] <IOManager::finalize> Closing output file
… and now you should have larcv.root
:)