From cc3ec49cf09ea81741d08d502581b982ac7f3ee1 Mon Sep 17 00:00:00 2001
From: gligorov <vladimir.gligorov@cern.ch>
Date: Sat, 18 May 2019 11:03:51 +0200
Subject: [PATCH 1/8] script to run the velo perf scan

---
 checker/perfscans/PerfScan_VELO.sh | 56 ++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 checker/perfscans/PerfScan_VELO.sh

diff --git a/checker/perfscans/PerfScan_VELO.sh b/checker/perfscans/PerfScan_VELO.sh
new file mode 100644
index 00000000000..3a63bcde236
--- /dev/null
+++ b/checker/perfscans/PerfScan_VELO.sh
@@ -0,0 +1,56 @@
+cd ../..
+cp cuda/velo/common/include/VeloDefinitions.cuh bkpfile.bkp
+
+for par in 'max_scatter_seeding' 'max_scatter_forwarding' 
+do
+  for val in '0.05' '0.10' '0.20' '0.40' '0.60' '0.80' '0.90' '1.0'
+  do
+    echo 'Scanning VELO parameters' $par $val
+    sed -i s/$par\ =\ [^\;]*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout    
+    cd ..
+  done
+done
+
+for par in 'phi_extrapolation_base'
+do
+  for val in '0.02' '0.025' '0.030' '0.035' '0.040'
+  do
+    echo 'Scanning VELO parameters' $par $val
+    sed -i s/$par\ =\ [^\;]*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout
+    cd ..
+  done
+done
+
+for par in 'phi_extrapolation_coef'
+do
+  for val in '0.0001' '0.00015' '0.0002' '0.00025' '0.0003'
+  do
+    echo 'Scanning VELO parameters' $par $val
+    sed -i s/$par\ =\ [^\;]*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout
+    cd ..
+  done
+done
+
+cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh
+rm bkpfile.bkp
-- 
GitLab


From 2ce19f7fc4b86df2a5141cff9a3ec18a13dd18bf Mon Sep 17 00:00:00 2001
From: gligorov <gligorov@mail.cern.ch>
Date: Sat, 18 May 2019 12:25:50 +0200
Subject: [PATCH 2/8] scans for PV, SciFi, UT

---
 checker/perfscans/PerfScan_CompassUT.sh | 78 +++++++++++++++++++++++++
 checker/perfscans/PerfScan_PV.sh        | 69 ++++++++++++++++++++++
 checker/perfscans/PerfScan_SciFi.sh     | 56 ++++++++++++++++++
 checker/perfscans/PerfScan_VELO.sh      | 15 +++--
 4 files changed, 212 insertions(+), 6 deletions(-)
 create mode 100644 checker/perfscans/PerfScan_CompassUT.sh
 create mode 100644 checker/perfscans/PerfScan_PV.sh
 create mode 100644 checker/perfscans/PerfScan_SciFi.sh

