Skip to content

Commit cca7147

Browse files
authored
Merge branch 'develop' into run-corsika
2 parents c9c3a01 + 233e39c commit cca7147

27 files changed

+1342743
-53
lines changed

admin/install_everything.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ pushd run-ndlar-flow
4444
./install_ndlar_flow.sh
4545
popd
4646

47+
pushd run-pandora
48+
./install_pandora.sh
49+
popd
50+
4751
pushd run-mlreco
4852
./install_mlreco.sh
4953
popd

geometry/anti_fiducial_nd_hall_with_lar_tms_sand_TDR_Production_geometry_v_1.0.3.gdml

Lines changed: 1342395 additions & 0 deletions
Large diffs are not rendered by default.

run-cafmaker/gen_cafmaker_cfg.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def main():
4040
ap.add_argument('--base-dir', required=True)
4141
ap.add_argument('--ghep-nu-name', required=False)
4242
ap.add_argument('--ghep-rock-name', required=False)
43-
ap.add_argument('--spine-name', required=True)
43+
ap.add_argument('--spine-name', required=False)
44+
ap.add_argument('--pandora-name', required=False)
4445
ap.add_argument('--tmsreco-name', required=False)
4546
ap.add_argument('--minerva-name', required=False)
4647
ap.add_argument('--edepsim-name', required=False)
@@ -54,6 +55,9 @@ def main():
5455
if not args.ghep_nu_name and not args.ghep_rock_name:
5556
raise ValueError("One or both of ghep-nu-name and ghep-rock-name must be specified")
5657

58+
if not args.spine_name and not args.pandora_name:
59+
raise ValueError("One or both of spine-name and pandora-name must be specified")
60+
5761
with open(args.cfg_file, 'w') as outf:
5862
outf.write(PREAMBLE)
5963

@@ -72,9 +76,15 @@ def main():
7276
caf_path = args.caf_path
7377
outf.write(f'nd_cafmaker.CAFMakerSettings.OutputFile: "{caf_path}"\n')
7478

75-
spine_path = get_path(args.base_dir, 'run-mlreco', args.spine_name,
76-
'MLRECO_SPINE', 'hdf5', args.file_id)
77-
outf.write(f'nd_cafmaker.CAFMakerSettings.NDLArRecoFile: "{spine_path}"\n')
79+
if args.spine_name:
80+
spine_path = get_path(args.base_dir, 'run-mlreco', args.spine_name,
81+
'MLRECO_SPINE', 'hdf5', args.file_id)
82+
outf.write(f'nd_cafmaker.CAFMakerSettings.NDLArRecoFile: "{spine_path}"\n')
83+
84+
if args.pandora_name:
85+
pandora_path = get_path(args.base_dir, 'run-pandora', args.pandora_name,
86+
'LAR_RECO_ND', 'root', args.file_id)
87+
outf.write(f'nd_cafmaker.CAFMakerSettings.PandoraLArRecoNDFile: "{pandora_path}"\n')
7888

7989
if args.minerva_name:
8090
minerva_path = get_path(args.base_dir, 'run-minerva', args.minerva_name,
@@ -86,10 +96,9 @@ def main():
8696
'TMSRECO', 'root', args.file_id)
8797
outf.write(f'nd_cafmaker.CAFMakerSettings.TMSRecoFile: "{tmsreco_path}"\n')
8898

89-
if args.edepsim_name:
90-
edepsim_path = get_path(args.base_dir, 'run-spill-build', args.edepsim_name,
91-
'EDEPSIM_SPILLS','root',args.file_id)
92-
outf.write(f'nd_cafmaker.CAFMakerSettings.EdepsimFile: "{edepsim_path}"\n')
99+
edepsim_path = get_path(args.base_dir, 'run-spill-build', args.edepsim_name,
100+
'EDEPSIM_SPILLS','root',args.file_id)
101+
outf.write(f'nd_cafmaker.CAFMakerSettings.EdepsimFile: "{edepsim_path}"\n')
93102

94103
if args.extra_lines:
95104
for extra_line in args.extra_lines.split(";"):

run-cafmaker/install_cafmaker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ setup edepsim v3_2_0c -q e20:prof
1111
mkdir install
1212
cd install
1313

14-
git clone -b v4.6.5 https://github.com/DUNE/ND_CAFMaker.git
14+
git clone -b v4.8.1 https://github.com/DUNE/ND_CAFMaker.git
1515
cd ND_CAFMaker
1616

1717
./build.sh

run-cafmaker/run_cafmaker.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
export ARCUBE_CONTAINER=${ARCUBE_CONTAINER:-fermilab/fnal-wn-sl7:latest}
4+
35
source ../util/reload_in_container.inc.sh
46

57
cd install/ND_CAFMaker
@@ -13,19 +15,20 @@ outFile=${tmpOutDir}/${outName}.CAF.root
1315
flatOutFile=${tmpOutDir}/${outName}.CAF.flat.root
1416
cfgFile=$(mktemp --suffix .cfg)
1517

16-
# Compulsory arguments.
18+
# Compulsory arguments regardless of use case.
1719
args_gen_cafmaker_cfg=( \
1820
--base-dir "$ARCUBE_OUTDIR_BASE" \
19-
--spine-name "$ARCUBE_SPINE_NAME" \
21+
--edepsim-name "$ARCUBE_SPILL_NAME" \
2022
--caf-path "$outFile" \
2123
--cfg-file "$cfgFile" \
2224
--file-id "$ARCUBE_INDEX" \
2325
)
2426

2527
[ -n "${ARCUBE_GHEP_NU_NAME}" ] && args_gen_cafmaker_cfg+=( --ghep-nu-name "$ARCUBE_GHEP_NU_NAME" )
2628
[ -n "${ARCUBE_GHEP_ROCK_NAME}" ] && args_gen_cafmaker_cfg+=( --ghep-rock-name "$ARCUBE_GHEP_ROCK_NAME" )
27-
[ -n "${ARCUBE_SPILL_NAME}" ] && args_gen_cafmaker_cfg+=( --edepsim-name "$ARCUBE_SPILL_NAME" )
2829
[ -n "${ARCUBE_MINERVA_NAME}" ] && args_gen_cafmaker_cfg+=( --minerva-name "$ARCUBE_MINERVA_NAME" )
30+
[ -n "${ARCUBE_SPINE_NAME}" ] && args_gen_cafmaker_cfg+=( --spine-name "$ARCUBE_SPINE_NAME" )
31+
[ -n "${ARCUBE_PANDORA_NAME}" ] && args_gen_cafmaker_cfg+=( --pandora-name "$ARCUBE_PANDORA_NAME" )
2932
[ -n "${ARCUBE_TMSRECO_NAME}" ] && args_gen_cafmaker_cfg+=( --tmsreco-name "$ARCUBE_TMSRECO_NAME" )
3033
[ -n "${ARCUBE_HADD_FACTOR}" ] && args_gen_cafmaker_cfg+=( --hadd-factor "$ARCUBE_HADD_FACTOR" )
3134
[ -n "${ARCUBE_EXTRA_LINES}" ] && args_gen_cafmaker_cfg+=( --extra-lines "$ARCUBE_EXTRA_LINES" )

run-convert2h5/convert_edepsim_roottoh5.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# Output array datatypes
1717
segments_dtype = np.dtype([("event_id","u4"),("vertex_id", "u8"), ("segment_id", "u4"),
18-
("z_end", "f4"),("traj_id", "u4"), ("file_traj_id", "u4"), ("tran_diff", "f4"),
18+
("z_end", "f4"),("traj_id", "i4"), ("file_traj_id", "u4"), ("tran_diff", "f4"),
1919
("z_start", "f4"), ("x_end", "f4"),
2020
("y_end", "f4"), ("n_electrons", "u4"),
2121
("pdg_id", "i4"), ("x_start", "f4"),
@@ -28,14 +28,14 @@
2828
("n_photons","f4")], align=True)
2929

3030
trajectories_dtype = np.dtype([("event_id","u4"), ("vertex_id", "u8"),
31-
("traj_id", "u4"), ("file_traj_id", "u4"), ("parent_id", "i4"), ("primary", "?"),
31+
("traj_id", "i4"), ("file_traj_id", "u4"), ("parent_id", "i4"), ("primary", "?"),
3232
("E_start", "f4"), ("pxyz_start", "f4", (3,)),
3333
("xyz_start", "f4", (3,)), ("t_start", "f8"),
3434
("E_end", "f4"), ("pxyz_end", "f4", (3,)),
3535
("xyz_end", "f4", (3,)), ("t_end", "f8"),
36-
("pdg_id", "i4"), ("start_process", "u4"),
37-
("start_subprocess", "u4"), ("end_process", "u4"),
38-
("end_subprocess", "u4"),("dist_travel", "f4")], align=True)
36+
("pdg_id", "i4"), ("start_process", "i4"),
37+
("start_subprocess", "i4"), ("end_process", "i4"),
38+
("end_subprocess", "i4"),("dist_travel", "f4")], align=True)
3939

4040
vertices_dtype = np.dtype([("event_id","u4"), ("vertex_id","u8"),
4141
("x_vert","f4"), ("y_vert","f4"), ("z_vert","f4"),

run-convert2h5/install_convert2h5.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
# DEPRECATED. In production we use the Python venv from the edep-sim container.
4+
35
# assume Shifter if ARCUBE_RUNTIME is unset
46
export ARCUBE_RUNTIME=${ARCUBE_RUNTIME:-SHIFTER}
57

run-convert2h5/requirements.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
cached-property==1.5.2
2-
fire==0.5.0
3-
h5py==3.1.0
4-
importlib-resources==5.4.0
5-
numpy==1.19.5
6-
six==1.16.0
7-
termcolor==1.1.0
8-
tqdm==4.64.1
9-
zipp==3.6.0
1+
fire
2+
h5py
3+
tqdm

run-convert2h5/run_convert2h5.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
export ARCUBE_CONTAINER=${ARCUBE_CONTAINER:-mjkramer/sim2x2:ndlar011}
4+
35
source ../util/reload_in_container.inc.sh
46
source ../util/init.inc.sh
57

run-edep-sim/run_edep_sim.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
export ARCUBE_CONTAINER=${ARCUBE_CONTAINER:-mjkramer/sim2x2:ndlar011}
4+
35
source ../util/reload_in_container.inc.sh
46
source ../util/init.inc.sh
57

0 commit comments

Comments
 (0)