Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
physics_benchmarks
Merge requests
!8
First DVMP analysis
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
First DVMP analysis
dvmp_ana
into
master
Overview
0
Commits
11
Pipelines
0
Changes
3
Merged
Sylvester Joosten
requested to merge
dvmp_ana
into
master
4 years ago
Overview
0
Commits
11
Pipelines
0
Changes
3
Expand
0
0
Merge request reports
Viewing commit
46e44c64
Prev
Next
Show latest version
3 files
+
64
−
31
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
46e44c64
Rewrote utility scripts and added lots of comments for documentation
· 46e44c64
Sylvester Joosten
authored
4 years ago
dvmp/dvmp.sh
+
60
−
25
Options
#!/bin/bash
#!/bin/bash
## Load the environment
## =============================================================================
## Run the DVMP benchmarks in 5 steps:
## 1. Build/install detector package
## 2. Detector simulation through npsim
## 3. Digitization and reconstruction through Juggler
## 4. Root-based Physics analyses
## 5. Finalize
## =============================================================================
echo
"Running the DVMP benchmarks"
## make sure we launch this script from the project root directory
PROJECT_ROOT
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
>
/dev/null 2>&1
;
pwd
-P
)
"
/..
pushd
${
PROJECT_ROOT
}
## =============================================================================
## Load the environment variables. To build the detector we need the following
## variables:
##
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
##
## You can ready config/env.sh for more in-depth explanations of the variables
## and how they can be controlled.
source
config/env.sh
source
config/env.sh
# these variables might not need exported.
## Extra environment variables for DVMP:
export
JUGGLER_FILE_NAME_TAG
=
"dvmp"
## file tag for these tests
JUGGLER_FILE_NAME_TAG
=
"dvmp"
# Generator file, hardcoded for now FIXME
# Generator file, hardcoded for now FIXME
export
JUGGLER_GEN_FILE
=
"results/dvmp/jpsi_central_electron-10on100-gen.hepmc"
JUGGLER_GEN_FILE
=
"results/dvmp/jpsi_central_electron-10on100-gen.hepmc"
# FIXME use the input file name, as we will be generating a lot of these
# FIXME use the input file name, as we will be generating a lot of these
# in the future...
# in the future...
export
JUGGLER_SIM_FILE
=
"sim_
${
JUGGLER_FILE_NAME_TAG
}
.root"
JUGGLER_SIM_FILE
=
"sim_
${
JUGGLER_FILE_NAME_TAG
}
.root"
export
JUGGLER_REC_FILE
=
"rec_
${
JUGGLER_FILE_NAME_TAG
}
.root"
JUGGLER_REC_FILE
=
"rec_
${
JUGGLER_FILE_NAME_TAG
}
.root"
echo
"JUGGLER_N_EVENTS =
${
JUGGLER_N_EVENTS
}
"
echo
"JUGGLER_DETECTOR =
${
JUGGLER_DETECTOR
}
"
echo
"JUGGLER_FILE_NAME_TAG =
${
JUGGLER_FILE_NAME_TAG
}
"
### Build the detector constructors.
## =============================================================================
## Step 1: Build/install the desired detector package
bash util/build_detector.sh
bash util/build_detector.sh
pushd
${
JUGGLER_DETECTOR
}
## =============================================================================
## Step 2: Run the simulation
## run g
eant4 simulation
s
echo
"Running G
eant4 simulation
"
npsim
--runType
batch
\
npsim
--runType
batch
\
--part
.minimalKineticEnergy 1000
*
GeV
\
--part
.minimalKineticEnergy 1000
*
GeV
\
-v
WARNING
\
-v
WARNING
\
--numberOfEvents
${
JUGGLER_N_EVENTS
}
\
--numberOfEvents
${
JUGGLER_N_EVENTS
}
\
--compactFile
${
JUGGLER_DETECTOR
}
.xml
\
--compactFile
${
DETECTOR_PATH
}
/
${
JUGGLER_DETECTOR
}
.xml
\
--inputFiles
../
${
JUGGLER_GEN_FILE
}
\
--inputFiles
${
JUGGLER_GEN_FILE
}
\
--outputFile
${
JUGGLER_SIM_FILE
}
--outputFile
${
JUGGLER_SIM_FILE
}
if
[[
"
$?
"
-ne
"0"
]]
;
then
if
[[
"
$?
"
-ne
"0"
]]
;
then
echo
"ERROR running
script
"
echo
"ERROR running
npsim
"
exit
1
exit
1
fi
fi
# Need to figure out how to pass file name to juggler from the commandline
## =============================================================================
## Step 3: Run digitization & reconstruction
echo
"Running Geant4 simulation"
# FIXME Need to figure out how to pass file name to juggler from the commandline
xenv
-x
${
JUGGLER_INSTALL_PREFIX
}
/Juggler.xenv
\
xenv
-x
${
JUGGLER_INSTALL_PREFIX
}
/Juggler.xenv
\
gaudirun.py
../
options/tracker_reconstruction.py
gaudirun.py options/tracker_reconstruction.py
if
[[
"
$?
"
-ne
"0"
]]
;
then
if
[[
"
$?
"
-ne
"0"
]]
;
then
echo
"ERROR running juggler"
echo
"ERROR running juggler"
exit
1
exit
1
fi
fi
ls
-l
ls
-l
popd
pwd
mkdir
-p
results/dvmp
## =============================================================================
## Step 4: Analysis
echo
"STAND-IN FOR ANALYSIS SCRIPT"
echo
"STAND-IN FOR ANALYSIS SCRIPT"
#root -b -q "dis/scripts/rec_dis_electrons.cxx(\"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\")"
#root -b -q "dis/scripts/rec_dis_electrons.cxx(\"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\")"
#if [[ "$?" -ne "0" ]] ; then
#if [[ "$?" -ne "0" ]] ; then
@@ -55,7 +78,19 @@ echo "STAND-IN FOR ANALYSIS SCRIPT"
@@ -55,7 +78,19 @@ echo "STAND-IN FOR ANALYSIS SCRIPT"
# exit 1
# exit 1
#fi
#fi
## =============================================================================
## Step 5: finalize
echo
"Finalizing
${
JUGGLER_FILE_NAME_TAG
}
benchmark"
## Copy over reconsturction artifacts as long as we don't have
## too many events
if
[[
"
${
JUGGLER_N_EVENTS
}
"
-lt
"500"
]]
;
then
if
[[
"
${
JUGGLER_N_EVENTS
}
"
-lt
"500"
]]
;
then
cp
${
JUGGLER_DETECTOR
}
/
${
JUGGLER_REC_FILE
}
results/dvmp/.
cp
${
JUGGLER_REC_FILE
}
results/dvmp/.
fi
fi
## cleanup output files
rm
${
JUGGLER_REC_FILE
}
${
JUGGLER_SIM_FILE
}
## =============================================================================
## All done!
echo
"
${
JUGGLER_FILE_NAME_TAG
}
benchmarks complete"
Loading