From 98d7cd3cc9db542fc596e999ab488d8710d17c25 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 6 Nov 2024 10:40:31 -0600 Subject: [PATCH 1/3] feat: integrate background merger --- scripts/run.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/scripts/run.sh b/scripts/run.sh index 92a3b8e..d7a0296 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -129,6 +129,36 @@ RECO_DIR=RECO/${TAG} RECO_TEMP=${TMPDIR}/${RECO_DIR} mkdir -p ${RECO_TEMP} ${BASEDIR}/${RECO_DIR} +# Mix background events +{ + date + eic-info + prmon \ + --filename ${LOG_TEMP}/${TASKNAME}.hepmcmerger.prmon.txt \ + --json-summary ${LOG_TEMP}/${TASKNAME}.hepmcmerger.prmon.json \ + -- \ + SignalBackgroundMerger \ + --rngSeed ${SEED:-1} \ + --nSlices ${EVENTS_PER_TASK} \ + --signalSkip ${SKIP_N_EVENTS} \ + --signalFile ${INPUT_FILE} \ + --bg1Freq ${BG1_FREQ:-""} \ + --bg1File ${BG1_FILE:-""} \ + --bg1Skip ${BG1_SKIP:-""} \ + --bg2Freq ${BG2_FREQ:-""} \ + --bg2File ${BG2_FILE:-""} \ + --bg2Skip ${BG2_SKIP:-""} \ + --bg3Freq ${BG3_FREQ:-""} \ + --bg3File ${BG3_FILE:-""} \ + --bg3Skip ${BG3_SKIP:-""} \ + --outputFile ${FULL_TEMP}/${TASKNAME}.hepmc3.tree.root + + # Use background merged file as input for next stage + INPUT_FILE=${FULL_TEMP}/${TASKNAME}.hepmc3.tree.root + # Don't skip events on the background merged file + SKIP_N_EVENTS=0 +} + # Run simulation { date From 4f857ec5e25488b9d273904b8d88946ff1d0d856 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 6 Nov 2024 12:05:58 -0600 Subject: [PATCH 2/3] fix: --bg1Skip requires numeric value --- scripts/run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index d7a0296..dcfaba6 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -144,13 +144,13 @@ mkdir -p ${RECO_TEMP} ${BASEDIR}/${RECO_DIR} --signalFile ${INPUT_FILE} \ --bg1Freq ${BG1_FREQ:-""} \ --bg1File ${BG1_FILE:-""} \ - --bg1Skip ${BG1_SKIP:-""} \ + --bg1Skip ${BG1_SKIP:-0} \ --bg2Freq ${BG2_FREQ:-""} \ --bg2File ${BG2_FILE:-""} \ - --bg2Skip ${BG2_SKIP:-""} \ + --bg2Skip ${BG2_SKIP:-0} \ --bg3Freq ${BG3_FREQ:-""} \ --bg3File ${BG3_FILE:-""} \ - --bg3Skip ${BG3_SKIP:-""} \ + --bg3Skip ${BG3_SKIP:-0} \ --outputFile ${FULL_TEMP}/${TASKNAME}.hepmc3.tree.root # Use background merged file as input for next stage From 6ae5ed1725422b55b1fca3909df52b32ac910df2 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 6 Nov 2024 12:06:40 -0600 Subject: [PATCH 3/3] feat: log hepmcmerger to file --- scripts/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index dcfaba6..23da781 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -157,7 +157,7 @@ mkdir -p ${RECO_TEMP} ${BASEDIR}/${RECO_DIR} INPUT_FILE=${FULL_TEMP}/${TASKNAME}.hepmc3.tree.root # Don't skip events on the background merged file SKIP_N_EVENTS=0 -} +} 2>&1 | tee ${LOG_TEMP}/${TASKNAME}.hepmcmerger.log | tail -n1000 # Run simulation {