Skip to content
Snippets Groups Projects
Commit 51d18951 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Sanitize hepmc3 inputs for files from S3

parent 164ada43
Branches
Tags
1 merge request!120Sanitize hepmc3 inputs for files from S3
...@@ -62,7 +62,7 @@ PLOT_TAG=${CONFIG} ...@@ -62,7 +62,7 @@ PLOT_TAG=${CONFIG}
echo "Running Geant4 simulation" echo "Running Geant4 simulation"
npsim --runType batch \ npsim --runType batch \
--part.minimalKineticEnergy 1000*GeV \ --part.minimalKineticEnergy 1000*GeV \
-v WARNING \ -v INFO \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--inputFiles ${GEN_FILE} \ --inputFiles ${GEN_FILE} \
......
...@@ -56,8 +56,9 @@ fi ...@@ -56,8 +56,9 @@ fi
## ============================================================================= ## =============================================================================
## Step 3: Copy the file (about 180 lines per event in DIS NC files) ## Step 3: Copy the file (about 180 lines per event in DIS NC files)
nlines=$((180*${JUGGLER_N_EVENTS})) nlines=$((180*${JUGGLER_N_EVENTS}))
DATA_URL=S3/eictest/ATHENA/EVGEN/DIS/NC/${EBEAM}x${PBEAM}/minQ2=1/pythia8NCDIS_${EBEAM}x${PBEAM}_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_vtxfix_1.hepmc
mc config host add S3 https://dtn01.sdcc.bnl.gov:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY} mc config host add S3 https://dtn01.sdcc.bnl.gov:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY}
mc head -n ${nlines} S3/eictest/ATHENA/EVGEN/DIS/NC/${EBEAM}x${PBEAM}/minQ2=1/pythia8NCDIS_${EBEAM}x${PBEAM}_minQ2=1_beamEffects_xAngle=-0.025_hiDiv_vtxfix_1.hepmc > ${TMP_PATH}/${GEN_TAG}.hepmc mc head -n ${nlines} ${DATA_URL} | sanitize_hepmc3 | sed -e 's| \-\?421 | 321 |g' > ${TMP_PATH}/${GEN_TAG}.hepmc
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR downloading file" echo "ERROR downloading file"
exit 1 exit 1
......
...@@ -90,7 +90,7 @@ echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" ...@@ -90,7 +90,7 @@ echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
## Step 1. Get the data ## Step 1. Get the data
if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then
mc -C . config host add S3 https://dtn01.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY mc -C . config host add S3 https://dtn01.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY
mc -C . cat --insecure ${DATA_URL} | head -n 1004 > "${JUGGLER_MC_FILE}" mc -C . head -n 1004 --insecure ${DATA_URL} | sanitize_hepmc3 > "${JUGGLER_MC_FILE}"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "Failed to download hepmc file" echo "Failed to download hepmc file"
exit 1 exit 1
......
...@@ -90,7 +90,7 @@ echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" ...@@ -90,7 +90,7 @@ echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
## Step 1. Get the data ## Step 1. Get the data
if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then
mc -C . config host add S3 https://dtn01.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY mc -C . config host add S3 https://dtn01.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY
mc -C . head -n $((2+5*${JUGGLER_N_EVENTS})) --insecure ${DATA_URL} > ${JUGGLER_MC_FILE} mc -C . head -n $((2+5*${JUGGLER_N_EVENTS})) --insecure ${DATA_URL} | sanitize_hepmc3 > ${JUGGLER_MC_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "Failed to download hepmc files" echo "Failed to download hepmc files"
exit 1 exit 1
......
...@@ -89,7 +89,7 @@ echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}" ...@@ -89,7 +89,7 @@ echo "JUGGLER_DETECTOR = ${JUGGLER_DETECTOR}"
## Step 1. Get the data ## Step 1. Get the data
if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then if [[ -n "${DATA_INIT}" || -n "${DO_ALL}" ]] ; then
mc -C . config host add S3 https://dtn01.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY mc -C . config host add S3 https://dtn01.sdcc.bnl.gov:9000 $S3_ACCESS_KEY $S3_SECRET_KEY
mc -C . cat --insecure ${DATA_URL} | head -n 1004 > "${JUGGLER_MC_FILE}" mc -C . head -n 1004 --insecure ${DATA_URL} | sanitize_hepmc3 > "${JUGGLER_MC_FILE}"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "Failed to download hepmc file" echo "Failed to download hepmc file"
exit 1 exit 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment