Stats of processed input files as CSV or JSON, and of uploaded output files as CSV or JSON (up to 10000 files included)
File reset events, by site
Site
Allocated
Outputting
US_UCSD
108
0
UK_Manchester
41
0
NL_SURFsara
39
0
UK_RAL-Tier1
35
0
US_Wisconsin
17
0
US_PuertoRico
14
0
ES_PIC
13
0
UK_RAL-PPD
12
0
US_FNAL-FermiGrid
11
0
UK_QMUL
10
0
IT_CNAF
4
0
UK_Oxford
4
0
UK_Bristol
4
0
US_UChicago
2
0
NL_NIKHEF
2
0
Jobscript
#!/bin/bash
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# This script for running the genie workflow
# It is based on the 2x2 development (https://github.com/DUNE/2x2_sim/blob/feature_spine_on_data/run-genie/run_genie.sh)
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++
# the script with common functions
#++++++++++++++++++++++++++++++++++++++++
#source /exp/dune/app/users/twalton/2x2ProdWorkspace/v1.5.0/ND_Production/toolbox/scripts/NDUtilsForJustin.sh
source /cvmfs/dune.opensciencegrid.org/dunend/2x2/releases/${TWOBYTWO_RELEASE}/ndlar_prod_scripts/ND_Production/toolbox/scripts/NDUtilsForJustin.sh
#++++++++++++++++++++++++++++++++++++++++++
# sanity check
#++++++++++++++++++++++++++++++++++++++++++
if [[ "${DATA_TIER}" != "genie" ]]; then
echo -e "This script [$(basename $BASH_SOURCE)] submits the GENIE event generator jobs. Please see the help menu. The data tier is not defined correctly."
exit 0
fi
#++++++++++++++++++++++++++++++++++++++++
# Begin JustIN
#++++++++++++++++++++++++++++++++++++++++
justin_begin_of_job_commands
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# containers to store the generated files
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CREATED_FILES=()
WORKFLOW=()
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# get the genie primary input parameters
#
# The seed is based on justIN physical file name
# For a monte carlo event, justIN defines the physical file name as a integer with leading zeros
# Therefore, the first file will be defined as
# DID_PFN_RSE=monte-carlo-000001-000001 000001 MONTECARLO
# This will give a seed=1
#
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
export USE_MAXPATH=0
export SEED=$((INPUT_FILE + 0))
export RUN=$((SEED - 1))
export GENIE_PRODUCTION_TUNE=AR23_20i_00_000
export GENIE_XSEC_FILE=${CVMFS_STASHCACHE_DIR}/Flux/2x2EventGeneration/XSec/numi/genie/v3r4p00/AR2320i00000-k250-e1000/gxspl-NUsmall.xml
if [[ "${DETECTOR_CONFIG}" == "proto_nd" ]]; then
if [[ "${GENIE_ANTINU}" == "1" ]]; then
export DK2NU_DIR=${CVMFS_STASHCACHE_DIR}/Flux/g4numi/20220409/QGSP_BERT/MediumEnergyNewTarget_OnAxis/antineutrino/flux
elif [[ "${GENIE_NU}" == "1" ]]; then
export DK2NU_DIR=${CVMFS_STASHCACHE_DIR}/Flux/g4numi/20210920/QGSP_BERT/MediumEnergyNewTarget_OnAxis/neutrino/flux
fi
if [[ "${GENIE_ROCK}" == "1" ]]; then
export FLUX_DET_LOCATION="MiniRun5-Rock"
export GENIE_DETECTOR_GEOM=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/geometry/Merged2x2MINERvA_v4/Merged2x2MINERvA_v4_justRock.gdml
export MAX_PATH_XML_FILE=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/run-genie/maxpath/Merged2x2MINERvA_v4_justRock.AR23_20i_00_000.maxpath.xml
else
export FLUX_DET_LOCATION="MiniRun5-Nu"
export GENIE_DETECTOR_GEOM=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/geometry/Merged2x2MINERvA_v4/Merged2x2MINERvA_v4_noRock.gdml
export MAX_PATH_XML_FILE=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/run-genie/maxpath/Merged2x2MINERvA_v4_noRock.AR23_20i_00_000.maxpath.xml
fi
elif [[ "${DETECTOR_CONFIG}" == "ndlar" ]]; then
if [[ "${GENIE_ANTINU}" == "1" ]]; then
export DK2NU_DIR=${CVMFS_STASHCACHE_DIR}/Flux/g4lbne/v3r5p10/QGSP_BERT/OfficialEngDesignSept2021_OnAxis/antineutrino/flux
elif [[ "${GENIE_NU}" == "1" ]]; then
export DK2NU_DIR=${CVMFS_STASHCACHE_DIR}/Flux/g4lbne/v3r5p10/QGSP_BERT/OfficialEngDesignSept2021_OnAxis/neutrino/flux
fi
if [[ "${GENIE_ROCK}" == "1" ]]; then
export FLUX_DET_LOCATION="DUNENDROCK"
if [[ "${SAND_GEOM}" == "sand_drift" ]]; then
export GENIE_DETECTOR_GEOM=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/geometry/anti_fiducial_nd_hall_with_lar_tms_sand_drift1_v2025.08.11.gdml
export MAX_PATH_XML_FILE=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/run-genie/maxpath/anti_fiducial_nd_hall_with_lar_tms_sand_drift1_v2025.08.11.AR23_20i_00_000.maxpath.xml
elif [[ "${SAND_GEOM}" == "sand_straw" ]]; then
export GENIE_DETECTOR_GEOM=${CVMFS_WORKKING_DIR}/ndlar_prod_scripts/ND_Production/geometry/anti_fiducial_nd_hall_with_lar_tms_sand_stt1_v2025.08.11.gdml
export MAX_PATH_XML_FILE=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/run-genie/maxpath/anti_fiducial_nd_hall_with_lar_tms_sand_stt1_v2025.08.11.AR23_20i_00_000.maxpath.xml
fi
else
export FLUX_DET_LOCATION="DUNEND"
if [[ "${SAND_GEOM}" == "sand_drift" ]]; then
export GENIE_DETECTOR_GEOM=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/geometry/nd_hall_with_lar_tms_sand_drift1_v2025.08.11.gdml
export MAX_PATH_XML_FILE=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/run-genie/maxpath/nd_hall_with_lar_tms_sand_drift1_v2025.08.11.AR23_20i_00_000.maxpath.xml
elif [[ "${SAND_GEOM}" == "sand_straw" ]]; then
export GENIE_DETECTOR_GEOM=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/geometry/nd_hall_with_lar_tms_sand_stt1_v2025.08.11.gdml
export MAX_PATH_XML_FILE=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/run-genie/maxpath/nd_hall_with_lar_tms_sand_stt1_v2025.08.11.AR23_20i_00_000.maxpath.xml
fi
fi
else
echo -e "Cannot determine the parameters for [${DETECTOR_CONFIG}], which is needed for the flux driver. Please see the help menu." 2>&1 | tee -a $envlog
fi
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# get the flux file based on the seed (run number)
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INDEX=$((SEED - 1))
DK2NU_FILES=("$DK2NU_DIR"/*.dk2nu*)
export DK2NU_FILE=${DK2NU_FILES[${INDEX}]}
#+++++++++++++++++++++++++++++++++++++++++++++++++++
# create an output file
#+++++++++++++++++++++++++++++++++++++++++++++++++++
BEAM="NuMI"
if [[ "${DETECTOR_CONFIG}" == "ndlar" ]]; then
BEAM="LBNF"
fi
HORN="FHC"
if [[ "${GENIE_ANTINU}" == "1" ]]; then
HORN="RHC"
fi
CHANNEL="_"
if [[ -n "${GENIE_EVENT_GENERATOR_LIST}" ]]; then
IFS=',' read -a channels <<< "${GENIE_EVENT_GENERATOR_LIST}"
CHANNEL=$( IFS=$'_'; echo "${channels[*]}" )
CHANNEL="_${CHANNEL}_"
fi
TIMESTAMP=$(date +'%Y_%m_%d_%H_%M_%S')
if [[ "${GENIE_ROCK}" == "1" ]]; then
TIMESTAMP="Rock_$(date +'%Y_%m_%d_%H_%M_%S')"
fi
export GENIE_OUTPUT_FILE_BASE="${BEAM}_${HORN}${CHANNEL}${TIMESTAMP}_${GENIE_VERSION}_${GENIE_BEAM_EXPOSURE}.${INPUT_FILE}"
export GENIE_OUTPUT_FILE="${GENIE_OUTPUT_FILE_BASE}.GHEP.root"
export GTRAC_OUTPUT_FILE="${GENIE_OUTPUT_FILE_BASE}.GTRAC.root"
echo -e "\tThe output GENIE file names are [${GENIE_OUTPUT_FILE}, ${GTRAC_OUTPUT_FILE}]" 2>&1 | tee -a $envlog
#++++++++++++++++++++++++++++++++++++++++++++++
# genie arguments
#++++++++++++++++++++++++++++++++++++++++++++++
ARGS_GEVGEN_FNAL=( \
-e "$GENIE_BEAM_EXPOSURE" \
-f "$DK2NU_FILE,$FLUX_DET_LOCATION" \
-g "$GENIE_DETECTOR_GEOM" \
-r "$RUN" \
-L cm -D g_cm3 \
--cross-sections "$GENIE_XSEC_FILE" \
--tune "$GENIE_PRODUCTION_TUNE" \
--seed "$SEED" \
-o "$GENIE_OUTPUT_FILE_BASE" \
)
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# get the optional input parameters
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[ "${GENIE_USE_MAX_PATH}" == "1" ] && ARGS_GEVGEN_FNAL+=( -m "$MAX_PATH_XML_FILE" )
[ -n "${GENIE_TOP_VOLUME}" ] && ARGS_GEVGEN_FNAL+=( -t "$GENIE_TOP_VOLUME" )
[ -n "${GENIE_ZMIN}" ] && ARGS_GEVGEN_FNAL+=( -z "$GENIE_ZMIN" )
[ -n "${GENIE_EVENT_GENERATOR_LIST}" ] && ARGS_GEVGEN_FNAL+=( --event-generator-list "$GENIE_EVENT_GENERATOR_LIST" )
#+++++++++++++++++++++++++++++++++++++++
# Execute the workflow
#++++++++++++++++++++++++++++++++++++++++
(
echo -e "Setup the genie software." 2>&1 | tee -a $envlog
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
setup dunesw ${DUNESW_VERSION} -q ${DUNESW_QUALIFIER}
export GDK2NUFLUXXML=${CVMFS_WORKING_DIR}/ndlar_prod_scripts/ND_Production/run-genie/flux/GNuMIFlux.xml
ups active 2>&1 | tee -a $envlog
echo -e "Executing the genie workflow for data stream [${DATA_STREAM}] and input file [${INPUT_FILE}]" 2>&1 | tee -a $envlog
echo -e "\tRunning the genie command [gevgen_fnal ${ARGS_GEVGEN_FNAL[@]}]" 2>&1 | tee -a $envlog
gevgen_fnal ${ARGS_GEVGEN_FNAL[@]}
if [ ! -f ${GENIE_OUTPUT_FILE_BASE}.${RUN}.ghep.root ]; then
echo -e "FATAL::The file [${GENIE_OUTPUT_FILE_BASE}.${RUN}.ghep.root] does not exist! Will not continue." 2>&1 | tee -a $envlog
exit 1
else
mv ${GENIE_OUTPUT_FILE_BASE}.${RUN}.ghep.root ${GENIE_OUTPUT_FILE}
fi
echo -e "Converting the native GENIE files to a format easily recognize by ROOT" 2>&1 | tee -a $envlog
echo -e "\tRunning the genie command [gntpc -i \"${GENIE_OUTPUT_FILE}\" -f rootracker -o \"${GTRAC_OUTPUT_FILE}\"]" 2>&1 | tee -a $envlog
gntpc -i "${GENIE_OUTPUT_FILE}" -f rootracker -o "${GTRAC_OUTPUT_FILE}"
if [ ! -f ${GTRAC_OUTPUT_FILE} ]; then
echo -e "FATAL::The file [${GTRAC_OUTPUT_FILE}] does not exist! Will not continue." 2>&1 | tee -a $envlog
exit 1
fi
)
#++++++++++++++++++++++++++++++++++++++++++++++++
# set information needed for metadata
#++++++++++++++++++++++++++++++++++++++++++++++++
CREATED_FILES+=("${GENIE_OUTPUT_FILE}")
CREATED_FILES+=("${GTRAC_OUTPUT_FILE}")
WORKFLOW+=("genie")
WORKFLOW+=("genie_converter")
export APPLICATION_DATA_TIER="genie-event-generator"
export NAMESPACE="neardet-2x2-lar"
if [[ "${DETECTOR_CONFIG}" == "ndlar" ]]; then
export NAMESPACE="neardet-lar"
fi
#++++++++++++++++++++++++++++++++++++++++
# create metadata json file
#++++++++++++++++++++++++++++++++++++++++
create_metadata_file mc genie
#+++++++++++++++++++++++++++++++++++++++
# End of justin job running
#+++++++++++++++++++++++++++++++++++++++
justin_end_of_job_commands
##############################################
#
# END OF RUNNING GENIE PRODUCTION JOBS
#
##############################################
exit 0
justIN time: 2025-09-18 15:54:36 UTC justIN version: 01.05.00