diff --git a/checker/perfscans/PerfScan_CompassUT.sh b/checker/perfscans/PerfScan_CompassUT.sh
new file mode 100644
index 00000000000..3a5b6f2fc08
--- /dev/null
+++ b/checker/perfscans/PerfScan_CompassUT.sh
@@ -0,0 +1,78 @@
+cd ../..
+cp cuda/UT/common/include/CompassUTDefinitions.cuh bkpfile.bkp
+
+for par in 'max_considered_before_found' 
+do
+  for val in '1' '3' '6' '9' '12' '15'
+  do
+    echo 'Scanning CompassUT parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/UT/common/include/CompassUTDefinitions.cuh 
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/UT/common/include/CompassUTDefinitions.cuh
+  done
+done
+
+cp bkpfile.bkp cuda/UT/common/include/CompassUTDefinitions.cuh
+rm bkpfile.bkp
+
+cp cuda/UT/common/include/UTDefinitions.cuh bkpfile.bkp
+
+for par in 'minPT' 'minPTFinal'
+do
+  for val in '0.1' '0.2' '0.3' '0.4' '0.5' '0.6'
+  do
+    echo 'Scanning CompassUT parameters' $par $val
+    sed -i s/$par\ =\ \[^f\]\*f/$par\ =\ $val\f/g cuda/UT/common/include/UTDefinitions.cuh 
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout 
+    cd ..
+    cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
+  done
+done
+
+for par in 'minMomentum' 'minMomentumFinal'
+do
+  for val in '0.5' '1.5' '2.5' '3.5' '4.5' '6.0'
+  do
+    echo 'Scanning CompassUT parameters' $par $val
+    sed -i s/$par\ =\ \[^f\]\*f/$par\ =\ $val\f/g cuda/UT/common/include/UTDefinitions.cuh 
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout 
+    cd ..
+    cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
+  done
+done
+
+for par in 'yTol' 
+do
+  for val in '0.2' '0.35' '0.5' '0.65' '0.8' 
+  do
+    echo 'Scanning CompassUT parameters' $par $val
+    sed -i s/$par\ =\ \[^f\]\*f/$par\ =\ $val\f/g cuda/UT/common/include/UTDefinitions.cuh 
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout 
+    cd ..
+    cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
+  done
+done
+
+cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
+rm bkpfile.bkp
diff --git a/checker/perfscans/PerfScan_PV.sh b/checker/perfscans/PerfScan_PV.sh
new file mode 100644
index 00000000000..46de3dab09f
--- /dev/null
+++ b/checker/perfscans/PerfScan_PV.sh
@@ -0,0 +1,69 @@
+cd ../..
+cp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh bkpfile.bkp
+
+for par in 'zmin' 
+do
+  for val in '-300' '-275' '-250' '-225' '-200'
+  do
+    echo 'Scanning PV parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
+    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+  done
+done
+
+for par in 'zmax' 
+do
+  for val in '200' '225' '250' '275' '300'
+  do
+    echo 'Scanning PV parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
+    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+  done
+done
+
+for par in 'maxChi2' 
+do
+  for val in '7' '8' '9' '10' '11'
+  do
+    echo 'Scanning PV parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
+    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+  done
+done
+
+for par in 'minTracksInSeed' 
+do
+  for val in '1.5' '2.0' '2.5' '3.0' '3.5'
+  do
+    echo 'Scanning PV parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
+    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+  done
+done
+
+cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
+rm bkpfile.bkp
diff --git a/checker/perfscans/PerfScan_SciFi.sh b/checker/perfscans/PerfScan_SciFi.sh
new file mode 100644
index 00000000000..eee34636e13
--- /dev/null
+++ b/checker/perfscans/PerfScan_SciFi.sh
@@ -0,0 +1,56 @@
+cd ../..
+cp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh bkpfile.bkp
+
+for par in 'maximum_number_of_candidates_per_ut_track' 
+do
+  for val in '32' '48' '64' '80' '96' '112' '128'
+  do
+    echo 'Scanning SciFi parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/SciFi-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/SciFi-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
+  done
+done
+
+for par in 'maximum_number_of_candidates_per_ut_track_after_x_filter' 
+do
+  for val in '2' '3' '4'
+  do
+    echo 'Scanning SciFi parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/SciFi-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/SciFi-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
+  done
+done
+
+for par in 'track_min_quality' 
+do
+  for val in '0.05' '0.075' '0.10' '0.125' '0.15'
+  do
+    echo 'Scanning SciFi parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/SciFi-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root ../output/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/SciFi-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
+  done
+done
+
+cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
+rm bkpfile.bkp
diff --git a/checker/perfscans/PerfScan_VELO.sh b/checker/perfscans/PerfScan_VELO.sh
index 3a63bcde236..248cde50352 100644
--- a/checker/perfscans/PerfScan_VELO.sh
+++ b/checker/perfscans/PerfScan_VELO.sh
@@ -6,15 +6,16 @@ do
   for val in '0.05' '0.10' '0.20' '0.40' '0.60' '0.80' '0.90' '1.0'
   do
     echo 'Scanning VELO parameters' $par $val
-    sed -i s/$par\ =\ [^\;]*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
     cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
     cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
     cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout    
     cd ..
+    cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
   done
 done
 
@@ -23,15 +24,16 @@ do
   for val in '0.02' '0.025' '0.030' '0.035' '0.040'
   do
     echo 'Scanning VELO parameters' $par $val
-    sed -i s/$par\ =\ [^\;]*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
     cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
     cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
     cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout
     cd ..
+    cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
   done
 done
 
@@ -40,15 +42,16 @@ do
   for val in '0.0001' '0.00015' '0.0002' '0.00025' '0.0003'
   do
     echo 'Scanning VELO parameters' $par $val
-    sed -i s/$par\ =\ [^\;]*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
     cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
     cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
     cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout
     cd ..
+    cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
   done
 done
 
-- 
GitLab


From 78da7f7e1f01ee888ced0fb6ee70a79e5fb42eb1 Mon Sep 17 00:00:00 2001
From: gligorov <gligorov@mail.cern.ch>
Date: Sat, 18 May 2019 18:07:19 +0200
Subject: [PATCH 3/8] update scripts

---
 checker/perfscans/makePlots.py | 79 ++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 checker/perfscans/makePlots.py

diff --git a/checker/perfscans/makePlots.py b/checker/perfscans/makePlots.py
new file mode 100644
index 00000000000..69427d2d009
--- /dev/null
+++ b/checker/perfscans/makePlots.py
@@ -0,0 +1,79 @@
+import os,sys,fnmatch
+import ROOT
+from ROOT import *
+
+scans = { "VELO"      : {
+                         "max_scatter_seeding" : [],
+                         "max_scatter_forwarding" : [],
+                         "phi_extrapolation_base" : [],
+                         "phi_extrapolation_coef" : []
+                        },
+          "PV"        : {
+                         "zmin" : [],
+                         "zmax" : [],
+                         "maxChi2" : [],
+                         "minTracksInSeed" : []
+                        },
+          "CompassUT" : {
+                         "max_considered_before_found" : [],
+                         "minPT" : [],
+                         "minPTFinal" : [],
+                         "minMomentum" : [],
+                         "minMomentumFinal" : [],
+                         "yTol" : []
+                        },
+          "SciFi"     : {
+                         "maximum_number_of_candidates_per_ut_track" : [],
+                         "maximum_number_of_candidates_per_ut_track_after_x_filter" : [],
+                         "track_min_quality" : []
+                        }
+        }
+
+physperfsuffix = "scan.stdout"
+throughputsuffix = "tptscan.stdout"
+
+resultsdir = "../../output/perfscans/"
+
+# Get what parameter values we scaned over without having to hardcode it
+files = os.listdir(resultsdir)
+for thisscan in scans :
+  for var in scans[thisscan] : 
+    pattern = thisscan+'-'+var+'-*-'+physperfsuffix
+    for entry in files:  
+      if fnmatch.fnmatch(entry, pattern):
+        scans[thisscan][var].append(entry.lstrip(thisscan+'-'+var+'-').rstrip('-'+physperfsuffix))
+    scans[thisscan][var].sort()
+
+# What are we actually going to plot?
+scanstoplot = ["VELO"]
+
+tpthistos = {}
+# Throughput plots are one number so do them first
+canvtoploton = TCanvas("tptcanv","tptcanv",1000,800)
+for thisscan in scanstoplot :
+  tpthistos[thisscan] = {}
+  for var in scans[thisscan] :
+    tpthistos[thisscan][var] = TH1F(thisscan+var+"tphist",
+                                    thisscan+var+"tphist",
+                                    100,
+                                    float(scans[thisscan][var][0])/1.1,
+                                    float(scans[thisscan][var][-1])*1.1)
+    tpthistos[thisscan][var].SetMarkerStyle(24)
+    tpthistos[thisscan][var].SetMarkerSize(1.6)
+    tpthistos[thisscan][var].GetYaxis().SetTitle("Throughput on V100 (kHz)")
+    tpthistos[thisscan][var].GetYaxis().SetTitleOffset(0.9)
+    tpthistos[thisscan][var].GetXaxis().SetTitle(var)
+    tpthistos[thisscan][var].GetXaxis().SetTitleSize(0.05)
+    tpthistos[thisscan][var].GetXaxis().SetTitleOffset(1.1)
+    for scanpoint in scans[thisscan][var] :
+      thistpfile = open(resultsdir+thisscan+'-'+var+'-'+scanpoint+'-'+throughputsuffix)
+      for line in thistpfile :
+        if line.find('events/s') > -1 :
+          tpthistos[thisscan][var].Fill(float(scanpoint),float(line.split()[0])) 
+
+    for thisbin in range(100):
+      tpthistos[thisscan][var].SetBinError(thisbin,0)
+    canvtoploton.cd()
+    tpthistos[thisscan][var].Draw("P")
+    tpthistos[thisscan][var].GetYaxis().SetRangeUser(0,100000)
+    canvtoploton.SaveAs(resultsdir+thisscan+'-'+var+'-tptscan.pdf')
-- 
GitLab


From 79f40286c81394bbd8b94a408ab9b7d845e3050a Mon Sep 17 00:00:00 2001
From: gligorov <gligorov@mail.cern.ch>
Date: Sat, 18 May 2019 18:07:36 +0200
Subject: [PATCH 4/8] update submission scripts

---
 checker/perfscans/PerfScan_CompassUT.sh | 33 +++++++++++++------------
 checker/perfscans/PerfScan_PV.sh        | 25 ++++++++++---------
 checker/perfscans/PerfScan_SciFi.sh     | 25 ++++++++++---------
 checker/perfscans/PerfScan_VELO.sh      | 31 ++++++++++++-----------
 4 files changed, 59 insertions(+), 55 deletions(-)

diff --git a/checker/perfscans/PerfScan_CompassUT.sh b/checker/perfscans/PerfScan_CompassUT.sh
index 3a5b6f2fc08..d6423124d93 100644
--- a/checker/perfscans/PerfScan_CompassUT.sh
+++ b/checker/perfscans/PerfScan_CompassUT.sh
@@ -1,3 +1,4 @@
+outloc=../output/perfscans
 cd ../..
 cp cuda/UT/common/include/CompassUTDefinitions.cuh bkpfile.bkp
 
@@ -9,10 +10,10 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/UT/common/include/CompassUTDefinitions.cuh 
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout    
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/CompassUTDefinitions.cuh
   done
@@ -31,10 +32,10 @@ do
     sed -i s/$par\ =\ \[^f\]\*f/$par\ =\ $val\f/g cuda/UT/common/include/UTDefinitions.cuh 
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout 
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout 
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
   done
@@ -48,10 +49,10 @@ do
     sed -i s/$par\ =\ \[^f\]\*f/$par\ =\ $val\f/g cuda/UT/common/include/UTDefinitions.cuh 
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout 
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout 
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
   done
