Skip to content

Commit 22f2d60

Browse files
authored
Merge pull request #74 from DUNE/feature/abooth_run_pandora_qol
`run-pandora` Suggestions from John Back
2 parents 57d7035 + 212358a commit 22f2d60

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

run-pandora/run_flow2root.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ source $ARCUBE_DIR/util/init.inc.sh
2121
inName=${ARCUBE_IN_NAME}.${globalIdx}
2222
inFile=${ARCUBE_OUTDIR_BASE}/run-ndlar-flow/${ARCUBE_IN_NAME}/FLOW/${subDir}/${inName}.FLOW.hdf5
2323

24+
# Is this data or MC?
25+
isData=1
26+
[ "${ARCUBE_PANDORA_INPUT_FORMAT}" == "SPMC" ] && isData=0
27+
2428
# Convert input HDF5 file to ROOT
2529
source $ARCUBE_PANDORA_INSTALL/pandora.venv/bin/activate
26-
python3 $ARCUBE_PANDORA_INSTALL/LArRecoND/ndlarflow/h5_to_root_ndlarflow.py $inFile 0 $tmpOutDir
30+
run python3 $ARCUBE_PANDORA_INSTALL/LArRecoND/ndlarflow/h5_to_root_ndlarflow.py $inFile $isData $tmpOutDir
2731
deactivate
2832

2933
# Move ROOT file from tmpOutDir to output directory

run-pandora/run_pandora.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,19 @@ run ${ARCUBE_PANDORA_INSTALL}/LArRecoND/bin/PandoraInterface -i ${ARCUBE_PANDORA
3636

3737
# Move LArRecoND hierarchy analysis ROOT file to output dir
3838
tmpAnaOut=${tmpRunDir}/LArRecoND.root
39+
tmpMCHierOut=${tmpRunDir}/MCHierarchy.root
40+
tmpEvtHierOut=${tmpRunDir}/EventHierarchy.root
41+
3942
anaOutDir=${outDir}/LAR_RECO_ND/${subDir}
4043
anaOutFile=${anaOutDir}/${outName}.LAR_RECO_ND.root
44+
mcHierOutDir=${outDir}/MC_HIER/${subDir}
45+
mcHierOutFile=${mcHierOutDir}/${outName}.MC_HIER.root
46+
evtHierOutDir=${outDir}/EVT_HIER/${subDir}
47+
evtHierOutFile=${evtHierOutDir}/${outName}.EVT_HIER.root
48+
4149
mkdir -p ${anaOutDir}
4250
mv "${tmpAnaOut}" "${anaOutFile}"
51+
mkdir -p ${mcHierOutDir}
52+
mv "${tmpMCHierOut}" "${mcHierOutFile}"
53+
mkdir -p ${evtHierOutDir}
54+
mv "${tmpEvtHierOut}" "${evtHierOutFile}"

0 commit comments

Comments
 (0)