Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_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
reconstruction_benchmarks
Merge requests
!166
Added track_finding
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added track_finding
track_finding
into
master
Overview
0
Commits
3
Pipelines
0
Changes
1
Merged
Whitney Armstrong
requested to merge
track_finding
into
master
3 years ago
Overview
0
Commits
3
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
c80dbe9c
Prev
Next
Show latest version
1 file
+
1
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
c80dbe9c
modified: multiple_tracks.sh
· c80dbe9c
Whitney Armstrong
authored
3 years ago
benchmarks/track_finding/multiple_tracks.sh
0 → 100644
+
105
−
0
Options
#!/bin/bash
function
print_the_help
{
echo
"USAGE:
${
0
}
"
echo
" OPTIONS: "
exit
}
POSITIONAL
=()
while
[[
$#
-gt
0
]]
do
key
=
"
$1
"
case
$key
in
-h
|
--help
)
shift
# past argument
print_the_help
;;
#--ana-only)
# ANALYSIS_ONLY=1
# shift # past value
# ;;
*
)
# unknown option
#POSITIONAL+=("$1") # save it in an array for later
echo
"unknown option
$1
"
print_the_help
shift
# past argument
;;
esac
done
set
--
"
${
POSITIONAL
[@]
}
"
# restore positional parameters
print_env.sh
## To run the reconstruction, we need the following global variables:
## - JUGGLER_INSTALL_PREFIX: Install prefix for Juggler (simu/recon)
## - JUGGLER_DETECTOR: the detector package we want to use for this benchmark
## - JUGGLER_DETECTOR_VERSION: the detector package we want to use for this benchmark
## - DETECTOR_PATH: full path to the detector definitions
if
[[
!
-n
"
${
JUGGLER_N_EVENTS
}
"
]]
;
then
export
JUGGLER_N_EVENTS
=
100
fi
#export JUGGLER_N_EVENTS=$(expr ${JUGGLER_N_EVENTS} \* 1)
export
JUGGLER_FILE_NAME_TAG
=
"multiple_tracks"
export
JUGGLER_GEN_FILE
=
"
${
JUGGLER_FILE_NAME_TAG
}
.hepmc"
export
JUGGLER_SIM_FILE
=
"sim_
${
JUGGLER_FILE_NAME_TAG
}
.root"
export
JUGGLER_REC_FILE
=
"rec_
${
JUGGLER_FILE_NAME_TAG
}
.root"
echo
"JUGGLER_N_EVENTS =
${
JUGGLER_N_EVENTS
}
"
echo
"JUGGLER_DETECTOR =
${
JUGGLER_DETECTOR
}
"
## generate the input events
root
-b
-q
"benchmarks/track_finding/scripts/gen_multiple_tracks.cxx(
${
JUGGLER_N_EVENTS
}
,
\"
${
JUGGLER_FILE_NAME_TAG
}
.hepmc
\"
)"
if
[[
"
$?
"
-ne
"0"
]]
;
then
echo
"ERROR running script"
exit
1
fi
echo
"Running geant4 simulation"
## run geant4 simulations
npsim
--runType
batch
\
--part
.minimalKineticEnergy 1000
*
GeV
\
-v
WARNING
\
--numberOfEvents
${
JUGGLER_N_EVENTS
}
\
--compactFile
${
DETECTOR_PATH
}
/
${
JUGGLER_DETECTOR
}
.xml
\
--inputFiles
${
JUGGLER_FILE_NAME_TAG
}
.hepmc
\
--outputFile
${
JUGGLER_SIM_FILE
}
if
[[
"
$?
"
-ne
"0"
]]
;
then
echo
"ERROR running script"
exit
1
fi
rootls
-t
${
JUGGLER_SIM_FILE
}
if
[[
-z
"
${
ANALYSIS_ONLY
}
"
]]
;
then
# Need to figure out how to pass file name to juggler from the commandline
gaudirun.py benchmarks/tracking/options/track_reconstruction.py
if
[[
"
$?
"
-ne
"0"
]]
;
then
echo
"ERROR running juggler"
exit
1
fi
fi
mkdir
-p
results/track_finding
root
-b
-q
"benchmarks/track_finding/scripts/rec_multiple_tracks.cxx(
\"
${
JUGGLER_REC_FILE
}
\"
)"
if
[[
"
$?
"
-ne
"0"
]]
;
then
echo
"ERROR running root script"
exit
1
fi
root_filesize
=
$(
stat
--format
=
%s
"
${
JUGGLER_REC_FILE
}
"
)
if
[[
"
${
JUGGLER_N_EVENTS
}
"
-lt
"500"
]]
;
then
# file must be less than 10 MB to upload
if
[[
"
${
root_filesize
}
"
-lt
"10000000"
]]
;
then
cp
${
JUGGLER_REC_FILE
}
results/.
fi
fi
Loading