@@ -65,10 +66,10 @@ do
     sed -i s/$par\ =\ \[^f\]\*f/$par\ =\ $val\f/g cuda/UT/common/include/UTDefinitions.cuh 
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/CompassUT-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-CompassUT-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-CompassUT-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/CompassUT-$par-$val-tptscan.stdout 
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout 
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
   done
diff --git a/checker/perfscans/PerfScan_PV.sh b/checker/perfscans/PerfScan_PV.sh
index 46de3dab09f..e50e6d89b99 100644
--- a/checker/perfscans/PerfScan_PV.sh
+++ b/checker/perfscans/PerfScan_PV.sh
@@ -1,3 +1,4 @@
+outloc=../output/perfscans
 cd ../..
 cp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh bkpfile.bkp
 
@@ -9,9 +10,9 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
-    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
+    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
   done
@@ -25,9 +26,9 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
-    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
+    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
   done
@@ -41,9 +42,9 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
-    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
+    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
   done
@@ -57,9 +58,9 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& ../output/PV-$par-$val-scan.stdout
-    cp ../output/GPU_PVChecker.root ../output/PVChk-PV-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/PV-$par-$val-tptscan.stdout    
+    ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
+    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
   done
diff --git a/checker/perfscans/PerfScan_SciFi.sh b/checker/perfscans/PerfScan_SciFi.sh
index eee34636e13..a3794c201e0 100644
--- a/checker/perfscans/PerfScan_SciFi.sh
+++ b/checker/perfscans/PerfScan_SciFi.sh
@@ -1,3 +1,4 @@
+outloc=../output/perfscans
 cd ../..
 cp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh bkpfile.bkp
 
@@ -9,10 +10,10 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/SciFi-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-SciFi-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-SciFi-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/SciFi-$par-$val-tptscan.stdout    
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
   done
@@ -26,10 +27,10 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/SciFi-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-SciFi-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-SciFi-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/SciFi-$par-$val-tptscan.stdout    
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
   done
@@ -43,10 +44,10 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/SciFi-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-SciFi-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-SciFi-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/SciFi-$par-$val-tptscan.stdout    
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
   done
diff --git a/checker/perfscans/PerfScan_VELO.sh b/checker/perfscans/PerfScan_VELO.sh
index 248cde50352..32d44df012c 100644
--- a/checker/perfscans/PerfScan_VELO.sh
+++ b/checker/perfscans/PerfScan_VELO.sh
@@ -1,3 +1,4 @@
+outloc=../output/perfscans
 cd ../..
 cp cuda/velo/common/include/VeloDefinitions.cuh bkpfile.bkp
 
@@ -9,11 +10,11 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
-    cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout    
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/VELO-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
+    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/VELO-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
   done
@@ -27,11 +28,11 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
-    cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/VELO-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
+    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/VELO-$par-$val-tptscan.stdout
     cd ..
     cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
   done
@@ -45,11 +46,11 @@ do
     sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\f\;/g cuda/velo/common/include/VeloDefinitions.cuh
     cd build
     make -j 8 >& /tmp/WTF
-    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& ../output/VELO-$par-$val-scan.stdout
-    cp ../output/PrCheckerPlots.root ../output/PrChk-VELO-$par-$val-scan.root
-    cp ../output/KalmanIPCheckerOutput.root ../output/KFChk-VELO-$par-$val-scan.root
-    cp ../output/GPU_PVChecker.root ../output/PVChk-VELO-$par-$val-scan.root
-    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& ../output/VELO-$par-$val-tptscan.stdout
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/VELO-$par-$val-scan.stdout
+    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
+    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
+    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/VELO-$par-$val-tptscan.stdout
     cd ..
     cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
   done
-- 
GitLab


From c0175b10b143f992cc852bce21782f292fb956c3 Mon Sep 17 00:00:00 2001
From: gligorov <gligorov@mail.cern.ch>
Date: Sat, 18 May 2019 18:29:48 +0200
Subject: [PATCH 5/8] update submission scripts

---
 checker/perfscans/PerfScan_CompassUT.sh | 16 ++++++++--------
 checker/perfscans/PerfScan_PV.sh        |  8 ++++----
 checker/perfscans/PerfScan_SciFi.sh     | 12 ++++++------
 checker/perfscans/PerfScan_VELO.sh      | 18 +++++++++---------
 checker/perfscans/makePlots.py          | 23 +++++++++++++++++++++++
 5 files changed, 50 insertions(+), 27 deletions(-)

diff --git a/checker/perfscans/PerfScan_CompassUT.sh b/checker/perfscans/PerfScan_CompassUT.sh
index d6423124d93..55b10827a7d 100644
--- a/checker/perfscans/PerfScan_CompassUT.sh
+++ b/checker/perfscans/PerfScan_CompassUT.sh
@@ -11,8 +11,8 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/CompassUTDefinitions.cuh
@@ -33,8 +33,8 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout 
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
@@ -50,8 +50,8 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout 
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
@@ -67,8 +67,8 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/CompassUT-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-CompassUT-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-CompassUT-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/CompassUT-$par-$val-tptscan.stdout 
     cd ..
     cp bkpfile.bkp cuda/UT/common/include/UTDefinitions.cuh
