Skip to content
Snippets Groups Projects
Commit 8e39696b authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: .gitlab-ci.yml

	modified:   bin/make_dawn_views
	renamed:    scripts/run_topside.py -> scripts/run_detector_simulation.py
	deleted:    scripts/run_simulation.sh
parent 90cc1188
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ stages: ...@@ -31,7 +31,7 @@ stages:
env: env:
stage: config stage: config
script: script:
- export JUGGLER_DETECTOR="topside" - export JUGGLER_DETECTOR="detector_template"
- | - |
if [[ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" || "$CI_COMMIT_BRANCH" == "master" ]]; then if [[ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" || "$CI_COMMIT_BRANCH" == "master" ]]; then
export JUGGLER_DETECTOR_VERSION="${CI_COMMIT_REF_NAME}" export JUGGLER_DETECTOR_VERSION="${CI_COMMIT_REF_NAME}"
...@@ -89,16 +89,16 @@ overlap_check: ...@@ -89,16 +89,16 @@ overlap_check:
needs: needs:
- ["compile"] - ["compile"]
script: script:
- checkOverlaps -c topside.xml | tee doc/overlap_check.out - checkOverlaps -c detector_template.xml | tee doc/overlap_check.out
- echo "$(cat doc/overlap_check.out | grep ovlp | wc -l) overlaps..." - echo "$(cat doc/overlap_check.out | grep ovlp | wc -l) overlaps..."
- if [[ "$(cat doc/overlap_check.out | grep ovlp | wc -l)" -gt "1" ]] ; then echo "Overlaps exist!" && false ; fi - if [[ "$(cat doc/overlap_check.out | grep ovlp | wc -l)" -gt "1" ]] ; then echo "Overlaps exist!" && false ; fi
topside:config_testing: detector:config_testing:
stage: test stage: test
needs: needs:
- ["compile"] - ["compile"]
script: script:
- checkOverlaps -c topside.xml | tee doc/overlap_check.out | wc -l - checkOverlaps -c detector_template.xml | tee doc/overlap_check.out | wc -l
- cat doc/overlap_check.out - cat doc/overlap_check.out
allow_failure: true allow_failure: true
......
...@@ -35,7 +35,7 @@ SKIP_EVENTS=0 ...@@ -35,7 +35,7 @@ SKIP_EVENTS=0
DETECTOR_ONLY=0 DETECTOR_ONLY=0
FILE_TAG="view" FILE_TAG="view"
DAWN_RUN_DIR="scripts/view1" DAWN_RUN_DIR="scripts/view1"
DETECTOR_FILE="detector_template.xml"
POSITIONAL=() POSITIONAL=()
while [[ $# -gt 0 ]] while [[ $# -gt 0 ]]
...@@ -47,6 +47,11 @@ do ...@@ -47,6 +47,11 @@ do
shift # past argument shift # past argument
print_the_help print_the_help
;; ;;
-c|--compact-file)
DETECTOR_FILE="$2"
shift # past argument
shift # past value
;;
-s|--skip) -s|--skip)
SKIP_EVENTS="$2" SKIP_EVENTS="$2"
shift # past argument shift # past argument
...@@ -92,7 +97,7 @@ rm -f *.prim ...@@ -92,7 +97,7 @@ rm -f *.prim
if [ "${DETECTOR_ONLY}" -eq "1" ] ; then if [ "${DETECTOR_ONLY}" -eq "1" ] ; then
./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \ ./scripts/run_detector_simulation.py -i scripts/input_data/few_events.hepmc \
-o derp.root -n 1 \ -o derp.root -n 1 \
--ui csh --vis -b -m macro/dawn_picture.mac & --ui csh --vis -b -m macro/dawn_picture.mac &
...@@ -108,7 +113,7 @@ kill %1 ...@@ -108,7 +113,7 @@ kill %1
else else
echo " Running simulation for tracks" echo " Running simulation for tracks"
./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \ ./scripts/run_detector_simulation.py -i scripts/input_data/few_events.hepmc \
-o derp.root -s ${SKIP_EVENTS} -n 1 \ -o derp.root -s ${SKIP_EVENTS} -n 1 \
--ui csh --vis -b -m macro/dawn_picture2.mac & --ui csh --vis -b -m macro/dawn_picture2.mac &
...@@ -117,21 +122,21 @@ kill %1 ...@@ -117,21 +122,21 @@ kill %1
fi fi
#./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \ #./scripts/run_detector_simulation.py -i scripts/input_data/few_events.hepmc \
# -o derp.root -s 2 -n 1 \ # -o derp.root -s 2 -n 1 \
# --ui csh --vis -b -m macro/dawn_picture2.mac & # --ui csh --vis -b -m macro/dawn_picture2.mac &
# #
#sleep 20 #sleep 20
#kill %1 #kill %1
#./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \ #./scripts/run_detector_simulation.py -i scripts/input_data/few_events.hepmc \
# -o derp.root -s 5 -n 1 \ # -o derp.root -s 5 -n 1 \
# --ui csh --vis -b -m macro/dawn_picture2.mac & # --ui csh --vis -b -m macro/dawn_picture2.mac &
# #
#sleep 20 #sleep 20
#kill %1 #kill %1
# #
#./scripts/run_topside.py -i scripts/input_data/few_events.hepmc \ #./scripts/run_detector_simulation.py -i scripts/input_data/few_events.hepmc \
# -o derp.root -s 6 -n 1 \ # -o derp.root -s 6 -n 1 \
# --ui csh --vis -b -m macro/dawn_picture2.mac & # --ui csh --vis -b -m macro/dawn_picture2.mac &
# #
......
...@@ -6,13 +6,13 @@ import logging ...@@ -6,13 +6,13 @@ import logging
import argparse import argparse
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
prog='run_topside', prog='run_detector_simulation',
description='''This runs the simulation the but that is okay''', description='''This runs the simulation the but that is okay''',
epilog=''' epilog='''
This program should be run in the "compact" directory. This program should be run in the "compact" directory.
''') ''')
parser.add_argument("-v","--verbose", help="increase output verbosity", type=int, default=0) parser.add_argument("-v","--verbose", help="increase output verbosity", type=int, default=0)
parser.add_argument("--compact", help="compact detector file",default="topside.xml") parser.add_argument("--compact", help="compact detector file",default="detector_template.xml")
parser.add_argument("--vis", help="vis true/false", action="store_true",default=False) parser.add_argument("--vis", help="vis true/false", action="store_true",default=False)
parser.add_argument("--ui", help="ui setting tcsh or qt; default=qt", type=str,default="qt",dest="ui") parser.add_argument("--ui", help="ui setting tcsh or qt; default=qt", type=str,default="qt",dest="ui")
parser.add_argument("-b","--batch", help="batch turns off vis/ui", action="store_true",default=False, dest="batch") parser.add_argument("-b","--batch", help="batch turns off vis/ui", action="store_true",default=False, dest="batch")
...@@ -86,7 +86,7 @@ def run(): ...@@ -86,7 +86,7 @@ def run():
outputfile = args.output outputfile = args.output
if outputfile is None: if outputfile is None:
outputfile = 'data/topside_' + time.strftime('%Y-%m-%d_%H-%M') outputfile = 'data/detector_template_' + time.strftime('%Y-%m-%d_%H-%M')
#rootoutput = geant4.setupROOTOutput('RootOutput', outputfile) #rootoutput = geant4.setupROOTOutput('RootOutput', outputfile)
#rootoutput.HandleMCTruth = True #rootoutput.HandleMCTruth = True
......
#!/bin/bash
npsim --runType batch --numberOfEvents 100000 \
--compactFile ./topside.xml \
--inputFiles ../datasets/data/emcal_electron_0GeVto30GeV_100kEvt.hepmc \
--outputFile ./sim_electron_0GeVto30GeV_100k_input.root
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment