forked from JeffersonLab/japan-MOLLER
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in some new scripts that are actually functioning within the W…
…AC's make_grand_plots.sh scripts. Probably should have made the differences come as a command line argument, but this was the easiest hack at the time
- Loading branch information
1 parent
ef7304a
commit 3e64b90
Showing
9 changed files
with
306 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/AT/minirun_aggregator_#_#.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/AT/slugRootfiles/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name" | ||
echo "Usage: ./smartHadd_miniruns_regression.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
slug=`rcnd ${lines[0]} slug` | ||
name=minirun_slug${slug}.root | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd_miniruns.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/${name}\",\"run_number\",\"minirun_n\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/${name}\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/slugRootfiles/minirun_slug#.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/slugRootfiles/grandRootfile/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name \"....\".list" | ||
echo "Usage: ./smartHadd_slug_regression.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
name="${lines[0]}-${lines[$num_lines]}" | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/grand_CREX_${name}.root\",\"run_number\",\"minirun_n\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/grand_CREX_${name}.root\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/PQB/minirun_aggregator_#_#.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/slugRootfiles/PQB/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name" | ||
echo "Usage: ./smartHadd_miniruns_dithering.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
slug=`rcnd ${lines[0]} slug` | ||
name=minirun_slug${slug}.root | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd_miniruns.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/${name}\",\"run_number\",\"minirun_n\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/${name}\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/PREXII_slugRootfiles/minirun_slug#.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/PREXII_slugRootfiles/grandRootfile/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name \"....\".list" | ||
echo "Usage: ./smartHadd_slug_regression.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
name="${lines[0]}-${lines[$num_lines]}" | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/grand_PREX_${name}.root\",\"run_number\",\"minirun_n\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/grand_PREX_${name}.root\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/burp/minirun_aggregator_#_#.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/burp/slugRootfiles/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name" | ||
echo "Usage: ./smartHadd_miniruns_regression.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
slug=`rcnd ${lines[0]} slug` | ||
name=minirun_slug${slug}.root | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd_miniruns.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/${name}\",\"run_number\",\"minirun_n\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/${name}\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#! /bin/sh | ||
stub="" | ||
if [ "$#" -ge 3 ]; then | ||
stub=$3 | ||
fi | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/dithering${stub}/minirun_aggregator_#_#.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/slugRootfiles/dithering${stub}/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name" | ||
echo "Usage: ./smartHadd_miniruns_dithering.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument) stub (a stub argument for dithering analysis... i.e. \"_1X\")" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
slug=`rcnd ${lines[0]} slug` | ||
name=minirun_slug${slug}.root | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd_miniruns.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/${name}\",\"run_number\",\"minirun_n\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/${name}\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/minirun_aggregator_#_#.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/slugRootfiles/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name" | ||
echo "Usage: ./smartHadd_miniruns_regression.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
slug=`rcnd ${lines[0]} slug` | ||
name=minirun_slug${slug}.root | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd_miniruns.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/${name}\",\"run_number\",\"minirun_n\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/${name}\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/AT/slugRootfiles/grandRootfile_#/grand_aggregator.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/AT/slugRootfiles/grandRootfile/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name number \"slug##\".list" | ||
echo "Usage: ./smartHadd_slug_regression.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
name="${lines[0]}-${lines[$num_lines]}" | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/grand_${name}.root\",\"n_runs\",\"run_number\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/grand_${name}.root\"\) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/sh | ||
ROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/burp/slugRootfiles/grandRootfile_#/grand_aggregator.root" | ||
OUTPUTROOTFILEDIR="/chafs2/work1/apar/aggRootfiles/burp/slugRootfiles/grandRootfile/" | ||
#OUTPUTROOTFILEDIR="./" | ||
if [ "$#" -lt 1 ]; then | ||
echo "Error: Need to pass a list file name number \"slug##\".list" | ||
echo "Usage: ./smartHadd_slug_regression.sh list.txt (input file list, \\n separated) outputFileName (a name..., optional argument)" | ||
else | ||
IFS=$'\n' read -d '' -r -a lines < ${1} | ||
# all lines | ||
echo "Hadding all runs: ${lines[@]}" | ||
#minirun_lines=("${lines[@]}") | ||
minirun_lines=() | ||
#run_lines=("${lines[@]}") | ||
num_lines=0 | ||
num_miniruns=0 | ||
|
||
# Do miniruns | ||
for i in "${!lines[@]}"; do | ||
# run_temp="${ROOTFILEDIR}/grandRootfile_${lines[$i]}/grand_aggregator.root" | ||
#run_lines[$i]=$run_temp | ||
num_lines=$i | ||
done | ||
|
||
name="${lines[0]}-${lines[$num_lines]}" | ||
if [ "$#" -ge 2 ]; then | ||
name=$2 | ||
fi | ||
root -l -b -q ~/PREX/japan/rootScripts/merger/smartHadd.C\(\"${1}\",\"${ROOTFILEDIR}\",\"${OUTPUTROOTFILEDIR}/grand_${name}.root\",\"n_runs\",\"run_number\",\"agg\"\) | ||
|
||
# Add units | ||
root -l -b -q ~/PREX/prompt/Aggregator/wrapper/addUnits.C\(\"${OUTPUTROOTFILEDIR}/grand_${name}.root\"\) | ||
fi |