diff --git a/checker/perfscans/PerfScan_PV.sh b/checker/perfscans/PerfScan_PV.sh
index e50e6d89b99..e04d6debe3e 100644
--- a/checker/perfscans/PerfScan_PV.sh
+++ b/checker/perfscans/PerfScan_PV.sh
@@ -11,7 +11,7 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
-    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
@@ -27,7 +27,7 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
-    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
@@ -43,7 +43,7 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
-    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
@@ -59,7 +59,7 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f ~/Data/BsPhiPhi/ -c 1 -m 3000 >& $outloc\/PV-$par-$val-scan.stdout
-    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root $outloc\/PVChk-PV-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/PV-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/PV/beamlinePV/include/BeamlinePVConstants.cuh
diff --git a/checker/perfscans/PerfScan_SciFi.sh b/checker/perfscans/PerfScan_SciFi.sh
index a3794c201e0..92c6c40a902 100644
--- a/checker/perfscans/PerfScan_SciFi.sh
+++ b/checker/perfscans/PerfScan_SciFi.sh
@@ -11,8 +11,8 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
@@ -28,8 +28,8 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
@@ -45,8 +45,8 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh
diff --git a/checker/perfscans/PerfScan_VELO.sh b/checker/perfscans/PerfScan_VELO.sh
index 32d44df012c..338759e58f5 100644
--- a/checker/perfscans/PerfScan_VELO.sh
+++ b/checker/perfscans/PerfScan_VELO.sh
@@ -11,9 +11,9 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/VELO-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
-    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/VELO-$par-$val-tptscan.stdout    
     cd ..
     cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
@@ -29,9 +29,9 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/VELO-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
-    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/VELO-$par-$val-tptscan.stdout
     cd ..
     cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
@@ -47,9 +47,9 @@ do
     cd build
     make -j 8 >& /tmp/WTF
     ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/VELO-$par-$val-scan.stdout
-    cp $outloc\/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
-    cp $outloc\/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
-    cp $outloc\/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-VELO-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-VELO-$par-$val-scan.root
+    cp ../output/GPU_PVChecker.root $outloc\/PVChk-VELO-$par-$val-scan.root
     ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/VELO-$par-$val-tptscan.stdout
     cd ..
     cp bkpfile.bkp cuda/velo/common/include/VeloDefinitions.cuh    
diff --git a/checker/perfscans/makePlots.py b/checker/perfscans/makePlots.py
index 69427d2d009..61357c438b3 100644
--- a/checker/perfscans/makePlots.py
+++ b/checker/perfscans/makePlots.py
@@ -77,3 +77,26 @@ for thisscan in scanstoplot :
     tpthistos[thisscan][var].Draw("P")
     tpthistos[thisscan][var].GetYaxis().SetRangeUser(0,100000)
     canvtoploton.SaveAs(resultsdir+thisscan+'-'+var+'-tptscan.pdf')
+
+physperfhistos = {}
+# The physics performance histos are a bit more complex to define
+physperftoplot = { 
+                   "VELO"       : { "start" : "Checking GPU Velo tracks",
+                                    "end"   : "Checking GPU beamline PVs",
+                                    "cats"  : ["ghosts",
+                                               "Not electron long eta25 p<5GeV",
+                                               "Not electron long eta25 p>5GeV",
+                                               "Not electron long strange eta25 p<5GeV",
+                                               "Not electron long strange eta25 p>5GeV",
+                                               "Electrons long eta25 p<5GeV",
+                                               "Electrons long eta25 p>5GeV",
+                                               "Electrons long strange eta25 p<5GeV",
+                                               "Electrons long strange eta25 p>5GeV"]
+                                  },
+                   "PV"         : {
+                                  },
+                   "CompassUT"  : {
+                                  },
+                   "SciFi"      : {
+                                  }
+                 }
-- 
GitLab


From deb2f64858e7248b0eea1d5f747d3d4fb0c71f27 Mon Sep 17 00:00:00 2001
From: gligorov <gligorov@mail.cern.ch>
Date: Sat, 18 May 2019 19:28:38 +0200
Subject: [PATCH 6/8] more scans

---
 checker/perfscans/makePlots.py | 92 ++++++++++++++++++++++++++++++++--
 1 file changed, 87 insertions(+), 5 deletions(-)

