Skip to content
Snippets Groups Projects
Commit b381bd09 authored by Nicholas Styles's avatar Nicholas Styles
Browse files

Add new ITK+NSW sim test

parent 6b6d6146
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# art-description: ITK+NSW sim
# art-type: grid
# art-include: 21.9/Athena
# art-output: *.root
# art-output: *.xml
# art-output: dcube*
# Fix ordering of output in logfile
exec 2>&1
run() { (set -x; exec "$@") }
# Following specify which steps to run.
dosim=1
dorec=0 # Reco_tf.py not yet working
dophy=0 # If dorec=0, set dophy=1 to run InDetPhysValMonitoring over old ESD
# Following specify DCube output directories. Set empty to disable.
dcube_sim_lastref="dcube_alt_sim_last"
dcube_rec_lastref="dcube_alt_last"
artdata=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art
#artdata=/eos/atlas/atlascerngroupdisk/data-art/grid-input
name="ITKplusNSW"
script="`basename \"$0\"`"
evnt=$artdata/InDetSLHC_Example/inputs/EVNT.01485091._001049.pool.root.1
hits=physval.HITS.root
dcubemon_sim=SiHitValid_alt.root
dcubemon_rec=physval_alt.root
dcubecfg_sim=$artdata/InDetSLHC_Example/dcube/config/InclinedDuals_SiHitValid.xml
dcubecfg_rec=$artdata/InDetSLHC_Example/dcube/config/InclinedDuals_physval.xml
art_dcube=/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube
lastref_dir=last_results
if [ \( $dosim -ne 0 -a -n "$dcube_sim_lastref" \) -o \( $dophy -ne 0 -a -n "$dcube_rec_lastref" \) ]; then
run art.py download --user=artprod --dst="$lastref_dir" InDetSLHC_Example "$script"
run ls -la "$lastref_dir"
fi
dcube() {
# Run DCube and print art-result (if $2 is not empty)
step="$1" statname="$2" dcubemon="$3" dcubecfg="$4" dcuberef="$5" dcubedir="$6"
test -n "$dcubedir" || return
run ls -lLU "$art_dcube" "$dcubemon" "$dcubecfg" "$dcuberef"
if [ ! -s "$dcubemon" ]; then
echo "$script: $step output '$dcubemon' not created. Don't create $dcubedir output." 2>&1
test -n "$statname" && echo "art-result: 20 $statname"
return
fi
if [ ! -s "$dcuberef" ]; then
echo "$script: $step DCube reference '$dcuberef' not available. Don't create $dcubedir output." 2>&1
test -n "$statname" && echo "art-result: 21 $statname"
return
fi
echo "$script: DCube comparison of $step output '$dcubemon' with '$dcuberef' reference"
keep=""
test "$dcubedir" != "dcube" -a -d "dcube" && keep="dcube_keep_`uuidgen`"
test -n "$keep" && run mv -f dcube "$keep"
run "$art_dcube" "$name" "$dcubemon" "$dcubecfg" "$dcuberef"
dcube_stat=$?
test -n "$statname" && echo "art-result: $dcube_stat $statname"
test "$dcubedir" != "dcube" && run mv -f dcube "$dcubedir"
test -n "$keep" && run mv -f "$keep" dcube
}
if [ $dosim -ne 0 ]; then
run ls -lL "$evnt"
# Sim step: based on RTT SimInclinedDuals_GMX job:
run Sim_tf.py \
--inputEVNTFile "$evnt" \
--outputHITSFile "$hits" \
--skipEvents 0 \
--maxEvents 10 \
--randomSeed 873254 \
--geometryVersion ATLAS-P2-ITK-22-01-00_VALIDATION \
--conditionsTag OFLCOND-MC15c-SDR-14-03 \
--truthStrategy MC15aPlus \
--DataRunNumber 242000 \
--preInclude all:'InDetSLHC_Example/preInclude.SLHC.py,InDetSLHC_Example/preInclude.NoTRT_NoBCM_NoDBM.py,InDetSLHC_Example/preInclude.SLHC_Setup_InclBrl_4.py,InDetSLHC_Example/preInclude.SLHC_Setup_Strip_GMX.py' \
--preExec all:'from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags; SLHC_Flags.doGMX.set_Value_and_Lock(True); SLHC_Flags.LayoutOption="InclinedAlternative"' \
--postInclude all:'PyJobTransforms/UseFrontier.py,InDetSLHC_Example/postInclude.SLHC_Setup_InclBrl_4.py,InDetSLHC_Example/postInclude.SLHC_Setup.py,InDetSLHC_Example/postInclude.SiHitAnalysis.py' \
--postExec EVNTtoHITS:'ServiceMgr.DetDescrCnvSvc.DoInitNeighbours=False; from AthenaCommon import CfgGetter; CfgGetter.getService("ISF_MC15aPlusTruthService").BeamPipeTruthStrategies+=["ISF_MCTruthStrategyGroupIDHadInt_MC15"];'
echo "art-result: $? sim"
mv ./SiHitValid.root ./$dcubemon_sim
# DCube Sim hit plots
dcube Sim_tf sim-plot "$dcubemon_sim" "$dcubecfg_sim" "$lastref_dir/$dcubemon_sim" "$dcube_sim_lastref"
fi
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