Skip to content

Commit

Permalink
fix: avoid running dvcs, tcs, u_omega against S3
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc committed Nov 28, 2024
1 parent ac67c33 commit 4e5060b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 48 deletions.
22 changes: 6 additions & 16 deletions benchmarks/Exclusive-Diffraction-Tagging/dvcs/dvcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
print_env.sh

FILE_NAME_TAG="dvcs"
DATA_URL="S3/eictest/ATHENA/EVGEN/DVCS/DVCS_10x100_2M/DVCS.1.hepmc"
XROOTD_BASEURL="root://dtn-eic.jlab.org//work/eic2/EPIC"
INPUT_FILE="EVGEN/EXCLUSIVE/DVCS_ABCONV/10x100/DVCS.1.ab.hiDiv.10x100.hepmc3.tree.root"

export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc"
export JUGGLER_MC_FILE="${XROOTD_BASEURL}/${INPUT_FILE}"
export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"

Expand All @@ -87,18 +88,7 @@ echo "DETECTOR = ${DETECTOR}"
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions

## Step 1. Get the data
if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then
mc -C . config host add S3 https://eics3.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY
set +o pipefail
mc -C . head -n 1004 --insecure ${DATA_URL} | sanitize_hepmc3 > "${JUGGLER_MC_FILE}"
if [[ "$?" -ne "0" ]] ; then
echo "Failed to download hepmc file"
exit 1
fi
fi

### Step 2. Run the simulation (geant4)
### Step 1. Run the simulation (geant4)
if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
## run geant4 simulations
ddsim --runType batch \
Expand All @@ -115,7 +105,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
fi
fi

### Step 3. Run the reconstruction (eicrecon)
### Step 2. Run the reconstruction (eicrecon)
if [[ -n "${DO_REC}" || -n "${DO_ALL}" ]] ; then
if [ ${RECO} == "eicrecon" ] ; then
eicrecon ${JUGGLER_SIM_FILE} -Ppodio:output_file=${JUGGLER_REC_FILE}
Expand All @@ -141,7 +131,7 @@ if [[ -n "${DO_REC}" || -n "${DO_ALL}" ]] ; then
fi
fi

### Step 4. Run the analysis code
### Step 3. Run the analysis code
if [[ -n "${DO_ANALYSIS}" || -n "${DO_ALL}" ]] ; then
echo "Running analysis scripts"
rootls -t ${JUGGLER_REC_FILE}
Expand Down
22 changes: 6 additions & 16 deletions benchmarks/Exclusive-Diffraction-Tagging/tcs/tcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
print_env.sh

FILE_NAME_TAG="tcs"
DATA_URL="S3/eictest/ATHENA/EVGEN/EXCLUSIVE/TCS_ABCONV/${EBEAM}x${PBEAM}/hel_minus/TCS_gen_ab_hiAcc_${EBEAM}x${PBEAM}m_${TAG}_novtx.hepmc.gz"
XROOTD_BASEURL="root://dtn-eic.jlab.org//work/eic2/EPIC"
INPUT_FILE="EVGEN/EXCLUSIVE/TCS_ABCONV/${EBEAM}x${PBEAM}/hel_minus/TCS_gen_ab_hiAcc_${EBEAM}x${PBEAM}m_${TAG}.hepmc3.tree.root"

export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc"
export JUGGLER_MC_FILE="${XROOTD_BASEURL}/${INPUT_FILE}"
export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"

Expand All @@ -105,18 +106,7 @@ echo "DETECTOR = ${DETECTOR}"
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions

## Step 1. Get the data
if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then
mc -C . config host add S3 https://eics3.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY
set +o pipefail
mc -C . cat --insecure ${DATA_URL} | gunzip -c | head -n $((20+10*JUGGLER_N_EVENTS)) | sanitize_hepmc3 > "${JUGGLER_MC_FILE}"
if [[ "$?" -ne "0" ]] ; then
echo "Failed to download hepmc file"
exit 1
fi
fi

### Step 2. Run the simulation (geant4)
### Step 1. Run the simulation (geant4)
if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
## run geant4 simulations
ddsim --runType batch \
Expand All @@ -133,7 +123,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
fi
fi

### Step 3. Run the reconstruction (eicrecon)
### Step 2. Run the reconstruction (eicrecon)
export PBEAM
if [[ -n "${DO_REC}" || -n "${DO_ALL}" ]] ; then
if [ ${RECO} == "eicrecon" ] ; then
Expand Down Expand Up @@ -161,7 +151,7 @@ if [[ -n "${DO_REC}" || -n "${DO_ALL}" ]] ; then
fi
fi

### Step 4. Run the analysis code
### Step 3. Run the analysis code
if [[ -n "${DO_ANALYSIS}" || -n "${DO_ALL}" ]] ; then
echo "Running analysis scripts"
rootls -t ${JUGGLER_REC_FILE}
Expand Down
22 changes: 6 additions & 16 deletions benchmarks/Exclusive-Diffraction-Tagging/u_omega/u_omega.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
print_env.sh

FILE_NAME_TAG="u_omega"
DATA_URL="S3/eictest/ATHENA/EVGEN/EXCLUSIVE/omega/u_omegaNeutralDecay_5x41GeV_5k_Q2_1_5.hepmc"
XROOTD_BASEURL="root://dtn-eic.jlab.org//work/eic2/EPIC"
INPUT_FILE="EVGEN/EXCLUSIVE/omega/u_omegaNeutralDecay_5x41GeV_5k_Q2_1_5.hepmc3.tree.root"

export JUGGLER_MC_FILE="${LOCAL_DATA_PATH}/mc_${FILE_NAME_TAG}.hepmc"
export JUGGLER_MC_FILE="${XROOTD_BASEURL}/${INPUT_FILE}"
export JUGGLER_SIM_FILE="${LOCAL_DATA_PATH}/sim_${FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="${LOCAL_DATA_PATH}/rec_${FILE_NAME_TAG}.root"

Expand All @@ -86,18 +87,7 @@ echo "DETECTOR = ${DETECTOR}"
## - DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions

## Step 1. Get the data
if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then
mc -C . config host add S3 https://eics3.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY
set +o pipefail
mc -C . head -n 1004 --insecure ${DATA_URL} | sanitize_hepmc3 > "${JUGGLER_MC_FILE}"
if [[ "$?" -ne "0" ]] ; then
echo "Failed to download hepmc file"
exit 1
fi
fi

### Step 2. Run the simulation (geant4)
### Step 1. Run the simulation (geant4)
if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
## run geant4 simulations
ddsim --runType batch \
Expand All @@ -114,7 +104,7 @@ if [[ -n "${DO_SIM}" || -n "${DO_ALL}" ]] ; then
fi
fi

### Step 3. Run the reconstruction (eicrecon)
### Step 2. Run the reconstruction (eicrecon)
if [[ -n "${DO_REC}" || -n "${DO_ALL}" ]] ; then
if [ ${RECO} == "eicrecon" ] ; then
eicrecon ${JUGGLER_SIM_FILE} -Ppodio:output_file=${JUGGLER_REC_FILE}
Expand All @@ -141,7 +131,7 @@ if [[ -n "${DO_REC}" || -n "${DO_ALL}" ]] ; then
fi
fi

### Step 4. Run the analysis code
### Step 3. Run the analysis code
if [[ -n "${DO_ANALYSIS}" || -n "${DO_ALL}" ]] ; then
echo "Running analysis scripts"
rootls -t ${JUGGLER_REC_FILE}
Expand Down

0 comments on commit 4e5060b

Please sign in to comment.