diff --git a/checker/perfscans/makePlots.py b/checker/perfscans/makePlots.py
index 61357c438b3..c37178a48e8 100644
--- a/checker/perfscans/makePlots.py
+++ b/checker/perfscans/makePlots.py
@@ -81,8 +81,7 @@ for thisscan in scanstoplot :
 physperfhistos = {}
 # The physics performance histos are a bit more complex to define
 physperftoplot = { 
-                   "VELO"       : { "start" : "Checking GPU Velo tracks",
-                                    "end"   : "Checking GPU beamline PVs",
+                   "VELO"       : { "end"   : "Checking GPU beamline PVs",
                                     "cats"  : ["ghosts",
                                                "Not electron long eta25 p<5GeV",
                                                "Not electron long eta25 p>5GeV",
@@ -93,10 +92,93 @@ physperftoplot = {
                                                "Electrons long strange eta25 p<5GeV",
                                                "Electrons long strange eta25 p>5GeV"]
                                   },
-                   "PV"         : {
+                   "PV"         : { "end"   : "Checking Velo+UT tracks",
+                                    "cats"  : ["All","Isolated","Close","False"]
                                   },
-                   "CompassUT"  : {
+                   "CompassUT"  : { "end"   : "Checking SciFi tracks",
+                                    "cats"  : ["ghosts",
+                                               "Velo+UT, not long, p > 5 GeV",
+                                               "Long, p > 5 GeV",
+                                               "Long from B, p > 5 GeV", 
+                                               "Long from B electrons, p > 5 GeV",
+                                               "Long from B, p > 3 GeV, pt > 0.5 GeV"]
                                   },
-                   "SciFi"      : {
+                   "SciFi"      : { "end"   : "Producing Kalman plots",
+                                    "cats"  : ["ghosts",
+                                               "Long, p > 5 GeV",
+                                               "Long strange, p > 5 GeV",
+                                               "Long from B, p > 5 GeV", 
+                                               "Long electrons from B, p > 5 GeV",
+                                               "Long from B, p > 3 GeV, pt > 0.5 GeV"]
+
                                   }
                  }
+ordertoread = ["VELO","PV","CompassUT","SciFi"]
+# First a loop to set up all the histos
+for thisscan in scanstoplot :
+  physperfhistos[thisscan] = {}
+  for var in scans[thisscan] : 
+    physperfhistos[thisscan][var] = {}
+    for ppgroup in ordertoread :
+      for ppcat in physperftoplot[ppgroup]["cats"] :
+        physperfhistos[thisscan][var][ppgroup+ppcat] = TH1F(thisscan+var+ppgroup+ppcat+"pphist",
+                                                            thisscan+var+ppgroup+ppcat+"pphist",
+                                                            100,
+                                                            float(scans[thisscan][var][0])/1.1,
+                                                            float(scans[thisscan][var][-1])*1.1)
+        physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerStyle(24)
+        physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerSize(1.6)
+        physperfhistos[thisscan][var][ppgroup+ppcat].GetYaxis().SetTitle("Efficiency (%)")
+        physperfhistos[thisscan][var][ppgroup+ppcat].GetYaxis().SetTitleOffset(0.9)
+        physperfhistos[thisscan][var][ppgroup+ppcat].GetXaxis().SetTitle(var)
+        physperfhistos[thisscan][var][ppgroup+ppcat].GetXaxis().SetTitleSize(0.05)
+        physperfhistos[thisscan][var][ppgroup+ppcat].GetXaxis().SetTitleOffset(1.1)
+ 
+#Now a loop to fill them
+for thisscan in scanstoplot :  
+  for var in scans[thisscan] : 
+    for scanpoint in scans[thisscan][var] :
+      thisppfile = open(resultsdir+thisscan+'-'+var+'-'+scanpoint+'-'+physperfsuffix)
+      for ppgroup in ordertoread :
+        for line in thisppfile :
+          if line.find(physperftoplot[ppgroup]['end']) > -1 : 
+            break
+          for ppcat in physperftoplot[ppgroup]["cats"] :
+            effval = ''
+            if line.find(ppcat) > -1 :
+              if ppcat == "ghosts" :
+                if line.find('TrackChecker output') == -1 :
+                  continue
+              if ppgroup == "PV" :
+                effval = line.split(":")[1].split('(')[0]
+              else :
+                if ppcat == "ghosts" :
+                  effval = line.split(':')[1].split()[2].rstrip('%')
+                else :
+                  effval = line.split(':')[1].split('(')[0].split()[2].rstrip('%')
+              physperfhistos[thisscan][var][ppgroup+ppcat].Fill(float(scanpoint),float(effval)) 
+
+# Set errors to 0
+for thisscan in scanstoplot :  
+  for var in scans[thisscan] : 
+    for ppgroup in ordertoread :
+      for ppcat in physperftoplot[ppgroup]["cats"] :
+        for thisbin in range(100):
+          physperfhistos[thisscan][var][ppgroup+ppcat].SetBinError(thisbin,0)
+
+# Now plot them
+canvtoploton = TCanvas("ppcanv","ppcanv",1000,800)
+for thisscan in scanstoplot :  
+  for var in scans[thisscan] : 
+    for ppgroup in ordertoread :
+      firstcat = True
+      for col,ppcat in enumerate(physperftoplot[ppgroup]["cats"]) :
+        
+        physperfhistos[thisscan][var][ppgroup+ppcat].SetLineColor(col+1)
+        physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerColor(col+1)        
+        if firstcat :
+          physperfhistos[thisscan][var][ppgroup+ppcat].Draw("P") 
+          physperfhistos[thisscan][var][ppgroup+ppcat].GetYaxis().SetRangeUser(0,100)
+          firstcat = False
+        else :
+          physperfhistos[thisscan][var][ppgroup+ppcat].Draw("PSAME")
-- 
GitLab


From 3cacf0a45f995d78b6a34125945a14ae09e98bf2 Mon Sep 17 00:00:00 2001
From: gligorov <gligorov@mail.cern.ch>
Date: Sat, 18 May 2019 22:23:53 +0200
Subject: [PATCH 7/8] finalize drawing routine

---
 checker/perfscans/makePlots.py | 42 ++++++++++++++++++++++++----------
 1 file changed, 30 insertions(+), 12 deletions(-)

diff --git a/checker/perfscans/makePlots.py b/checker/perfscans/makePlots.py
index c37178a48e8..17e788aa0c1 100644
--- a/checker/perfscans/makePlots.py
+++ b/checker/perfscans/makePlots.py
@@ -58,7 +58,7 @@ for thisscan in scanstoplot :
                                     100,
                                     float(scans[thisscan][var][0])/1.1,
                                     float(scans[thisscan][var][-1])*1.1)
-    tpthistos[thisscan][var].SetMarkerStyle(24)
+    tpthistos[thisscan][var].SetMarkerStyle(20)
     tpthistos[thisscan][var].SetMarkerSize(1.6)
     tpthistos[thisscan][var].GetYaxis().SetTitle("Throughput on V100 (kHz)")
     tpthistos[thisscan][var].GetYaxis().SetTitleOffset(0.9)
@@ -124,8 +124,8 @@ for thisscan in scanstoplot :
         physperfhistos[thisscan][var][ppgroup+ppcat] = TH1F(thisscan+var+ppgroup+ppcat+"pphist",
                                                             thisscan+var+ppgroup+ppcat+"pphist",
                                                             100,
-                                                            float(scans[thisscan][var][0])/1.1,
-                                                            float(scans[thisscan][var][-1])*1.1)
+                                                            float(scans[thisscan][var][0])/1.05,
+                                                            float(scans[thisscan][var][-1])*1.05)
         physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerStyle(24)
         physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerSize(1.6)
         physperfhistos[thisscan][var][ppgroup+ppcat].GetYaxis().SetTitle("Efficiency (%)")
@@ -144,19 +144,19 @@ for thisscan in scanstoplot :
           if line.find(physperftoplot[ppgroup]['end']) > -1 : 
             break
           for ppcat in physperftoplot[ppgroup]["cats"] :
-            effval = ''
+            effval = 0.
             if line.find(ppcat) > -1 :
               if ppcat == "ghosts" :
                 if line.find('TrackChecker output') == -1 :
                   continue
               if ppgroup == "PV" :
-                effval = line.split(":")[1].split('(')[0]
+                effval = 100.*float(line.split(":")[1].split('(')[0])
               else :
                 if ppcat == "ghosts" :
-                  effval = line.split(':')[1].split()[2].rstrip('%')
+                  effval = float(line.split(':')[1].split()[2].rstrip('%'))
                 else :
-                  effval = line.split(':')[1].split('(')[0].split()[2].rstrip('%')
-              physperfhistos[thisscan][var][ppgroup+ppcat].Fill(float(scanpoint),float(effval)) 
+                  effval = float(line.split(':')[1].split('(')[0].split()[2].rstrip('%'))
+              physperfhistos[thisscan][var][ppgroup+ppcat].Fill(float(scanpoint),effval) 
 
 # Set errors to 0
 for thisscan in scanstoplot :  
@@ -168,17 +168,35 @@ for thisscan in scanstoplot :
 
 # Now plot them
 canvtoploton = TCanvas("ppcanv","ppcanv",1000,800)
+legcanv = TCanvas("legcanv","legcanv",1000,800)
+legend = TLegend(0.1,0.1,0.9,0.9)
+legend.SetMargin(0.1)
+legendpv = TLegend(0.35,0.25,0.65,0.75)
+legendpv.SetMargin(0.2)
 for thisscan in scanstoplot :  
   for var in scans[thisscan] : 
-    for ppgroup in ordertoread :
+    for ppgroup in ordertoread :   
+      legend.Clear()
       firstcat = True
-      for col,ppcat in enumerate(physperftoplot[ppgroup]["cats"]) :
-        
+      canvtoploton.cd()
+      for col,ppcat in enumerate(physperftoplot[ppgroup]["cats"]) : 
         physperfhistos[thisscan][var][ppgroup+ppcat].SetLineColor(col+1)
-        physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerColor(col+1)        
+        physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerColor(col+1)   
+        physperfhistos[thisscan][var][ppgroup+ppcat].SetMarkerStyle(26-col)     
         if firstcat :
           physperfhistos[thisscan][var][ppgroup+ppcat].Draw("P") 
           physperfhistos[thisscan][var][ppgroup+ppcat].GetYaxis().SetRangeUser(0,100)
           firstcat = False
         else :
           physperfhistos[thisscan][var][ppgroup+ppcat].Draw("PSAME")
+        if ppgroup == "PV" :         
+          legendpv.AddEntry(physperfhistos[thisscan][var][ppgroup+ppcat],ppcat,"p")
+        else :
+          legend.AddEntry(physperfhistos[thisscan][var][ppgroup+ppcat],ppcat,"p")
+      canvtoploton.SaveAs(resultsdir+thisscan+'-'+var+'-'+ppgroup+'-ppscan.pdf')
+      legcanv.cd()
+      if ppgroup == "PV" :
+        legendpv.Draw()
+      else :
+        legend.Draw()
+      legcanv.SaveAs(resultsdir+thisscan+'-'+var+'-'+ppgroup+'-legend.pdf')
-- 
GitLab


From 6f75e3034d1756262c7a4b30fabb8c602e630e71 Mon Sep 17 00:00:00 2001
From: gligorov <gligorov@mail.cern.ch>
Date: Sun, 19 May 2019 19:57:23 +0200
Subject: [PATCH 8/8] fix scripts for scifi

---
 checker/perfscans/PerfScan_SciFi.sh | 39 +++++++++++++++++++++++++++++
 checker/perfscans/makePlots.py      |  4 +--
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/checker/perfscans/PerfScan_SciFi.sh b/checker/perfscans/PerfScan_SciFi.sh
index 92c6c40a902..ab6b56ba964 100644
--- a/checker/perfscans/PerfScan_SciFi.sh
+++ b/checker/perfscans/PerfScan_SciFi.sh
@@ -1,5 +1,44 @@
 outloc=../output/perfscans
 cd ../..
+cp cuda/SciFi/PrForward/include/PrForwardConstants.cuh bkpfile.bkp
+
+for par in 'minPt' 
+do
+  for val in '200' '300' '400' '500' '600'
+  do
+    echo 'Scanning SciFi parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/SciFi/PrForward/include/PrForwardConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/SciFi/PrForward/include/PrForwardConstants.cuh
+  done
+done
+
+for par in 'tolYCollectX' 
+do
+  for val in '1.5' '2.5' '3.5' '4.5' '5.5'
+  do
+    echo 'Scanning SciFi parameters' $par $val
+    sed -i s/$par\ =\ \[^\;\]\*\;/$par\ =\ $val\;/g cuda/SciFi/PrForward/include/PrForwardConstants.cuh
+    cd build
+    make -j 8 >& /tmp/WTF
+    ./Allen -f /data/gligorov/BsPhiPhi -c 1 -t 1 -r 1 -m 3000 >& $outloc\/SciFi-$par-$val-scan.stdout
+    cp ../output/PrCheckerPlots.root $outloc\/PrChk-SciFi-$par-$val-scan.root
+    cp ../output/KalmanIPCheckerOutput.root $outloc\/KFChk-SciFi-$par-$val-scan.root
+    ./Allen -f /data/gligorov/minbias -c 0 -n 10000 -t 3 -r 1 -m 4000 >& $outloc\/SciFi-$par-$val-tptscan.stdout    
+    cd ..
+    cp bkpfile.bkp cuda/SciFi/PrForward/include/PrForwardConstants.cuh
+  done
+done
+
+cp bkpfile.bkp cuda/SciFi/PrForward/include/PrForwardConstants.cuh 
+rm bkpfile.bkp
+
 cp cuda/SciFi/looking_forward/common/include/LookingForwardConstants.cuh bkpfile.bkp
 
 for par in 'maximum_number_of_candidates_per_ut_track' 
diff --git a/checker/perfscans/makePlots.py b/checker/perfscans/makePlots.py
index 17e788aa0c1..11ad5ccfc72 100644
--- a/checker/perfscans/makePlots.py
+++ b/checker/perfscans/makePlots.py
@@ -41,11 +41,11 @@ for thisscan in scans :
     pattern = thisscan+'-'+var+'-*-'+physperfsuffix
     for entry in files:  
       if fnmatch.fnmatch(entry, pattern):
-        scans[thisscan][var].append(entry.lstrip(thisscan+'-'+var+'-').rstrip('-'+physperfsuffix))
+        scans[thisscan][var].append(entry.lstrip(thisscan).lstrip('-').lstrip(var)[1:].rstrip('-'+physperfsuffix))
     scans[thisscan][var].sort()
 
 # What are we actually going to plot?
-scanstoplot = ["VELO"]
+scanstoplot = ["VELO","PV","CompassUT","SciFi"]
 
 tpthistos = {}
 # Throughput plots are one number so do them first
-- 
GitLab